From: Daniel Dunbar Date: Wed, 22 Jul 2009 21:08:31 +0000 (+0000) Subject: Define npos in a way that should make MSVC happier. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b834a7b73ce0dcf8fbf8d8b0d62f69e4b78059ad;p=oota-llvm.git Define npos in a way that should make MSVC happier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76785 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index 68d2deff959..1d7a9b6d56f 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -26,7 +26,7 @@ namespace llvm { class StringRef { public: typedef const char *iterator; - static const size_t npos = std::string::npos; + static const size_t npos = ~size_t(0); private: /// The start of the string, in an external buffer.