[Bug c++/97517] _Up = 'nullptr_type' not supported by simple_type_specifier'nullptr_type' not supported by direct_abstract_declarator

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 21 14:21:15 GMT 2020


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-10-21
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Naming the template parameter reduces the <template-parameter-1-1> part of the
diagnostic that isn't relevant to the bug:

template<typename T> struct Trait { static constexpr bool value = false; };

template<typename T> concept Concept = Trait<T>::value;

static_assert( Concept<decltype(nullptr)> );


c.C:5:16: error: static assertion failed
    5 | static_assert( Concept<decltype(nullptr)> );
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
c.C:5:16: note: constraints not satisfied
c.C:3:30:   required by the constraints of ‘template<class T> concept Concept’
c.C:3:50: note: the expression ‘Trait<T>::value [with T = ‘nullptr_type’ not
supported by simple_type_specifier‘nullptr_type’ not supported by
direct_abstract_declarator]’ evaluated to ‘false’
    3 | template<typename T> concept Concept = Trait<T>::value;
      |                                                  ^~~~~


More information about the Gcc-bugs mailing list