[Bug c++/85806] [concepts] Hard error for "invalid use of non-static data member" in a requires expression

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 14 16:56:00 GMT 2019


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I tested it with "concept" not "concept bool" i.e.


template<typename T>
  concept HasCount = requires {
      typename ::helper<T::count>;
  };

  struct S {
      int count = 42;
  };
  static_assert(!HasCount<S>);


More information about the Gcc-bugs mailing list