never present in Clang trunk, but was present in some of my development work,
and it seems like a useful test to have.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214154
91177308-0d34-0410-b5e6-
96231b3b80d8
template<typename T> constexpr int MergeTemplateDefinitions<T>::f() { return 1; }
template<typename T> using AliasTemplate = T;
+
+template<typename T> struct PartiallyInstantiatePartialSpec {};
+template<typename T> struct PartiallyInstantiatePartialSpec<T*> {
+ static T *foo() { return reinterpret_cast<T*>(0); }
+ static T *bar() { return reinterpret_cast<T*>(0); }
+};
+typedef PartiallyInstantiatePartialSpec<int*> PartiallyInstantiatePartialSpecHelper;
void TriggerInstantiation() {
UseDefinedInBImpl<void>();
Std::f<int>();
+ PartiallyInstantiatePartialSpec<int*>::foo();
}
int &p = WithPartialSpecializationUse().f();
int &q = WithExplicitSpecializationUse().inner_template<int>();
+ int *r = PartiallyInstantiatePartialSpec<int*>::bar();
}
static_assert(Outer<int>::Inner<int>::f() == 1, "");