Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
std::function ambiguity gcc
#include <functional> #include <memory> struct Message {}; void f(std::function<void(std::shared_ptr<Message>)> arg) {} void f(std::function<void(std::unique_ptr<Message>)> arg) {} int main(void) { auto f1 = [](std::shared_ptr<Message>) -> void {}; auto f2 = [](std::unique_ptr<Message>) -> void {}; f(f1); f(f2); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
pranav pandey
TPSI Primo esercizio
sa
Test 9(2020)
bmp_lb
Dulce enredo p1
Sort an array of 0s, 1s and 2s
pointer to template function
C++ lesson
sd5
Please log in to post a comment.