IntelliSense: overriding alias template

IntelliSense in Visual Studio 2017 (15.1) underlines a word Type

in the following code:

#include <type_traits>

template<class... Vars>
struct Test : std::true_type { };

template<class... TT>
using Type /*!*/ = std::conditional_t<std::conjunction_v<Test<TT>...>, int, double>;

//template<class... TT>
//using Type = std::conditional_t<std::conjunction<Test<TT>...>::value, int, double>; // no error

int main()
{
    return 0;
}

      

The error reads (with some obvious omissions): the template type of the alias "std :: conditional_t ​​<...>" is incompatible with the previous type "std :: conditional_t ​​<...>" when redescribing the alias template "Type" ...

The code is compiled. Is this a bug in IntelliSense?

+3


source to share





All Articles