[cfe-commits] [libcxx] r135873 - /libcxx/trunk/include/string

Howard Hinnant hhinnant at apple.com
Sun Jul 24 08:07:21 PDT 2011


Author: hhinnant
Date: Sun Jul 24 10:07:21 2011
New Revision: 135873

URL: http://llvm.org/viewvc/llvm-project?rev=135873&view=rev
Log:
http://llvm.org/bugs/show_bug.cgi?id=10461

Modified:
    libcxx/trunk/include/string

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=135873&r1=135872&r2=135873&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Sun Jul 24 10:07:21 2011
@@ -3507,24 +3507,6 @@
     return __rhs.compare(__lhs) == 0;
 }
 
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator==(const char* __lhs,
-           const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT
-{
-    return strcmp(__lhs, __rhs.data()) == 0;
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator==(const wchar_t* __lhs,
-           const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __rhs) _NOEXCEPT
-{
-    return wcscmp(__lhs, __rhs.data()) == 0;
-}
-
 template<class _CharT, class _Traits, class _Allocator>
 _LIBCPP_INLINE_VISIBILITY inline
 bool
@@ -3534,24 +3516,6 @@
     return __lhs.compare(__rhs) == 0;
 }
 
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
-           const char* __rhs) _NOEXCEPT
-{
-    return strcmp(__lhs.data(), __rhs) == 0;
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator==(const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __lhs,
-           const wchar_t* __rhs) _NOEXCEPT
-{
-    return wcscmp(__lhs.data(), __rhs) == 0;
-}
-
 // operator!=
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3589,25 +3553,7 @@
 operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
 {
-    return __lhs.cmpare(__rhs) < 0;
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator< (const basic_string<char, char_traits<char>, _Allocator>& __lhs,
-           const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT
-{
-    return strcmp(__lhs.data(), __rhs.data()) < 0;
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator< (const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __lhs,
-           const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __rhs) _NOEXCEPT
-{
-    return wcscmp(__lhs.data(), __rhs.data()) < 0;
+    return __lhs.compare(__rhs) < 0;
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3616,25 +3562,7 @@
 operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
 {
-    return __lhs.compare(__rhs);
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator< (const basic_string<char, char_traits<char>, _Allocator>& __lhs,
-           const char* __rhs) _NOEXCEPT
-{
-    return strcmp(__lhs.data(), __rhs) < 0;
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator< (const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __lhs,
-           const wchar_t* __rhs) _NOEXCEPT
-{
-    return wcscmp(__lhs.data(), __rhs) < 0;
+    return __lhs.compare(__rhs) < 0;
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -3646,24 +3574,6 @@
     return __rhs.compare(__lhs) > 0;
 }
 
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator< (const char* __lhs,
-           const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT
-{
-    return strcmp(__lhs, __rhs.data()) < 0;
-}
-
-template<class _Allocator>
-_LIBCPP_INLINE_VISIBILITY inline
-bool
-operator< (const wchar_t* __lhs,
-           const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __rhs) _NOEXCEPT
-{
-    return wcscmp(__lhs, __rhs.data()) < 0;
-}
-
 // operator>
 
 template<class _CharT, class _Traits, class _Allocator>





More information about the cfe-commits mailing list