Closed maierlars closed 3 years ago
Thanks for your PR.
I would prefer if the ADL could be disabled through a fully namespace qualified function call: ::fu2::detail::invocation::invoke(..)
instead.
Does that also solve your issue?
@Naios No objections. It does solve my issue.
@Naios
What was a problem?
When using function2 with C++17, there can be a problem if
functional
is included, too. Because of ADL the call toinvoke
in the namespacefu2::abi_400::detail::invocation
becomes ambiguous if some parameter refer to something in thestd
namespace. Consider the following example:This will not compile using clang-11.0.0 or gcc 10.2.0. For example here the gcc output:
How this PR fixes the problem?
The fix prevents ADL resolution of
invoke
by preventing the left hand side of the call being an identifier.Check lists (check
x
in[ ]
of list items)Additional Comments (if any)
I did not an regression test. You can just use the example above.