# t20016 - Template method specialization sequence diagram test case
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t20016_sequence:
    type: sequence
    glob:
      - ../../tests/t20016/t20016.cc
    include:
      namespaces:
        - clanguml::t20016
    using_namespace:
      - clanguml::t20016
    start_from:
      - function: "clanguml::t20016::tmain()"
```
## Source code
File t20016.cc
```cpp
namespace clanguml {
namespace t20016 {
struct A {
    void a1(int a) { }
    template <typename T> T a2(const T &a) { return a; }
};

template <typename T> struct B {
    void b1(T b) { a_.a1(1); }

    template <typename F> F b2(T t) { return a_.a2(t); }

    A a_;
};

void tmain()
{
    B<long> b;

    b.b1(1);

    b.b2<int>(2);
}
}
}
```
## Generated UML diagrams
![t20016_sequence](./t20016_sequence.svg "Template method specialization sequence diagram test case")
## Generated JSON models
```json
{
  "diagram_type": "sequence",
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t20016_sequence",
  "participants": [
    {
      "id": "1912662358651926712",
      "name": "clanguml::t20016::tmain()",
      "source_location": {
        "file": "../../tests/t20016/t20016.cc",
        "line": 16
      },
      "type": "function"
    },
    {
      "id": "1688340912643326666",
      "name": "clanguml::t20016::B<long>",
      "source_location": {
        "file": "../../tests/t20016/t20016.cc",
        "line": 8
      },
      "type": "class"
    },
    {
      "id": "1351242594275053195",
      "name": "clanguml::t20016::A",
      "source_location": {
        "file": "../../tests/t20016/t20016.cc",
        "line": 3
      },
      "type": "class"
    }
  ],
  "sequences": [
    {
      "messages": [
        {
          "from": {
            "activity_id": "1912662358651926712",
            "activity_name": "clanguml::t20016::tmain()",
            "participant_id": "1912662358651926712",
            "participant_name": "clanguml::t20016::tmain()"
          },
          "name": "b1(long)",
          "return_type": "void",
          "scope": "normal",
          "source_location": {
            "file": "../../tests/t20016/t20016.cc",
            "line": 20
          },
          "to": {
            "activity_id": "2064264710178722261",
            "activity_name": "clanguml::t20016::B<long>::b1(long)",
            "participant_id": "1688340912643326666"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "2064264710178722261",
            "activity_name": "clanguml::t20016::B<long>::b1(long)",
            "participant_id": "1688340912643326666"
          },
          "name": "a1(int)",
          "return_type": "void",
          "scope": "normal",
          "source_location": {
            "file": "../../tests/t20016/t20016.cc",
            "line": 9
          },
          "to": {
            "activity_id": "1198371121423942542",
            "activity_name": "clanguml::t20016::A::a1(int)",
            "participant_id": "1351242594275053195"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1912662358651926712",
            "activity_name": "clanguml::t20016::tmain()",
            "participant_id": "1912662358651926712",
            "participant_name": "clanguml::t20016::tmain()"
          },
          "name": "b2(long)",
          "return_type": "int",
          "scope": "normal",
          "source_location": {
            "file": "../../tests/t20016/t20016.cc",
            "line": 22
          },
          "to": {
            "activity_id": "203381140188081853",
            "activity_name": "clanguml::t20016::B<long>::b2(long)",
            "participant_id": "1688340912643326666"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "203381140188081853",
            "activity_name": "clanguml::t20016::B<long>::b2(long)",
            "participant_id": "1688340912643326666"
          },
          "name": "a2(const long &)",
          "return_type": "long",
          "scope": "normal",
          "source_location": {
            "file": "../../tests/t20016/t20016.cc",
            "line": 11
          },
          "to": {
            "activity_id": "1208784669530380166",
            "activity_name": "clanguml::t20016::A::a2(const long &)",
            "participant_id": "1351242594275053195"
          },
          "type": "message"
        }
      ],
      "start_from": {
        "id": 1912662358651926712,
        "location": "clanguml::t20016::tmain()"
      }
    }
  ],
  "using_namespace": "clanguml::t20016"
}
```
