[Bug c++/59204] New: Incorrect metaprogram evaluation in SFINAE context
webrown.cpp at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 20 08:37:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59204
Bug ID: 59204
Summary: Incorrect metaprogram evaluation in SFINAE context
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: webrown.cpp at gmail dot com
Created attachment 31255
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31255&action=edit
Demonstrating SFINAE failure to fail
Command: g++-mp-4.9 -O3 -std=gnu++1y bug2.cc
Version: g++-mp-4.9 (MacPorts gcc49 4.9-20131110_0) 4.9.0 20131110
(experimental)
Attached program fails to compile because the 2nd static_assert incorrectly
leads to a diagnostic.
Used in a SFINAE context, it seems that the type expression
void_t<typename T::type>
always yields the type void. This seems too aggressive an outcome; when T has
no T::type member, the expression should instead be treated as invalid, hence
its context rejected due to SFINAE.
More information about the Gcc-bugs
mailing list