Also, a number of style and bug fixes was done: * ASTImporterTest: added sanity check for source node * ExternalASTMerger: better lookup for template specializations * ASTImporter: don't add templated declarations into DeclContext * ASTImporter: introduce a helper, ImportTemplateArgumentListInfo getting SourceLocations * ASTImporter: proper set ParmVarDecls for imported FunctionProtoTypeLoc Differential Revision: https://reviews.llvm.org/D42301 llvm-svn: 323519
19 lines
264 B
C++
19 lines
264 B
C++
template <typename T> struct A {
|
|
};
|
|
|
|
template <> struct A<int> {
|
|
struct B {
|
|
int f;
|
|
};
|
|
};
|
|
|
|
template <> struct A<bool> {
|
|
struct B {
|
|
int g;
|
|
};
|
|
};
|
|
|
|
|
|
template <typename T> constexpr int f() { return 0; }
|
|
template <> constexpr int f<int>() { return 4; }
|