Sfoglia il codice sorgente

Move nullptr_t to unversioned namespace: Sean Hunt

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132665 91177308-0d34-0410-b5e6-96231b3b80d8
Howard Hinnant 14 anni fa
parent
commit
c28dbeee52
1 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. 9 4
      include/cstddef

+ 9 - 4
include/cstddef

@@ -84,12 +84,17 @@ inline _LIBCPP_ALWAYS_INLINE nullptr_t __get_nullptr_t() {return nullptr_t(0);}
 
 #define nullptr _STD::__get_nullptr_t()
 
-#else  // _LIBCPP_HAS_NO_NULLPTR
-
-typedef decltype(nullptr) nullptr_t;
-
 #endif  // _LIBCPP_HAS_NO_NULLPTR
 
 _LIBCPP_END_NAMESPACE_STD
 
+#ifndef _LIBCPP_HAS_NO_NULLPTR
+
+namespace std
+{
+    typedef decltype(nullptr) nullptr_t;
+}
+
+#endif  // _LIBCPP_HAS_NO_NULLPTR
+
 #endif  // _LIBCPP_CSTDDEF