#ifndef TEST_INTEROP_CXX_TEMPLATES_INPUTS_EXPLICIT_CLASS_SPECIALIZATION_H #define TEST_INTEROP_CXX_TEMPLATES_INPUTS_EXPLICIT_CLASS_SPECIALIZATION_H struct SpecializedIntWrapper { int value; int getValue() const { return value; } }; struct NonSpecializedIntWrapper { int value; int getValue() const { return value; } }; template struct MagicWrapper { T t; int doubleIfSpecializedElseTriple() const { return 3 * t.getValue(); } }; template <> struct MagicWrapper { SpecializedIntWrapper t; int doubleIfSpecializedElseTriple() const { return 2 * t.getValue(); } }; typedef MagicWrapper WrapperWithSpecialization; typedef MagicWrapper WrapperWithoutSpecialization; // Make sure these declarations don't cause a crash even though we can't import // them. template class HasSpecializations; template <> class HasSpecializations<> { int value; struct Child {}; enum Maybe : int { No, Yes }; }; template <> class HasSpecializations { int value; struct Child {}; enum Maybe : int { No, Yes }; }; template <> class HasSpecializations { int value; struct Child {}; enum Maybe : int { No, Yes }; }; template class HasSpecializations { int value; struct Child {}; enum Maybe : int { No, Yes }; }; template class HasSpecializations { int value; struct Child {}; enum Maybe : int { No, Yes }; }; template struct HasEmptySpecializationAndStaticDateMember { inline static const bool value = false; }; template <> struct HasEmptySpecializationAndStaticDateMember { inline static const bool value = true; }; using HasEmptySpecializationAndStaticDateMemberInt = HasEmptySpecializationAndStaticDateMember; #endif // TEST_INTEROP_CXX_TEMPLATES_INPUTS_EXPLICIT_CLASS_SPECIALIZATION_H