Skip to content

error C2672: 'operator __surrogate_func': no matching overloaded function found #1

@VzdornovNA88

Description

@VzdornovNA88

example.cpp

(166): error C2672: 'operator __surrogate_func': no matching overloaded function found (199): note: see reference to function template instantiation 'bool print_foo(const T &)' being compiled with [ T=otherlib::one ] (166): error C2893: Failed to specialize function template 'unknown-type bfg::tag::operator ()(Args &&...) noexcept() const' (111): note: see declaration of 'bfg::tag::operator ()' (166): note: With the following template arguments: (166): note: 'Args={const T &}' Compiler returned: 2

I tried to use TAG_INVOKE pattern in my project I was implementing myself variant this pattern but it didn't work then I have found your project and I tried to compile example but I got the same error from msvc.

https://godbolt.org/z/jKjxWq - it is your example in godbolt.org , any msvc compiler compiles its with error "error C2672: 'operator __surrogate_func': no matching overloaded function found" but clang and gcc (c++11->17->20) compile well , What is happening , I don't know , What am I doing wrong? What do you think about it ? Thanks.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions