Skip to content

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

@cbiffle

Description

@cbiffle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions