Consider the following code:
template <class R, class... Args>
using function_type = R(*)(Args...);
struct base {
template <class R, class... Args>
constexpr operator function_type<R, Args...>() const noexcept {
return nullptr;
}
};
struct derived: private base {
template <class R, class... Args>
using base::operator function_type<R, Args...>; // ERROR
};
Is there a working alternative in C++20 to inherit and expose a templated conversion function?
derived
that would otherwise hide the conversion function template inbase
? – Tiossem