https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97517
Bug ID: 97517
Summary: _Up = 'nullptr_type' not supported by
simple_type_specifier'nullptr_type' not supported by
direct_abstract_declarator
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
template<typename> struct Trait { static constexpr bool value = false; };
template<typename T> concept Concept = Trait<T>::value;
static_assert( Concept<decltype(nullptr)> );
Compiled with -std=c++20 gives:
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< <template-parameter-1-1> >::value [with
<template-parameter-1-1> = ‘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;
| ^~~~~