Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extern template are treated as class template specializations #12

Open
foonathan opened this issue Apr 18, 2017 · 0 comments
Open

extern template are treated as class template specializations #12

foonathan opened this issue Apr 18, 2017 · 0 comments

Comments

@foonathan
Copy link
Collaborator

  • cppast version: latest one
  • parser: libclang_parser
  • clang version: 3.9.1+

An extern template will be treated as a (full) class template specialization.

Input:

template <typename T>
struct foo {};

template <>
extern struct foo<int>;

Output:

AST for 'file.cpp':
|-foo (class template) [definition]: `template<typename T> struct foo;`
+-foo (class template specialization): `template<> struct foo<int>;`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant