jessevdk / cldoc

clang based documentation generator for C and C++
GNU General Public License v2.0
552 stars 58 forks source link

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

Open cbiffle opened 9 years ago

cbiffle commented 9 years ago

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.