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

Base class omitted if it's a template parameter #106

Open
cbiffle opened this issue Jul 13, 2015 · 0 comments
Open

Base class omitted if it's a template parameter #106

cbiffle opened this issue Jul 13, 2015 · 0 comments

Comments

@cbiffle
Copy link

cbiffle commented Jul 13, 2015

The description of a class template includes a "Bases" section, but leaves it empty, when the only base is a template parameter to that class template.

Found in b3fc442

Input

template <typename T>
struct Unit : T {};

Output

screenshot showing absent base

Notes

This pattern is not as contrived as it may seem. It arises in some types of policy-based class factoring (as in Alexandrescu's Modern C++ Design) and also in template metaprogramming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant