Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
Not really sure whether that's a frontend or a libstdc++ bug, but GCC 11.1.0
(and according to godbolt trunk as well) does not accept the following sn
nt: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
Declaring a static inline member variable and initializing it with a pointer to
itself is currently impossible. The textbook example for such code would
probably be a l
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
The following snippet allows using reinterpret_casts inside a constexpr.
#include
uint64_t v;
constexpr auto p{reinterpret_cast(&v) - 1u};
Compiled with GCC 10.1
++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
static_cast from std::array operator[] to an enum class inside a template class
produces an unexpected expression error. It seems that error is only present in
9.3, 9.2 and
++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
The new C++20 constinit specifier currently doesn't seem to work with static
data members.
The following snippet compiles although the constructor of Value call
onent: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
For some reasons the compiler seems to differ between a constexpr char const*
which is directly initialized by a string literal and one which actually points
++
Assignee: unassigned at gcc dot gnu.org
Reporter: vincent.hamp at higaski dot at
Target Milestone: ---
Created attachment 46050
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46050&action=edit
Example fails to compile with -Wall
Using a struct with an anonymous union and tr