[Bug c++/92580] "if constexpr" not discarding branch

2019-11-20 Thread paultargosz86 at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92580 Paul Targosz changed: What|Removed |Added Status|RESOLVED|CLOSED --- Comment #4 from Paul Targosz

[Bug c++/92580] "if constexpr" not discarding branch

2019-11-19 Thread paultargosz86 at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92580 --- Comment #1 from Paul Targosz --- //examplecode without godbolt #include #include struct GW_t { }; template struct IP_t { constexpr static uint8_t a = A; constexpr static uint8_t b = B; constexpr static uint8_t c = C;

[Bug c++/92580] New: "if constexpr" not discarding branch

2019-11-19 Thread paultargosz86 at googlemail dot com
mponent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: paultargosz86 at googlemail dot com Target Milestone: --- "if constexpr" uses std::is_same to check type. depending on the type its using different if-branches, that can have or have not member variables. The &quo