[Bug c++/84689] is_invocable is true even for call operator via ambiguous base
rs2740 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 3 17:24:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84689
TC <rs2740 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rs2740 at gmail dot com
--- Comment #1 from TC <rs2740 at gmail dot com> ---
With library dependency removed:
struct base {
void operator()(int ) { }
};
struct a : base { };
struct b : base { };
struct f: a, b {
using a::operator();
using b::operator();
};
template<class T> auto g(int) -> decltype(T()(0), 0);
template<class T> auto g(...) -> long;
template<class, class> struct Same;
template<class T> struct Same<T, T> {};
Same<decltype(g<f>(0)), long> s;
Accepted by clang, rejected by gcc, who thinks that decltype(g<f>(0)) is int.
More information about the Gcc-bugs
mailing list