Skip to content

Commit 7b6ab5f

Browse files
Simplified get_member_ptr_name
1 parent 02d8566 commit 7b6ab5f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

include/rfl/internal/cpp20/get_member_ptr_name.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@ consteval auto get_member_ptr_name_str_view() {
3737
return split.substr(split.find_last_of(":.") + 1);
3838
#elif defined(_MSC_VER)
3939
auto split = func_name.substr(0, func_name.size() - 7);
40-
split = split.substr(split.find("get_member_ptr_name_str_view<") + 29);
41-
auto pos1 = split.find_last_of(":");
42-
auto pos2 = split.find_last_of(">");
43-
if (pos1 != std::string_view::npos && pos2 != std::string_view::npos &&
44-
pos2 > pos1) {
45-
return split.substr(pos1 + 1, pos2);
40+
auto pos = split.find_last_of(":");
41+
if (pos != std::string_view::npos) {
42+
return split.substr(pos + 1);
4643
}
4744
return split;
4845
#else

0 commit comments

Comments
 (0)