Adding template class specialization sequence diagram test case
This commit is contained in:
30
tests/t20006/t20006.cc
Normal file
30
tests/t20006/t20006.cc
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <string>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t20006 {
|
||||
|
||||
template <typename T> struct A {
|
||||
T a(T arg) { return arg; }
|
||||
T a1(T arg) { return arg; }
|
||||
};
|
||||
|
||||
template <typename T> struct B {
|
||||
T b(T arg) { return a_.a(arg); }
|
||||
A<T> a_;
|
||||
};
|
||||
|
||||
template <> struct B<std::string> {
|
||||
std::string b(std::string arg) { return arg; }
|
||||
A<std::string> a_;
|
||||
};
|
||||
|
||||
void tmain()
|
||||
{
|
||||
B<int> bint;
|
||||
B<std::string> bstring;
|
||||
|
||||
bint.b(1);
|
||||
bstring.b("bstring");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user