diff --git a/include/blt/std/utility.h b/include/blt/std/utility.h index 1cc9fcc..aa7e55f 100644 --- a/include/blt/std/utility.h +++ b/include/blt/std/utility.h @@ -21,7 +21,6 @@ #include #include -#include #if defined(__GNUC__) @@ -61,16 +60,6 @@ namespace blt return demangle(typeid(T).name()); } - template - static BLT_CPP20_CONSTEXPR inline std::string extract_types() - { - auto name = demangle(typeid(T).name()); - - std::regex replace("(__cxx[0-9]*)::"); - - return std::regex_replace(name, replace, ""); - } - template class enumerator { diff --git a/tests/src/utility_test.cpp b/tests/src/utility_test.cpp index b0879dc..54044a7 100644 --- a/tests/src/utility_test.cpp +++ b/tests/src/utility_test.cpp @@ -49,6 +49,11 @@ int testFunc(int a, int b) return a; } +//#undef BLT_START_INTERVAL +//#undef BLT_END_INTERVAL +//#define BLT_START_INTERVAL(profile, iteration) +//#define BLT_END_INTERVAL(profile, iteration) + template void e1(const T& test) { @@ -67,7 +72,7 @@ void e2(const T& test) for (size_t i = 0; i < test.size(); i++) { const auto& v = test[i]; - blt::black_box(std::pair{i, v}); + blt::black_box(std::pair{i, v}); } BLT_END_INTERVAL("Enumeration (" + blt::type_string().substr(0, 30) + ":" + std::to_string(test.size()) + ")", "for index"); } @@ -79,7 +84,7 @@ void e3(const T& test) size_t counter = 0; for (const auto& s : test) { - blt::black_box(std::pair{counter, s}); + blt::black_box(std::pair{counter, s}); ++counter; } BLT_END_INTERVAL("Enumeration (" + blt::type_string().substr(0, 30) + ":" + std::to_string(test.size()) + ")", "for range"); @@ -92,8 +97,6 @@ void testEnumerate(const T& test) e2(test); e3(test); BLT_PRINT_PROFILE("Enumeration (" + blt::type_string().substr(0, 30) + ":" + std::to_string(test.size()) + ")"); - BLT_TRACE(blt::type_string()); - BLT_TRACE(blt::extract_types()); } void getfucked() @@ -263,7 +266,8 @@ void blt::test::utility::run() printLines(tableQ4i2.createTable(true, true)); - for (int gensize = 1; gensize < 8; gensize++){ + for (int gensize = 1; gensize < 8; gensize++) + { size_t size = static_cast(std::pow(10, gensize)); std::vector str;