https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96142

            Bug ID: 96142
           Summary: is_constant_evaluated() returns false for variable
                    with constant initialization
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

Reduced from StackOverflow (https://stackoverflow.com/q/62822725/2069064), this
program:

#include <utility>

int main() {
  int i = std::is_constant_evaluated();
  return i;
}

with gcc returns 0. But it should return 1, this basically matches the example
we have in [expr.const]/14 with the initialization of p.

Reply via email to