[Bug c++/86299] New: no member named 'value'
zhonghao at pku dot org.cn
gcc-bugzilla@gcc.gnu.org
Mon Jun 25 06:00:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86299
Bug ID: 86299
Summary: no member named 'value'
Product: gcc
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
template< typename > struct has_xxx0
{
template< typename > struct has_xxx0_introspect
{
template< typename > struct has_xxx0_substitute ;
template< typename V >
int int00( has_xxx0_substitute < typename V::template xxx< > > = 0 );
};
static const int value = has_xxx0_introspect<int>::value;
typedef int type;
};
has_xxx0<int>::type t;
The code seems to be invalid, but g++ accept the code. In fact, a previous
version of clang++ also accepts it, but was fixed in
https://bugs.llvm.org/show_bug.cgi?id=7385
The latest clang++ produces the following error message:
error: no member named 'value' in 'has_xxx0<int>::has_xxx0_introspect<int>'
static const int value = has_xxx0_introspect<int>::value;
~~~~~~~~~~~~~~~~~~~~~~~~~~^
More information about the Gcc-bugs
mailing list