[Bug c++/92849] call to 'operator()' incorrectly considered ambiguous, when inherited twice with different type parameters
kholdstare0.0 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Dec 6 20:18:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92849
--- Comment #1 from Alexander Kondratskiy <kholdstare0.0 at gmail dot com> ---
Actually, this might be bogus. If I do an explicit `using`, everything works:
#include <type_traits>
template <typename Signature>
struct declfunc;
template <typename Result, typename... Args>
struct declfunc<Result(Args...)>
{
Result operator() (Args...);
};
template <typename... Signatures>
struct decloverload
: declfunc<Signatures>...
{
using declfunc<Signatures>::operator()...;
};
using overload_set = decloverload<void(int), void(int, int)>;
static_assert(std::is_invocable_v<overload_set, int>);
Godbolt link: https://godbolt.org/z/VJwPV4
More information about the Gcc-bugs
mailing list