cldoc icon indicating copy to clipboard operation
cldoc copied to clipboard

Base class omitted if it's a template parameter

Open cbiffle opened this issue 10 years ago • 0 comments

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 b3fc442786b219746cf6487fc606ef1a77e94a90

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.

cbiffle avatar Jul 13 '15 18:07 cbiffle