Error only when using MSVC: a list of template arguments is required to use the class template

This compiles without errors for both clang and gcc, but does not work with MSVC: ( compiler explorer )

// detection idiom template <class...> using void_t = void; template <class Void, template <class...> class Op, class... Args> struct detector_base { using type = void; }; template <template <class...> class Op, class... Args> struct detector_base<void_t<Op<Args...>>, Op, Args...> { using type = Op<Args...>; }; template <class T> using check = decltype(T::x); template <typename T> struct type {}; using dt = typename detector_base<void, check, int>::type; // this is void using t = type<dt>; // ^--- 't': use of class template requires template argument list 

This happens when using the detected type with any type of template. Is this a compiler error or due to lack of support (if so, why)?

+7
c ++ templates c ++ 14
source share

No one has answered this question yet.

See related questions:

1643
Why can templates be implemented only in the header file?
563
Use 'class' or 'typename' for template parameters?
nineteen
Variable template in template - unexpected error (possible error?)
thirteen
Undefined base class error in template context
7
The keyword "template" confuses MSVC
3
Method pointer pattern in clang vs gcc and msvc
3
Partial ordering of function templates and non-output context not working in MSVC 2017
3
specialized class template constructor without a template
3
Template Designer does not work in MSVC due to collision of member function names with argument type
one
Error outputting template template argument using GCC (works with MSVC)

All Articles