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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-02-07
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The first example in the Wording Changes in P0595R1:

  template<int> struct X {}
  X<std::is_constant_evaluated()> x; // type X<true>

makes it clear that the intent is for the function to evaluate to true in the
context of a non-type template argument, but GCC rejects it as well:

$ cat pr88977.C && gcc -S -Wall -std=c++2a pr88977.C 
template<int> struct X {}
X<__builtin_is_constant_evaluated()> x; // type X<true>
pr88977.C:2:1: error: a class template declaration must not declare anything
else
    2 | X<__builtin_is_constant_evaluated()> x; // type X<true>
      | ^

Reply via email to