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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-02-18
            Summary|narrowing conversion of -1  |narrowing of -1 to unsigned
                   |to unsigned char at compile |char not detected with
                   |time not detected           |requires concepts
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
GCC correctly detects:
template <unsigned char DIM_FROM>
constexpr bool Geometry = (DIM_FROM == -1);
template <class INIT>
constexpr bool tt1 = Geometry<INIT::n>;
template<int N>
struct X {
  static constexpr int n = N;
};
bool t = tt1<X<-1>>;

Reply via email to