[Bug c++/67139] [concepts] ICE on checking concepts with void
eric.niebler at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 6 19:14:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139
--- Comment #2 from Eric Niebler <eric.niebler at gmail dot com> ---
Thanks, except that that is invalid code, and this bug is an ICE-on-valid.
Here's the equivalent valid repro case:
template <class T>
constexpr typename T::type::value_type _v = T::type::value;
template <class T> concept bool IsTrue_() { return _v<T>; }
template <class T> concept bool Unpossible() {
return IsTrue_<T &&>();
}
template <class> constexpr bool unpossible() { return false; }
Unpossible{ T }
constexpr bool unpossible() { return true; }
static_assert((!unpossible<void>()), "");
More information about the Gcc-bugs
mailing list