File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ namespace pe::core::rtti
44{
55 namespace RTTI2
66 {
7- TypeManager& get ()
7+ TypeManager& TypeManager:: get ()
88 {
99 static TypeManager instance{};
1010 return instance;
1111 }
1212 }
13- }
13+ }
Original file line number Diff line number Diff line change @@ -17,19 +17,19 @@ namespace pe::core::rtti
1717
1818 namespace impl
1919 {
20+ template <typename F, typename X>
21+ void runListImpl (F f, X x) { f (x); }
22+
2023 template <typename F, typename X, typename ... XS>
21- void runList (F f, X x, XS... xs)
24+ void runListImpl (F f, X x, XS... xs)
2225 {
2326 f (x);
24- runList (f, xs...);
27+ runListImpl (f, xs...);
2528 }
26-
27- template <typename F, typename X>
28- void runList (F f, X x) { f (x); }
2929 }
3030
3131 constexpr auto runList = [](auto list, auto f) {
32- list ([f](auto ... xs){ impl::runList (f, xs...); });
32+ list ([f](auto ... xs){ impl::runListImpl (f, xs...); });
3333 };
3434
3535 namespace RTTI2
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ struct TestClass : public virtual RTTI2::RTTIBase {
1010 TestClass () : RTTI2::RTTIBase(RTTI2::TypeManager::get().registerOrGetType<TestClass>()) {}
1111};
1212template <> struct RTTI2 ::RTTIinfo<TestClass> {
13- constexpr static auto info = List(testAttr, testAttr, RTTI2::classname { " testname" });
13+ constexpr static auto info = List(testAttr, testAttr, RTTI2::ClassName { " testname" });
1414};
1515
1616TEST_CASE (" RTTI2 simple attribute" , " [RTTI2]" ) {
@@ -20,7 +20,7 @@ TEST_CASE("RTTI2 simple attribute", "[RTTI2]") {
2020 CHECK (ta);
2121 CHECK (ta->size () == 2 );
2222 CHECK (tc.typeInfo ().get <int >() == nullptr );
23- auto x = tc.typeInfo ().get <RTTI2::classname >();
23+ auto x = tc.typeInfo ().get <RTTI2::ClassName >();
2424 CHECK (x);
2525 CHECK (std::string (" testname" ) == x->name );
2626}
@@ -73,4 +73,4 @@ TEST_CASE("RTTI2 derived", "[RTTI2]") {
7373 CHECK (tcb.typeInfo ().bases [0 ].get ().id == tca.typeInfo ().id );
7474 CHECK (RTTI2::isSame<TestClassA>(tca.typeInfo ()));
7575 CHECK (RTTI2::isDerived<TestClassA>(tcb.typeInfo ()));
76- }
76+ }
You can’t perform that action at this time.
0 commit comments