2013-10-16 07:19:58 +08:00
|
|
|
template<typename> struct MergeSpecializations;
|
|
|
|
template<typename T> struct MergeSpecializations<T[]> {
|
|
|
|
typedef int partially_specialized_in_c;
|
|
|
|
};
|
|
|
|
template<> struct MergeSpecializations<bool> {
|
|
|
|
typedef int explicitly_specialized_in_c;
|
|
|
|
};
|
2014-07-12 02:22:58 +08:00
|
|
|
|
|
|
|
template<typename T> struct MergeTemplateDefinitions {
|
|
|
|
static constexpr int f();
|
|
|
|
static constexpr int g();
|
|
|
|
};
|
|
|
|
template<typename T> constexpr int MergeTemplateDefinitions<T>::g() { return 2; }
|
2014-10-11 06:37:41 +08:00
|
|
|
|
|
|
|
template<typename T1 = int>
|
|
|
|
struct MergeAnonUnionMember {
|
|
|
|
MergeAnonUnionMember() { (void)values.t1; }
|
|
|
|
union { int t1; } values;
|
|
|
|
};
|
|
|
|
inline MergeAnonUnionMember<> maum_c() { return {}; }
|
2014-10-11 08:37:16 +08:00
|
|
|
|
|
|
|
template<typename T> struct DontWalkPreviousDeclAfterMerging { struct Inner { typedef T type; }; };
|
|
|
|
typedef DontWalkPreviousDeclAfterMerging<char>::Inner dwpdam_typedef;
|
2014-10-22 05:15:18 +08:00
|
|
|
|
|
|
|
namespace TestInjectedClassName {
|
|
|
|
template<typename T> struct X { X(); };
|
|
|
|
typedef X<char[3]> C;
|
|
|
|
}
|