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:
malte_langkabel
2015-03-09 18:07:30 +01:00
parent 5afd9aed2d
commit 9b3f9ebdbf
11 changed files with 534 additions and 121 deletions
+5 -11
View File
@@ -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 -4
View File
@@ -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;
}
+7
View File
@@ -0,0 +1,7 @@
[MainWindow]
maximized=false
size=@Size(600 400)
position=@Point(200 200)
[General]
DOCK_LOCATIONS=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x2\0\0\x2X\0\0\x1g\xfc\x1\0\0\0\x3\xfb\0\0\0\x1a\0\x44\0o\0\x63\0k\0G\0r\0\x61\0p\0h\0V\0i\0\x65\0w\x1\0\0\0\0\0\0\0\x86\0\0\0P\0\xff\xff\xff\xfb\0\0\0\x18\0\x44\0o\0\x63\0k\0\x43\0o\0\x64\0\x65\0V\0i\0\x65\0w\x1\0\0\0\x8a\0\0\0\xb3\0\0\0P\0\xff\xff\xff\xfb\0\0\0\"\0\x44\0o\0\x63\0k\0\x43\0o\0m\0p\0o\0s\0i\0t\0\x65\0V\0i\0\x65\0w\x1\0\0\x1\x41\0\0\x1\x17\0\0\x1\x10\0\xff\xff\xff\0\0\x2X\0\0\0\0\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
+24 -24
View File
@@ -1,27 +1,4 @@
ConfigManager.cpp ERROR: value path/to/nowhere is not present in config.
Token.cpp ERROR: Location Id was not referenced by this Token.
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
Edge.cpp ERROR: Nodes are not plain copies.
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Storage.cpp INFO: file: input.cc < 0:0 0:0>
Storage.cpp INFO: class: A <input.cc 1:7 1:7>
Storage.cpp INFO: method: A::A <input.cc 4:2 4:2>
Storage.cpp INFO: global usage: A::A -> A::count <input.cc 5:3 5:7>
Storage.cpp INFO: method: A::getCount <input.cc 8:13 8:20>
Storage.cpp INFO: global usage: A::getCount -> A::count <input.cc 10:10 10:14>
Storage.cpp INFO: method: A::process <input.cc 14:15 14:21>
Storage.cpp INFO: field: A::count <input.cc 17:13 17:17>
Storage.cpp INFO: class: B <input.cc 20:7 20:7>
Storage.cpp INFO: inheritance: B : A <input.cc 21:4 21:11>
Storage.cpp INFO: method: B::process <input.cc 24:15 24:21>
Storage.cpp INFO: override: A::process -> B::process < 0:0 0:0>
Storage.cpp INFO: type usage: B::process -> int <input.cc 26:3 26:5>
Storage.cpp INFO: function: main <input.cc 30:5 30:8>
Storage.cpp INFO: type usage: main -> B <input.cc 32:2 32:2>
Storage.cpp INFO: call: main -> B::B <input.cc 32:4 32:4>
Storage.cpp INFO: call: main -> A::getCount <input.cc 34:9 34:21>
Storage.cpp INFO: file: input.cc < 0:0 0:0>
Storage.cpp INFO: class: A <input.cc 1:7 1:7>
Storage.cpp INFO: method: A::A <input.cc 4:2 4:2>
@@ -56,6 +33,29 @@ SearchMatch.cpp INFO:
190 A::A
^^^^
Storage.cpp INFO: file: input.cc < 0:0 0:0>
Storage.cpp INFO: class: A <input.cc 1:7 1:7>
Storage.cpp INFO: method: A::A <input.cc 4:2 4:2>
Storage.cpp INFO: global usage: A::A -> A::count <input.cc 5:3 5:7>
Storage.cpp INFO: method: A::getCount <input.cc 8:13 8:20>
Storage.cpp INFO: global usage: A::getCount -> A::count <input.cc 10:10 10:14>
Storage.cpp INFO: method: A::process <input.cc 14:15 14:21>
Storage.cpp INFO: field: A::count <input.cc 17:13 17:17>
Storage.cpp INFO: class: B <input.cc 20:7 20:7>
Storage.cpp INFO: inheritance: B : A <input.cc 21:4 21:11>
Storage.cpp INFO: method: B::process <input.cc 24:15 24:21>
Storage.cpp INFO: override: A::process -> B::process < 0:0 0:0>
Storage.cpp INFO: type usage: B::process -> int <input.cc 26:3 26:5>
Storage.cpp INFO: function: main <input.cc 30:5 30:8>
Storage.cpp INFO: type usage: main -> B <input.cc 32:2 32:2>
Storage.cpp INFO: call: main -> B::B <input.cc 32:4 32:4>
Storage.cpp INFO: call: main -> A::getCount <input.cc 34:9 34:21>
Token.cpp ERROR: Location Id was not referenced by this Token.
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
Edge.cpp ERROR: Nodes are not plain copies.
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge usage can't go from Node undefined to Node undefined
Settings.cpp WARNING: File for Settings not found.
ConfigManager.cpp ERROR: value Bool is not present in config.
ConfigManager.cpp ERROR: value Int is not present in config.
@@ -71,6 +71,7 @@ ConfigManager.cpp ERROR: value Int is not present in config.
ConfigManager.cpp ERROR: value Float is not present in config.
ConfigManager.cpp ERROR: value String is not present in config.
ConfigManager.cpp ERROR: value NewBool is not present in config.
Graph.cpp ERROR: Can't remove member edge, without removing the child node.
Storage.cpp INFO: typedef: type -> int <file.cpp 1:1 1:1>
Storage.cpp INFO: class: Class <file.cpp 1:1 1:1>
Storage.cpp INFO: struct: Struct <file.cpp 1:1 1:1>
@@ -135,7 +136,6 @@ Storage.cpp INFO: file: file.h < 0:0 0:0>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
Storage.cpp INFO: include: f.h <file.cpp 1:0 1:0>
Storage.cpp INFO: include: file.h <file.cpp 1:0 1:0>
Graph.cpp ERROR: Can't remove member edge, without removing the child node.
TextAccess.cpp WARNING: Index 'firstLine' has to be lower or equal index 'lastLine', is 3 > 2
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8