[llvm-commits] [llvm] r76785 - /llvm/trunk/include/llvm/ADT/StringRef.h

Daniel Dunbar daniel at zuster.org
Wed Jul 22 14:08:31 PDT 2009


Author: ddunbar
Date: Wed Jul 22 16:08:31 2009
New Revision: 76785

URL: http://llvm.org/viewvc/llvm-project?rev=76785&view=rev
Log:
Define npos in a way that should make MSVC happier.

Modified:
    llvm/trunk/include/llvm/ADT/StringRef.h

Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=76785&r1=76784&r2=76785&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Wed Jul 22 16:08:31 2009
@@ -26,7 +26,7 @@
   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.





More information about the llvm-commits mailing list