# t00058 - Test case for concepts with variadic parameters and type aliases ## Config ```yaml compilation_database_dir: .. output_directory: puml diagrams: t00058_class: type: class glob: - ../../tests/t00058/t00058.cc include: namespaces: - clanguml::t00058 using_namespace: - clanguml::t00058 plantuml: after: - '{{ alias("same_as_first_type") }} ..> {{ alias("first_type") }}' ``` ## Source code File t00058.cc ```cpp #include #include #include // Based on a blog post: // https://andreasfertig.blog/2020/08/cpp20-concepts-testing-constrained-functions/ namespace clanguml { namespace t00058 { template struct first_type { using type = T; }; template using first_type_t = typename first_type::type; // TODO: Dependency of this concept on first_type<> template does not currently // work due to the fact that I don't know how to extract that information // from clang::DependentNameType to which first_type_t<> resolves to... template concept same_as_first_type = std::is_same_v, std::remove_cvref_t>>; template requires same_as_first_type struct A { std::vector a; }; template requires same_as_first_type struct B { std::vector b; P bb; }; struct R { A aa; B> bb; }; } } ``` ## Generated UML diagrams ![t00058_class](./t00058_class.svg "Test case for concepts with variadic parameters and type aliases")