This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/67384] New: [concepts] More fun with deduction constraints


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]