[cfe-commits] [libcxx] r110736 - in /libcxx/trunk: include/cstring test/strings/c.strings/cstring.pass.cpp
Howard Hinnant
hhinnant at apple.com
Tue Aug 10 14:57:23 PDT 2010
Author: hhinnant
Date: Tue Aug 10 16:57:23 2010
New Revision: 110736
URL: http://llvm.org/viewvc/llvm-project?rev=110736&view=rev
Log:
Fix conflict with cstring and using namespace std
Modified:
libcxx/trunk/include/cstring
libcxx/trunk/test/strings/c.strings/cstring.pass.cpp
Modified: libcxx/trunk/include/cstring
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cstring?rev=110736&r1=110735&r2=110736&view=diff
==============================================================================
--- libcxx/trunk/include/cstring (original)
+++ libcxx/trunk/include/cstring Tue Aug 10 16:57:23 2010
@@ -77,23 +77,23 @@
using ::strcoll;
using ::strxfrm;
-inline _LIBCPP_INLINE_VISIBILITY const void* memchr(const void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
+using ::memchr;
inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, int __c, size_t __n) {return ::memchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY const char* strchr(const char* __s, int __c) {return ::strchr(__s, __c);}
+using ::strchr;
inline _LIBCPP_INLINE_VISIBILITY char* strchr( char* __s, int __c) {return ::strchr(__s, __c);}
using ::strcspn;
-inline _LIBCPP_INLINE_VISIBILITY const char* strpbrk(const char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
+using ::strpbrk;
inline _LIBCPP_INLINE_VISIBILITY char* strpbrk( char* __s1, const char* __s2) {return ::strpbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY const char* strrchr(const char* __s, int __c) {return ::strrchr(__s, __c);}
+using ::strrchr;
inline _LIBCPP_INLINE_VISIBILITY char* strrchr( char* __s, int __c) {return ::strrchr(__s, __c);}
using ::strspn;
-inline _LIBCPP_INLINE_VISIBILITY const char* strstr(const char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}
+using ::strstr;
inline _LIBCPP_INLINE_VISIBILITY char* strstr( char* __s1, const char* __s2) {return ::strstr(__s1, __s2);}
using ::strtok;
Modified: libcxx/trunk/test/strings/c.strings/cstring.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/strings/c.strings/cstring.pass.cpp?rev=110736&r1=110735&r2=110736&view=diff
==============================================================================
--- libcxx/trunk/test/strings/c.strings/cstring.pass.cpp (original)
+++ libcxx/trunk/test/strings/c.strings/cstring.pass.cpp Tue Aug 10 16:57:23 2010
@@ -34,17 +34,17 @@
static_assert((std::is_same<decltype(std::strncmp(cpc, cpc, s)), int>::value), "");
static_assert((std::is_same<decltype(std::strcoll(cpc, cpc)), int>::value), "");
static_assert((std::is_same<decltype(std::strxfrm(cp, cpc, s)), std::size_t>::value), "");
- static_assert((std::is_same<decltype(std::memchr(vpc, 0, s)), const void*>::value), "");
+// static_assert((std::is_same<decltype(std::memchr(vpc, 0, s)), const void*>::value), "");
static_assert((std::is_same<decltype(std::memchr(vp, 0, s)), void*>::value), "");
- static_assert((std::is_same<decltype(std::strchr(cpc, 0)), const char*>::value), "");
+// static_assert((std::is_same<decltype(std::strchr(cpc, 0)), const char*>::value), "");
static_assert((std::is_same<decltype(std::strchr(cp, 0)), char*>::value), "");
static_assert((std::is_same<decltype(std::strcspn(cpc, cpc)), std::size_t>::value), "");
- static_assert((std::is_same<decltype(std::strpbrk(cpc, cpc)), const char*>::value), "");
+// static_assert((std::is_same<decltype(std::strpbrk(cpc, cpc)), const char*>::value), "");
static_assert((std::is_same<decltype(std::strpbrk(cp, cpc)), char*>::value), "");
- static_assert((std::is_same<decltype(std::strrchr(cpc, 0)), const char*>::value), "");
+// static_assert((std::is_same<decltype(std::strrchr(cpc, 0)), const char*>::value), "");
static_assert((std::is_same<decltype(std::strrchr(cp, 0)), char*>::value), "");
static_assert((std::is_same<decltype(std::strspn(cpc, cpc)), std::size_t>::value), "");
- static_assert((std::is_same<decltype(std::strstr(cpc, cpc)), const char*>::value), "");
+// static_assert((std::is_same<decltype(std::strstr(cpc, cpc)), const char*>::value), "");
static_assert((std::is_same<decltype(std::strstr(cp, cpc)), char*>::value), "");
static_assert((std::is_same<decltype(std::strtok(cp, cpc)), char*>::value), "");
static_assert((std::is_same<decltype(std::memset(vp, 0, s)), void*>::value), "");
More information about the cfe-commits
mailing list