We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 413aaab commit 293e112Copy full SHA for 293e112
libc/src/__support/CPP/string_view.h
@@ -9,6 +9,7 @@
9
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_STRING_VIEW_H
10
#define LLVM_LIBC_SRC___SUPPORT_CPP_STRING_VIEW_H
11
12
+#include "limits.h"
13
#include "src/__support/common.h"
14
#include "src/__support/macros/config.h"
15
@@ -61,7 +62,7 @@ class string_view {
61
62
63
// special value equal to the maximum value representable by the type
64
// size_type.
- LIBC_INLINE_VAR static constexpr size_t npos = SIZE_MAX;
65
+ LIBC_INLINE_VAR static constexpr size_t npos = cpp::numeric_limits<size_t>::max();
66
67
LIBC_INLINE constexpr string_view() : Data(nullptr), Len(0) {}
68
0 commit comments