# t00033 - Nested template instantiation dependency test case
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00033_class:
    type: class
    glob:
      - ../../tests/t00033/t00033.cc
    using_namespace:
      - clanguml::t00033
    include:
      namespaces:
        - clanguml::t00033

```
## Source code
File t00033.cc
```cpp
#include <memory>
#include <vector>

namespace clanguml {
namespace t00033 {

template <typename T> struct A {
    T aaa;
};

template <typename T> struct B {
    T bbb;
};

template <typename T> struct C {
    T ccc;
};

struct D {
    int ddd;
};

struct R {
    A<B<std::unique_ptr<C<D>>>> abc;
};

} // namespace t00033
} // namespace clanguml

```
## Generated UML diagrams
![t00033_class](./t00033_class.svg "Nested template instantiation dependency test case")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "clanguml::t00033::A<T>",
      "id": "2036031998980633871",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "aaa",
          "source_location": {
            "file": "../../tests/t00033/t00033.cc",
            "line": 8
          },
          "type": "T"
        }
      ],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::B<T>",
      "id": "765515233845859023",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "bbb",
          "source_location": {
            "file": "../../tests/t00033/t00033.cc",
            "line": 12
          },
          "type": "T"
        }
      ],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 11
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::C<T>",
      "id": "1436835384265552869",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "ccc",
          "source_location": {
            "file": "../../tests/t00033/t00033.cc",
            "line": 16
          },
          "type": "T"
        }
      ],
      "methods": [],
      "name": "C",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 15
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::D",
      "id": "2199581366769423637",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "ddd",
          "source_location": {
            "file": "../../tests/t00033/t00033.cc",
            "line": 20
          },
          "type": "int"
        }
      ],
      "methods": [],
      "name": "D",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 19
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::C<clanguml::t00033::D>",
      "id": "1609446044604054241",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "C",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../../../../../usr/include/c++/12/bits/unique_ptr.h",
        "line": 269
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "clanguml::t00033::D"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::B<std::unique_ptr<clanguml::t00033::C<clanguml::t00033::D>>>",
      "id": "384927316081978893",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [
                {
                  "is_variadic": false,
                  "kind": "argument",
                  "template_parameters": [],
                  "type": "clanguml::t00033::D"
                }
              ],
              "type": "clanguml::t00033::C"
            }
          ],
          "type": "std::unique_ptr"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::A<clanguml::t00033::B<std::unique_ptr<clanguml::t00033::C<clanguml::t00033::D>>>>",
      "id": "1747493965420341251",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [
                {
                  "is_variadic": false,
                  "kind": "argument",
                  "template_parameters": [
                    {
                      "is_variadic": false,
                      "kind": "argument",
                      "template_parameters": [],
                      "type": "clanguml::t00033::D"
                    }
                  ],
                  "type": "clanguml::t00033::C"
                }
              ],
              "type": "std::unique_ptr"
            }
          ],
          "type": "clanguml::t00033::B"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00033::R",
      "id": "1866392706312766470",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "abc",
          "source_location": {
            "file": "../../tests/t00033/t00033.cc",
            "line": 24
          },
          "type": "A<B<std::unique_ptr<C<D>>>>"
        }
      ],
      "methods": [],
      "name": "R",
      "namespace": "clanguml::t00033",
      "source_location": {
        "file": "../../tests/t00033/t00033.cc",
        "line": 23
      },
      "template_parameters": [],
      "type": "class"
    }
  ],
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t00033_class",
  "relationships": [
    {
      "access": "public",
      "destination": "2199581366769423637",
      "source": "1609446044604054241",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "1436835384265552869",
      "source": "1609446044604054241",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "1609446044604054241",
      "source": "384927316081978893",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "765515233845859023",
      "source": "384927316081978893",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "384927316081978893",
      "source": "1747493965420341251",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "2036031998980633871",
      "source": "1747493965420341251",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "1747493965420341251",
      "label": "abc",
      "source": "1866392706312766470",
      "type": "aggregation"
    }
  ],
  "using_namespace": "clanguml::t00033"
}
```
