diff options
-rw-r--r-- | include/grpc++/support/string_ref.h | 2 | ||||
-rw-r--r-- | src/cpp/util/string_ref.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/grpc++/support/string_ref.h b/include/grpc++/support/string_ref.h index a17e167d2b..9d965260ca 100644 --- a/include/grpc++/support/string_ref.h +++ b/include/grpc++/support/string_ref.h @@ -56,7 +56,7 @@ class string_ref { typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // constants - const static size_t npos = size_t(-1); + const static size_t npos; // construct/copy. string_ref() : data_(nullptr), length_(0) {} diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index 604134fa9d..66c79a1818 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -40,7 +40,7 @@ namespace grpc { -const size_t string_ref::npos; +const size_t string_ref::npos = size_t(-1); string_ref& string_ref::operator=(const string_ref& rhs) { data_ = rhs.data_; |