Skip to content

Commit

Permalink
Fix tests on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
cfis committed Jan 12, 2025
1 parent 28a6af3 commit 1d0139c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions rice/detail/Type.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -172,28 +172,32 @@ namespace Rice::detail
auto stdClangRegex = std::regex("std::__[^:]+::");
base = std::regex_replace(base, stdClangRegex, "");

// Remove std::
auto stdRegex = std::regex("std::");
base = std::regex_replace(base, stdRegex, "");

// Replace basic_string with string
auto basicStringRegex = std::regex(R"(basic_string)");
replaceAll(base, basicStringRegex, "string");

// Remove allocators
std::regex allocatorRegex(R"(,\s*std::allocator)");
std::regex allocatorRegex(R"(,\s*allocator)");
removeGroup(base, allocatorRegex);

// Remove char_traits
std::regex charTraitsRegex(R"(,\s*std::char_traits)");
std::regex charTraitsRegex(R"(,\s*char_traits)");
removeGroup(base, charTraitsRegex);

// Remove less (std::map)
std::regex lessRegex(R"(,\s*std::less)");
std::regex lessRegex(R"(,\s*less)");
removeGroup(base, lessRegex);

// Remove hash (std::unordered_map)
std::regex hashRegex(R"(,\s*std::hash)");
std::regex hashRegex(R"(,\s*hash)");
removeGroup(base, hashRegex);

// Remove equal_to (std::unordered_map)
std::regex equalRegex(R"(,\s*std::equal_to)");
std::regex equalRegex(R"(,\s*equal_to)");
removeGroup(base, equalRegex);

// Remove spaces before pointers
Expand All @@ -204,10 +208,6 @@ namespace Rice::detail
std::regex ptr64Regex(R"(\s*__ptr64\s*)");
base = std::regex_replace(base, ptr64Regex, "");

// Remove std::
auto stdRegex = std::regex("std::");
base = std::regex_replace(base, stdRegex, "");

// Replace " >" with ">"
auto trailingAngleBracketSpaceRegex = std::regex(R"(\s+>)");
replaceAll(base, trailingAngleBracketSpaceRegex, ">");
Expand Down

0 comments on commit 1d0139c

Please sign in to comment.