Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
std::function ambiguity clang
#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.
even number
You can't erase a std::unordered_map::local_iterator
Magic, why 1 2?
C++ standard
Throttle Example using a circular queue (Push all but 2 less than maxSize; then pop all but 2 of current size)
pointer to complete array does not convert implicitly to pointer to array of unknown bound
Tree Example
Optional conversions
mpi_distributed_sort
Example of custom deleter to manage a resource.
Please log in to post a comment.