File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -281,13 +281,15 @@ namespace string {
281281
282282// npos
283283
284- #if string_CPP17_OR_GREATER
285- static string_constexpr std::size_t npos = std::size_t (-1 );
286- #elif string_CPP11_OR_GREATER
287- enum : std::size_t { npos = std::size_t (-1 ) };
288- #else
289- enum { npos = std::size_t (-1 ) };
290- #endif
284+ #if string_HAVE_STRING_VIEW
285+ static string_constexpr std::size_t npos = std::basic_string_view<char >::npos;
286+ # elif string_CPP17_OR_GREATER
287+ static string_constexpr std::size_t npos = std::string::npos;
288+ # elif string_CPP11_OR_GREATER
289+ enum : std::size_t { npos = std::string::npos };
290+ # else
291+ enum { npos = std::string::npos };
292+ #endif // string_HAVE_STRING_VIEW
291293
292294namespace detail {
293295
You can’t perform that action at this time.
0 commit comments