language-lawyer
Is sizeof(*ptr) undefined behavior when pointing to invalid memory?
We all know that dereferencing an null pointer or a pointer to unallocated memory invokes undefined behaviour.[详细]
2023-04-12 16:16 分类:问答overloading postfix and prefix operators
please considerfollowing code #include <iostream> using namespace std; class Digit { private: int m_digit;[详细]
2023-04-12 06:48 分类:问答Why compiler doesn't automatically inline freely defined function ? Instead results in linker error
Example:开发者_如何学Go // header.h void foo ()// function definition in the file { } // file1.cpp #include\"header.h\"[详细]
2023-04-08 05:20 分类:问答constexpr undefined behaviour
I\'ve been experimenting with constexpr. On my test compiler (g++ 4.6) this fails to compile with an error about out of bounds access. Is a compiler required to spot this at compile time?[详细]
2023-04-05 09:48 分类:问答Is stl vector concurrent read thread-safe?
I am working on a application where huge number of threads are expected to iterate over set of string values and try to match it\'s own data with the data available in the list.[详细]
2023-04-05 08:15 分类:问答Temporaries lifetime in N3290 C++ draft
A point from N3290 C++ draft, § 12.2, 5th point, line 10. The second context is when a reference is bound to a temporary. The[详细]
2023-04-04 01:04 分类:问答References to incomplete types
According t开发者_如何学编程o the C++03 standard, is it valid to have references to incomplete types? I\'m not aware of any implementation that implements references as any other than non-null pointer[详细]
2023-04-03 12:24 分类:问答Is printing an empty string observable behavior in C++?
In C++03 Standard observable behavior (1.9/6) inc开发者_Python百科ludes calls to library I/O functions. Now I have this code:[详细]
2023-03-30 20:02 分类:问答Are there well-known "profiles" of the C standard?
I write C code that makes certain assumptions about the implementation, such as: char is 8 bits. signed integral types are two\'s complement.[详细]
2023-03-30 03:49 分类:问答Strange C++ rule for member function pointers? [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Error with address of parenthesized member function[详细]
2023-03-29 07:04 分类:问答