[Bug libstdc++/81263] Work around CWG issue 1558 (guarantee SFINAE when using `void_t`)

webrown.cpp at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 30 16:56:00 GMT 2017


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

W E Brown <webrown.cpp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |webrown.cpp at gmail dot com

--- Comment #1 from W E Brown <webrown.cpp at gmail dot com> ---
I have not confirmed the report but, as the originator of the void_t technique,
I do have a few comments:

a)  The cited CWG issue was resolved several years ago, and is in DR status. 
That means the exhibited code is expected to work.  If it doesn't, I consider
it a compiler issue, not a library issue.

b) Therefore, once the compiler is fixed (if necessary), ISTM there should be
no reason to use the cited alternative definition of void_t, which I first
discovered and disseminated as a temporary workaround only.  See my WG21 paper
N3911 and/or part 2 of my metaprogramming talk at CppCon 2014.

c)  FWIW, while it should work as exhibited in the report, the code does not
quite conform to the design of the detection idiom.  I prefer to write such a
2nd template parameter as a type parameter of the form
   class = void_t<whatever>.


More information about the Gcc-bugs mailing list