# t00038 - Template instantiation with unexposed nested templates
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00038_class:
    type: class
    generate_packages: false
    glob:
      - ../../tests/t00038/t00038.cc
    using_namespace:
      - clanguml::t00038
    include:
      namespaces:
        - clanguml::t00038
        - thirdparty::ns1
```
## Source code
File t00038.cc
```cpp
#include <map>
#include <string>
#include <type_traits>
#include <vector>

namespace thirdparty {
namespace ns1 {
enum class color_t { red, green, blue };

struct E { };
} // namespace ns1
namespace ns2 {
struct F { };
} // namespace ns2
} // namespace thirdparty

namespace clanguml {
namespace t00038 {

enum class property_t { property_a, property_b, property_c };

struct A { };
struct B { };
struct C { };

struct key_t {
    std::string key;
};

template <typename T> struct map { };

using namespace thirdparty::ns1;

template <> struct map<std::integral_constant<color_t, color_t::red>> : E { };

template <>
struct map<std::integral_constant<clanguml::t00038::property_t,
    clanguml::t00038::property_t::property_a>> : A { };

template <>
struct map<std::vector<
    std::integral_constant<t00038::property_t, t00038::property_t::property_b>>>
    : B { };

template <>
struct map<std::map<key_t,
    std::vector<std::integral_constant<property_t, property_t::property_c>>>>
    : C { };

} // namespace t00038
} // namespace clanguml

```
## Generated UML diagrams
![t00038_class](./t00038_class.svg "Template instantiation with unexposed nested templates")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "constants": [
        "red",
        "green",
        "blue"
      ],
      "display_name": "thirdparty::ns1::color_t",
      "id": "566782399856868761",
      "is_nested": false,
      "name": "color_t",
      "namespace": "thirdparty::ns1",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 8
      },
      "type": "enum"
    },
    {
      "bases": [],
      "display_name": "thirdparty::ns1::E",
      "id": "1642222718760881014",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "E",
      "namespace": "thirdparty::ns1",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 10
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "constants": [
        "property_a",
        "property_b",
        "property_c"
      ],
      "display_name": "clanguml::t00038::property_t",
      "id": "7376951310260829",
      "is_nested": false,
      "name": "property_t",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 20
      },
      "type": "enum"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00038::A",
      "id": "790040432414172612",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 22
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00038::B",
      "id": "1295970068907562690",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 23
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00038::C",
      "id": "154510361779680983",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "C",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 24
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00038::key_t",
      "id": "137163683637529037",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "key",
          "source_location": {
            "file": "../../tests/t00038/t00038.cc",
            "line": 27
          },
          "type": "std::string"
        }
      ],
      "methods": [],
      "name": "key_t",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 26
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00038::map<T>",
      "id": "1917560728132448300",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "map",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 30
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "1642222718760881014",
          "is_virtual": false,
          "name": "thirdparty::ns1::E"
        }
      ],
      "display_name": "clanguml::t00038::map<std::integral_constant<thirdparty::ns1::color_t,thirdparty::ns1::color_t::red>>",
      "id": "1664022047310891203",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "map",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 34
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [],
              "type": "thirdparty::ns1::color_t"
            },
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [],
              "type": "thirdparty::ns1::color_t::red"
            }
          ],
          "type": "std::integral_constant"
        }
      ],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "790040432414172612",
          "is_virtual": false,
          "name": "clanguml::t00038::A"
        }
      ],
      "display_name": "clanguml::t00038::map<std::integral_constant<clanguml::t00038::property_t,clanguml::t00038::property_t::property_a>>",
      "id": "307700801045535833",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "map",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 37
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [],
              "type": "clanguml::t00038::property_t"
            },
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [],
              "type": "clanguml::t00038::property_t::property_a"
            }
          ],
          "type": "std::integral_constant"
        }
      ],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "1295970068907562690",
          "is_virtual": false,
          "name": "clanguml::t00038::B"
        }
      ],
      "display_name": "clanguml::t00038::map<std::vector<std::integral_constant<clanguml::t00038::property_t,clanguml::t00038::property_t::property_b>>>",
      "id": "548231528417484191",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "map",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 41
      },
      "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::t00038::property_t"
                },
                {
                  "is_variadic": false,
                  "kind": "argument",
                  "template_parameters": [],
                  "type": "clanguml::t00038::property_t::property_b"
                }
              ],
              "type": "std::integral_constant"
            }
          ],
          "type": "std::vector"
        }
      ],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "154510361779680983",
          "is_virtual": false,
          "name": "clanguml::t00038::C"
        }
      ],
      "display_name": "clanguml::t00038::map<std::map<clanguml::t00038::key_t,std::vector<std::integral_constant<clanguml::t00038::property_t,clanguml::t00038::property_t::property_c>>>>",
      "id": "1510200402118706005",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "map",
      "namespace": "clanguml::t00038",
      "source_location": {
        "file": "../../tests/t00038/t00038.cc",
        "line": 46
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [],
              "type": "clanguml::t00038::key_t"
            },
            {
              "is_variadic": false,
              "kind": "argument",
              "template_parameters": [
                {
                  "is_variadic": false,
                  "kind": "argument",
                  "template_parameters": [
                    {
                      "is_variadic": false,
                      "kind": "argument",
                      "template_parameters": [],
                      "type": "clanguml::t00038::property_t"
                    },
                    {
                      "is_variadic": false,
                      "kind": "argument",
                      "template_parameters": [],
                      "type": "clanguml::t00038::property_t::property_c"
                    }
                  ],
                  "type": "std::integral_constant"
                }
              ],
              "type": "std::vector"
            }
          ],
          "type": "std::map"
        }
      ],
      "type": "class"
    }
  ],
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t00038_class",
  "relationships": [
    {
      "access": "public",
      "destination": "566782399856868761",
      "source": "1664022047310891203",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "1917560728132448300",
      "source": "1664022047310891203",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "1642222718760881014",
      "source": "1664022047310891203",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "7376951310260829",
      "source": "307700801045535833",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "1917560728132448300",
      "source": "307700801045535833",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "790040432414172612",
      "source": "307700801045535833",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "7376951310260829",
      "source": "548231528417484191",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "1917560728132448300",
      "source": "548231528417484191",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "1295970068907562690",
      "source": "548231528417484191",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "137163683637529037",
      "source": "1510200402118706005",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "7376951310260829",
      "source": "1510200402118706005",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "1917560728132448300",
      "source": "1510200402118706005",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "154510361779680983",
      "source": "1510200402118706005",
      "type": "extension"
    }
  ],
  "using_namespace": "clanguml::t00038"
}
```
