This is a known bug in the Visual C++ compiler. It has not yet been fixed as of the Visual C++ 2013 Preview. You can work around this issue using std::common_type
:
IsClass<std::common_type<decltype(it)>::type::value_type>::Yes
^^^^^^^^^^^^^^^^^ ^^^^^^^
(std::common_type
with a single template argument yields that argument type; it's the standardized C++11 equivalent of the identity
template that has long been used in metaprogramming.)
You can find the public bug report on Microsoft Connect: Cannot use decltype before scope operator. If this issue is important to you, please consider upvoting that bug report.