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

            Bug ID: 66844
           Summary: [c++-concepts] Requires-expression parameter with void
                    type
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Casey at Carter dot net
  Target Milestone: ---

This ill-formed program compiles successfully:

template <class T, class U>
concept bool Same = __is_same_as(T, U);

template <class T>
concept bool C =
  requires (T t) {
    requires Same<decltype(t),void>;
  };

template <C>
constexpr bool is_c() { return true; }

static_assert(is_c<void>(), "");

int main() {}

Reply via email to