Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ADL of operator expression & unqualified function call
#include <iostream> struct X { void operator*() const { std::cout << "#1" << std::endl; } }; struct Y { Y(X) {} }; void f(Y) {std::cout << "f(Y)" << std::endl;} template<int> void g() { *X{}; f(X{}); } void f(X) {std::cout << "f(X)" << std::endl;} void operator*(X&&) { std::cout << "#2" << std::endl; } int main() { g<0>(); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Increment pointer to struct
Type deduction in VC++
Template float/int comparison
Runner-mt
seh exception in constructor memory leak
vaska
😊
C++ standard violation: [templates][explicit instantiation][access checking]
sample ptr and obj ex
MSVC ignoring unknown attributes
Please log in to post a comment.