Top "Language-lawyer" questions

For questions about the intricacies of formal or authoritative specifications of programming languages and environments.

Why was the space character not chosen for C++14 digit separators?

As of C++14, thanks to n3781 (which in itself does not answer this question) we may write code like the …

c++ language-lawyer c++14 digit
reinterpret_cast between char* and std::uint8_t* - safe?

Now we all sometimes have to work with binary data. In C++ we work with sequences of bytes, and since …

c++ c++11 language-lawyer strict-aliasing uint8t
How do you import an enum into a different namespace in C++?

I have an enum in a namespace and I'd like to use it as if it were in a different …

c++ enums namespaces typedef language-lawyer
Use of typename keyword with typedef and new

Consider this code, template<class T> struct Sample { typename T::X *x; //declare pointer to T's X }; In …

c++ templates typedef language-lawyer typename
Is `long` guaranteed to be at least 32 bits?

By my reading of the C++ Standard, I have always understood that the sizes of the integral fundamental types in …

c++ standards long-integer language-lawyer
How can a program with a global variable called main instead of a main function work?

Consider following program: #include <iostream> int main = ( std::cout << "C++ is excellent!\n", 195 ); Using g++ 4.8.1 (mingw64) …

c++ main language-lawyer
Is the operation "false < true" well defined?

Does the C++ specification define: the existence of the 'less than' operator for boolean parameters, and if so, the result …

c++ boolean language-lawyer comparison-operators
What is the type of command-line argument `argv` in C?

I'm reading a section from C Primer Plus about command-line argument argv and I'm having difficulty understanding this sentence. It …

c arrays pointers language-lawyer argv
Force all classes to implement / override a 'pure virtual' method in multi-level inheritance hierarchy

In C++ why the pure virtual method mandates its compulsory overriding only to its immediate children (for object creation), but …

c++ overriding language-lawyer class-hierarchy virtual-functions
The behavior of value-initializing an enum

First, I want to say, according to cppreference.com, it is somewhat impossible to value-initialize an enum. According to http://…

c++ enums initialization language-lawyer value-initialization