Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

std::function ambiguity clang

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.32 sec, absolute service time: 0,44 sec 
edit mode |  history  | discussion
Error(s):
source_file.cpp:13:3: error: call to 'f' is ambiguous
  f(f1);
  ^
source_file.cpp:6:6: note: candidate function
void f(std::function<void(std::shared_ptr<Message>)> arg) {}
     ^
source_file.cpp:7:6: note: candidate function
void f(std::function<void(std::unique_ptr<Message>)> arg) {}
     ^
1 error generated.

        

    
                
λ
.NET NoSQL database for rapid development