Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C++ standard violation: [templates][explicit instantiation][access checking]
template <typename PtrType, PtrType PtrValue, typename TagType> struct private_access { friend PtrType get(TagType) { return PtrValue; } }; class Foo { void print0(int); void print(); void print(int); }; using A = void(int); using B = A Foo::*; struct Tag {}; template struct private_access<B, &Foo::print0, Tag>;// OK //template struct private_access<B, &Foo::print, Tag>; // ERROR in Clang, OK in GCC int main() { return 0; }
run
|
edit
|
history
|
help
0
const_pointer_cast
Generic EventProvider
hangman
Test
Fast sine to fill array (sin/cos pair)
Fibonacci stairs
find vs at
rstring
Two-phase sample with Visual C++ 2015
Copy_and_base