# t00073 - Class diagram for template overload pattern
## Config
```yaml
diagrams:
  t00073_class:
    type: class
    glob:
      - t00073.cc
    include:
      namespaces:
        - clanguml::t00073
    using_namespace: clanguml::t00073
```
## Source code
File `tests/t00073/t00073.cc`
```cpp
namespace clanguml {
namespace t00073 {
struct A { };
struct AHandler {
    void handle(A &a) const { }
    void operator()(A &a) const { handle(a); }
};

struct B { };
struct BHandler {
    void handle(B &b) const { }
    void operator()(B &b) const { handle(b); }
};

template <typename... Bases> struct Overload : public Bases... {
    using Bases::operator()...;
};
template <typename... Bases> Overload(Bases...) -> Overload<Bases...>;

struct R {
    Overload<AHandler, BHandler> dispatch;
};
}
}
```
## Generated PlantUML diagrams
![t00073_class](./t00073_class.svg "Class diagram for template overload pattern")
## Generated Mermaid diagrams
![t00073_class](./t00073_class_mermaid.svg "Class diagram for template overload pattern")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "A",
      "id": "13978220967333947858",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 8,
        "file": "t00073.cc",
        "line": 3,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "AHandler",
      "id": "12424623007175064860",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [
        {
          "access": "public",
          "display_name": "handle",
          "is_const": true,
          "is_consteval": false,
          "is_constexpr": false,
          "is_constructor": false,
          "is_copy_assignment": false,
          "is_coroutine": false,
          "is_defaulted": false,
          "is_deleted": false,
          "is_move_assignment": false,
          "is_noexcept": false,
          "is_operator": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "handle",
          "parameters": [
            {
              "name": "a",
              "type": "A &"
            }
          ],
          "source_location": {
            "column": 10,
            "file": "t00073.cc",
            "line": 5,
            "translation_unit": "t00073.cc"
          },
          "template_parameters": [],
          "type": "void"
        },
        {
          "access": "public",
          "display_name": "operator()",
          "is_const": true,
          "is_consteval": false,
          "is_constexpr": false,
          "is_constructor": false,
          "is_copy_assignment": false,
          "is_coroutine": false,
          "is_defaulted": false,
          "is_deleted": false,
          "is_move_assignment": false,
          "is_noexcept": false,
          "is_operator": true,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "operator()",
          "parameters": [
            {
              "name": "a",
              "type": "A &"
            }
          ],
          "source_location": {
            "column": 10,
            "file": "t00073.cc",
            "line": 6,
            "translation_unit": "t00073.cc"
          },
          "template_parameters": [],
          "type": "void"
        }
      ],
      "name": "AHandler",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 8,
        "file": "t00073.cc",
        "line": 4,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "B",
      "id": "18318917281529387309",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 8,
        "file": "t00073.cc",
        "line": 9,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "BHandler",
      "id": "9201412624975017558",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [
        {
          "access": "public",
          "display_name": "handle",
          "is_const": true,
          "is_consteval": false,
          "is_constexpr": false,
          "is_constructor": false,
          "is_copy_assignment": false,
          "is_coroutine": false,
          "is_defaulted": false,
          "is_deleted": false,
          "is_move_assignment": false,
          "is_noexcept": false,
          "is_operator": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "handle",
          "parameters": [
            {
              "name": "b",
              "type": "B &"
            }
          ],
          "source_location": {
            "column": 10,
            "file": "t00073.cc",
            "line": 11,
            "translation_unit": "t00073.cc"
          },
          "template_parameters": [],
          "type": "void"
        },
        {
          "access": "public",
          "display_name": "operator()",
          "is_const": true,
          "is_consteval": false,
          "is_constexpr": false,
          "is_constructor": false,
          "is_copy_assignment": false,
          "is_coroutine": false,
          "is_defaulted": false,
          "is_deleted": false,
          "is_move_assignment": false,
          "is_noexcept": false,
          "is_operator": true,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "operator()",
          "parameters": [
            {
              "name": "b",
              "type": "B &"
            }
          ],
          "source_location": {
            "column": 10,
            "file": "t00073.cc",
            "line": 12,
            "translation_unit": "t00073.cc"
          },
          "template_parameters": [],
          "type": "void"
        }
      ],
      "name": "BHandler",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 8,
        "file": "t00073.cc",
        "line": 10,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "Overload<Bases...>",
      "id": "1025907370326213117",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "Overload",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 37,
        "file": "t00073.cc",
        "line": 15,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [
        {
          "is_variadic": true,
          "kind": "template_type",
          "name": "Bases...",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "12424623007175064860",
          "is_virtual": false,
          "name": "clanguml::t00073::AHandler"
        },
        {
          "access": "public",
          "id": "9201412624975017558",
          "is_virtual": false,
          "name": "clanguml::t00073::BHandler"
        }
      ],
      "display_name": "Overload<AHandler,BHandler>",
      "id": "15541587871136239694",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "Overload",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 37,
        "file": "t00073.cc",
        "line": 15,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "AHandler"
        },
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "BHandler"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "R",
      "id": "3531521522969213013",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "dispatch",
          "source_location": {
            "column": 34,
            "file": "t00073.cc",
            "line": 21,
            "translation_unit": "t00073.cc"
          },
          "type": "Overload<AHandler,BHandler>"
        }
      ],
      "methods": [],
      "name": "R",
      "namespace": "clanguml::t00073",
      "source_location": {
        "column": 8,
        "file": "t00073.cc",
        "line": 20,
        "translation_unit": "t00073.cc"
      },
      "template_parameters": [],
      "type": "class"
    }
  ],
  "name": "t00073_class",
  "package_type": "namespace",
  "relationships": [
    {
      "access": "public",
      "destination": "13978220967333947858",
      "source": "12424623007175064860",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "18318917281529387309",
      "source": "9201412624975017558",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "1025907370326213117",
      "source": "15541587871136239694",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "12424623007175064860",
      "source": "15541587871136239694",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "9201412624975017558",
      "source": "15541587871136239694",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "15541587871136239694",
      "label": "dispatch",
      "source": "3531521522969213013",
      "type": "aggregation"
    }
  ],
  "using_namespace": "clanguml::t00073"
}
```
