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

            Bug ID: 91487
           Summary: [concepts] alias constraint not respected
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frederik.engels24 at gmail dot com
  Target Milestone: ---

The following should fail to compile since it doesn't pass the only_int
constraint.

https://godbolt.org/z/HrB1wz (gcc version 10.0.0 20190817)

#include <type_traits>

template<typename T>
    requires std::is_same_v<int, T>
using only_int = T;

template<typename T>
using forward = only_int<T>;

int main()
{
    forward<float> f;
}

Reply via email to