Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++template metaprogrammingSingle-choice MCQ

What does this template instantiation produce, and which under-the-hood mechanism explains the result?

template<class T> struct X { static constexpr int value = 1; }; template<class T> struct X<T*> { static constexpr int value = 2; }; template<class T> struct X<const T> { static constexpr int value = 3; }; constexpr int value = X<int*>::value;