Skip to content

Commit 54e0563

Browse files
committed
Change npos to std::numeric_limits<std::size_t>::max() in split_left(), split_right()
1 parent a0a1411 commit 54e0563

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/nonstd/string.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,10 @@ split( std17::basic_string_view<CharT> text, Delimiter delimiter, std::size_t Ns
19321932

19331933
#define string_MK_SPLIT_LEFT( CharT ) \
19341934
string_nodiscard inline auto \
1935-
split_left( std17::basic_string_view<CharT> text, std17::basic_string_view<CharT> set, std::size_t count = npos ) \
1935+
split_left( \
1936+
std17::basic_string_view<CharT> text \
1937+
, std17::basic_string_view<CharT> set \
1938+
, std::size_t count = std::numeric_limits<std::size_t>::max() ) \
19361939
-> std::tuple<std17::basic_string_view<CharT>, std17::basic_string_view<CharT>> \
19371940
{ \
19381941
auto const pos = text.find_first_of( set ); \
@@ -1949,7 +1952,10 @@ split_left( std17::basic_string_view<CharT> text, std17::basic_string_view<Char
19491952

19501953
#define string_MK_SPLIT_RIGHT( CharT ) \
19511954
string_nodiscard inline auto \
1952-
split_right( std17::basic_string_view<CharT> text, std17::basic_string_view<CharT> set, std::size_t count = npos ) \
1955+
split_right( \
1956+
std17::basic_string_view<CharT> text \
1957+
, std17::basic_string_view<CharT> set \
1958+
, std::size_t count = std::numeric_limits<std::size_t>::max() ) \
19531959
-> std::tuple<std17::basic_string_view<CharT>, std17::basic_string_view<CharT>> \
19541960
{ \
19551961
auto const pos = text.find_last_of( set ); \

0 commit comments

Comments
 (0)