This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83003] Using the detection idiom and void_t causes an error
- From: "ensadc at mailnesia dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Nov 2017 13:22:48 +0000
- Subject: [Bug c++/83003] Using the detection idiom and void_t causes an error
- Auto-submitted: auto-generated
- References: <bug-83003-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83003
ensadc at mailnesia dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ensadc at mailnesia dot com
--- Comment #3 from ensadc at mailnesia dot com ---
There doesn't even need to be a specialization of Zod.
template <template <class> class, class = void>
struct dtect1 { enum { value = 0 }; };
template <template <class> class TT>
struct dtect1<TT, decltype(TT<int>{}, void())> { enum { value = 1 }; };
template <class T> struct Zod { };
template <class T> using Zod_t = typename Zod<T>::type;
static_assert(!dtect1<Zod_t>::value, "");
Zod_t<int> z2; // !!