standards Questions

1

As pointed out in answers to Generic hash for tuples in unordered_map / unordered_set and elsewhere, Boost has an implementation of boost::hash<tuple<string, string>>. So, we can do thi...
Philippopolis asked 9/7, 2021 at 16:25

3

Solved

In C++20, there are two swap function templates: std::ranges::swap(T&&, U&&) and std::swap(T&, T&). I just wonder: What's the difference between they two?
Markson asked 25/7, 2021 at 7:42

2

Solved

The expresssion (void *)0 is called a null pointer. But how about the following: int i = 0; void *s = (void *)i; Is s also a null-pointer? The C-language standard says: 6.3.2.3 Pointers 3 An inte...
Ordain asked 6/6, 2024 at 4:9

2

Solved

A while ago, I had noticed that when encoding a map name: value to 'application/x-www-form-urlencoded, it renders something like that (here I use Python): >>> from urllib import urlencode...
Toxophilite asked 8/3, 2011 at 8:46

1

I'm very used to cross-browser web APIs having a specification document owned by a standards body, e.g. the WebRTC spec from the W3C, or the WebGL spec from Khronos. Another web API is "Source...
Inducement asked 28/9, 2020 at 13:17

5

Solved

I thought those terms where synonymous, but a note in MISRA regarding dead code indicates this to be wrong? What's the difference? Is one a subset of the other?
Emmanuelemmeline asked 2/4, 2014 at 5:58

1

Solved

For the old XML layouts I always use the dimen.xml file to define almost all dimensions, paddings, margins, etc. While learning Jetpack Compose I find that all repositories, examples, etc., hardcod...
Depalma asked 2/5, 2023 at 16:12

1

Solved

The cppref page on std::format says: It is not an error to provide more arguments than the format string requires: // OK, produces "Hello world!" std::format("{} {}!", "H...

1

Most of the standard library seems reasonably simple to implement either in terms of other parts of the library, in terms of OS sys-calls, or bare C++ code. A few more bits (e.g. <atomic>) pr...
Anabiosis asked 22/1, 2024 at 18:59

4

Solved

I'm wondering if the following date is ISO8601 compliant : 2012-03-02 14:57:05.456+0500 (for sure, 2012-03-02T14:57:05.456+0500 is compliant, but not that much human readable !) IOW, is the T be...
Methodist asked 2/3, 2012 at 10:16

3

Solved

I have a JSON file, which contains JSON from Clojure's data.json library. The data came from Twitter where people seem to smile a lot. $ cat /tmp/myfile | jq . I get: parse error: Invalid \uXX...
Precis asked 25/2, 2017 at 14:39

3

Solved

It is well known that in each of the C and C++ standards there were "blind spots" that did not describe certain cases in well-formed programs. It is obvious that in non-formal description...
Harim asked 16/9, 2023 at 14:58

1

Since patents expired in 2017, I wonder if there are specifications of the MP3 audio format that have been made available to the public? Unfortunately, access to the official ISO/IEC 13818-3:1998 ...
Lewandowski asked 15/5, 2020 at 22:7

2

Solved

I was doing some research on the Rust programming language, and I was trying to find an authoritative published standard (or at least a document that functions as if) like the ECMA Standard or the ...
Clayborn asked 17/1, 2014 at 3:43

2

Solved

(My original question was going to be about "What happened to _BitInt?" but that was based on a misreading of some cppreference pages). The Library Introduction section 16.2 of the C++23 ...
Nader asked 3/11, 2023 at 16:5

16

Solved

What exactly is POSIX? I have read the Wikipedia article but I still don't understand.
Decay asked 23/11, 2009 at 0:42

4

Solved

According to cppref: std::allocator<T>::allocate_at_least Allocates count * sizeof(T) bytes of uninitialized storage, where count is an unspecified integer value not less than n, by calling ...
Glidewell asked 8/9, 2021 at 7:1

2

The LLVM C++ compiler has full support for C++11 standard. Is there a way to set C++11 as the default standard without adding -std=c++11 compiler flag every time? I tried setting CCXFLAGS environme...
Leper asked 5/2, 2014 at 15:48

3

Solved

There is a very convenient feature introduced in C++11 called raw string literals, which are strings with no escape characters. And instead of writing this: regex mask("\\t[0-9]+\\.[0-9]+\\t\\\\S...
Outfielder asked 29/9, 2013 at 8:34

20

Solved

What is a good way to overcome the unfortunate fact that this code will not work as desired: <div class="required"> <label>Name:</label> <input type="text"> </div> ...
Prestige asked 25/6, 2012 at 21:33

4

Solved

Since Go puts a heavy emphasis on interfaces, I'm wondering how can I explicitly state that a structure is implementing an interface for clarity and errors checking in case some method is missing? ...
Overplay asked 31/7, 2015 at 18:57

3

Regarding window.innerWidth and document.documentElement.clientWidth, Webkit (Chrome / Safari) claims innerWidth is smaller than clientWidth. Trident and Presto claim innerWidth is bigger than c...
Kannry asked 4/8, 2011 at 14:0

3

Solved

I apologize if this is a duplication. What column standardization would you use for storing international country subdivision data? For example, if it was just US and Canada I believe all subdivi...
Clayborne asked 3/9, 2010 at 17:3

10

Solved

How do you determine what version of the C++ standard is implemented by your compiler? As far as I know, below are the standards I've known: C++03 C++98
Perchloride asked 24/2, 2010 at 8:46

8

Solved

I know there is the perl regex that is sort of a minor de facto standard, but why hasn't anyone come up with a universal set of standard symbols, syntax and behaviors?
Hyperploid asked 10/5, 2010 at 21:48

© 2022 - 2025 — McMap. All rights reserved.