Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$
prog.cc: In instantiation of 'struct does_not_have_foo<Foo>':
prog.cc:15:41: required from here
prog.cc:8:56: error: 'int Foo::foo' is private within this context
struct does_not_have_foo<T, decltype(std::declval<T>().foo, void())>: std::false_type {};
~~~~~~~~~~~~~~~~~~^~~
prog.cc:11:9: note: declared private here
int foo;
^~~
prog.cc:8:56: error: 'int Foo::foo' is private within this context
struct does_not_have_foo<T, decltype(std::declval<T>().foo, void())>: std::false_type {};
~~~~~~~~~~~~~~~~~~^~~
prog.cc:11:9: note: declared private here
int foo;
^~~
prog.cc: In function 'int main()':
prog.cc:15:19: error: static assertion failed
static_assert(does_not_have_foo<Foo>::value);
^~~~~~~~~~~~~~~~~~~~~~
prog.cc:15:19: error: 'int Foo::foo' is private within this context
prog.cc:11:9: note: declared private here
int foo;
^~~
Exit Code:
1