Define npos in a way that should make MSVC happier.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 22 Jul 2009 21:08:31 +0000 (21:08 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 22 Jul 2009 21:08:31 +0000 (21:08 +0000)
llvm-svn: 76785

llvm/include/llvm/ADT/StringRef.h

index 68d2deff959ebabfaa4d17df2b669696b2f8fdfe..1d7a9b6d56f06b2f044a59b01ca38a243f1dd9e0 100644 (file)
@@ -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.