diff --git a/TemplateTest/main.cpp b/TemplateTest/main.cpp index 4b049fe9e820d5f516f1a4189be828db656edab7..fc15dde17b1e8fec4c4c314c8c6dbdbf1b8c9c92 100644 --- a/TemplateTest/main.cpp +++ b/TemplateTest/main.cpp @@ -79,7 +79,7 @@ void testDebug() { DBGVAR(Detail::is_indexable<decltype(vert)>::value); - Subelement<size_t> s({1,true}); + Subelement<size_t> s({1}); DBGVAR(s); HTMLDBGVAR(r, i, c, list, vec, b, m); @@ -492,3 +492,52 @@ int main() */ return 0; } + + +/** GCC error +#include <iostream> +#include <string> + +struct mem{ + std::string s; + mem(){std::cout <<"mem constructor: " << s << std::endl;} +}; + +template<typename statMem> +class C1_wrong { + +public: + + static statMem s; + + C1_wrong(){ + s.s = "hello"; + std::cout << "C1_wrong s.s: " << s.s << std::endl; + + } + static std::string& getS() {return s.s;} + +}; +template <typename statMem> statMem C1_wrong<statMem>::s; + + + +template <typename dummy> +class C2_wrong { +public: + static C1_wrong<mem> c; + C2_wrong() {std::cout << "C2_wrong constructor c.getS(): " << c.getS() << std::endl;} +}; +template <typename dummy> C1_wrong<mem> C2_wrong<dummy>::c; + + +void testConstrucorOrder() { + + std::cout << "global value of C2: " << C2_wrong<void>::c.getS() << std::endl; +} + +int main() +{ + testConstrucorOrder(); +} + */ diff --git a/Unstructured_mesh/Unstructured_mesh.pro.user b/Unstructured_mesh/Unstructured_mesh.pro.user index e10fb3430717d01194be5f562c98a6b30ef59833..9687452355eecd4ebcb3d8618e3b8021958afbf4 100644 --- a/Unstructured_mesh/Unstructured_mesh.pro.user +++ b/Unstructured_mesh/Unstructured_mesh.pro.user @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 4.10.0, 2019-11-09T23:11:25. --> +<!-- Written by QtCreator 4.10.0, 2019-11-10T13:53:17. --> <qtcreator> <data> <variable>EnvironmentId</variable>