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
Cross-platform multithreading minimal example (g++ and cl.exe)
why fatal error C1083
😊
C string literal
sharedptr emptiness
codecvt wide string conversion with multibyte chars and locale + concatenation
3
Template
unordered map broken msvc
sample ptr and obj ex