Updated test case documentation
This commit is contained in:
41
docs/test_cases/t20004.md
Normal file
41
docs/test_cases/t20004.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# t20004 - Function template instantiation sequence diagram test case
|
||||
## Config
|
||||
```yaml
|
||||
compilation_database_dir: ..
|
||||
output_directory: puml
|
||||
diagrams:
|
||||
t20004_sequence:
|
||||
type: sequence
|
||||
glob:
|
||||
- ../../tests/t20004/t20004.cc
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml::t20004
|
||||
using_namespace:
|
||||
- clanguml::t20004
|
||||
start_from:
|
||||
- function: "clanguml::t20004::main()"
|
||||
```
|
||||
## Source code
|
||||
File t20004.cc
|
||||
```cpp
|
||||
namespace clanguml {
|
||||
namespace t20004 {
|
||||
|
||||
template <typename T> T m4(T p);
|
||||
|
||||
template <typename T> T m3(T p) { return m4<T>(p); }
|
||||
|
||||
template <typename T> T m2(T p) { return m3<T>(p); }
|
||||
|
||||
template <typename T> T m1(T p) { return m2<T>(p); }
|
||||
|
||||
template <> [[maybe_unused]] int m4<int>(int p) { return p + 2; }
|
||||
|
||||
int main() { return m1<int>(0); }
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
## Generated UML diagrams
|
||||

|
||||
Reference in New Issue
Block a user