struct A {};
template class std::common_type<int, int, A>;
In file included from prog.cc:1:
/usr/local/llvm-head/include/c++/v1/type_traits:2029:8: error: no type named 'type' in 'std::__1::common_type<int, A>'
::type type;
/usr/local/llvm-head/include/c++/v1/type_traits:2034:7: note: in instantiation of template class 'std::__1::__common_type_impl<std::__1::__common_types<int, int, A>, void>' requested here
: __common_type_impl<__common_types<_Tp, _Up, _Vp...> > {};
^
prog.cc:4:22: note: in instantiation of template class 'std::__1::common_type<int, int, A>' requested here
template struct std::common_type<int, int, A>;
^
The __void_t check for this case only verified the existence of common_type<_Tp, _Up>::type, not common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type. The simplest fix is to inherit from common_type<typename common_type<_Tp, _Up>::type, _Vp...> instead.
Of course, P0435R1 is touching this area again, but the principal change is to the two-parameter version and not >2, so figured I'd file this anyway.
Extended Description
include
struct A {}; template class std::common_type<int, int, A>;
In file included from prog.cc:1: /usr/local/llvm-head/include/c++/v1/type_traits:2029:8: error: no type named 'type' in 'std::__1::common_type<int, A>'
The __void_t check for this case only verified the existence of common_type<_Tp, _Up>::type, not common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type. The simplest fix is to inherit from common_type<typename common_type<_Tp, _Up>::type, _Vp...> instead.
Of course, P0435R1 is touching this area again, but the principal change is to the two-parameter version and not >2, so figured I'd file this anyway.