data: non-type- and template-template parameters
* name of template class now also contains type information on the template parameters (e.g. typename, class, bool, const std::string&, etc.) * implemented handling of non-type template parameters and template template parameters. * implemented lots of tests for these features.
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
template <typename T, typename U>
|
||||
class TemplateTestClass
|
||||
template <bool B, typename, class F>
|
||||
class Foo
|
||||
{
|
||||
public:
|
||||
template <typename P>
|
||||
void run(P param);
|
||||
void bar()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename U>
|
||||
template <typename P>
|
||||
void TemplateTestClass<T, U>::run(P param)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
TemplateTestClass<float, float> t1;
|
||||
t1.run<float>(6.9f);
|
||||
TemplateTestClass<int, int> t2;
|
||||
t2.run<int>(6);
|
||||
Foo<true, int, float> ft;
|
||||
ft.bar();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user