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

            Bug ID: 67384
           Summary: [concepts] More fun with deduction constraints
           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: ---

r227270 with -std=gnu++1z compiles this TU without diagnostics:

template <class T>
concept bool C = requires (T t) {
  { *t } -> auto;
};

template <C T>
constexpr bool models = true;

template <class T>
  requires !C<T>
constexpr bool models_not = true;

static_assert(models<int*>);
static_assert(models_not<int*>);

apparently int& both is and is not deducible to auto.

Reply via email to