[Bug c++/56687] New: [C++11] No visibility check within static_assert
antoinep92 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 22 10:44:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56687
Bug #: 56687
Summary: [C++11] No visibility check within static_assert
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: antoinep92@gmail.com
template<class, class> struct same {static const bool value = false; };
template<class T> struct same<T, T> {static const bool value = true; };
template<class T> class id { typedef T type; };
static_assert( same<int, id<int>::type /* private */ >::value, "bad type");
Compile with -std=c++11 -Wall -pedantic
Neither gcc nor g++ triggers an error, though id<int>::type should not be
accessible (private)!
More information about the Gcc-bugs
mailing list