Fixed template template example
This commit is contained in:
@@ -17,19 +17,18 @@ public:
|
||||
CMP comparator;
|
||||
};
|
||||
|
||||
/*
|
||||
* TODO: Handle template template properly.
|
||||
*
|
||||
template <typename T> struct Vector {
|
||||
std::vector<T> values;
|
||||
};
|
||||
|
||||
template <typename T, template <typename> typename C> struct B {
|
||||
C<T> template_template;
|
||||
};
|
||||
|
||||
struct D {
|
||||
// libclang claims that the type spelling of 'ints' is 'int'...
|
||||
B<int, std::vector> ints;
|
||||
B<int, Vector> ints;
|
||||
|
||||
void add(int i) { ints.template_template.push_back(i); }
|
||||
void add(int i) { ints.template_template.values.push_back(i); }
|
||||
};
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ TEST_CASE("t00008", "[test-case][class]")
|
||||
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
||||
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("A", "T, P, bool (*)(int, int), int N"));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("B", "T, C<>"));
|
||||
|
||||
REQUIRE_THAT(puml, IsField(Public("T value")));
|
||||
REQUIRE_THAT(puml, IsField(Public("T * pointer")));
|
||||
|
||||
Reference in New Issue
Block a user