Merge pull request #3177 from podsvirov/topic-grpc-string-ref-npos-redifinition

Move static value grpc::string_ref::npos definition to cc file
pull/3996/merge
Craig Tiller 9 years ago
commit 187c4b36d9
  1. 2
      include/grpc++/support/string_ref.h
  2. 2
      src/cpp/util/string_ref.cc

@ -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) {}

@ -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_;

Loading…
Cancel
Save