]> granicus.if.org Git - icu/commitdiff
ICU-12766 aix/escaper: WIP. bring back std::nullptr_t!
authorSteven R. Loomis <srl@icu-project.org>
Wed, 15 Mar 2017 17:34:55 +0000 (17:34 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Wed, 15 Mar 2017 17:34:55 +0000 (17:34 +0000)
X-SVN-Rev: 39820

icu4c/source/Doxyfile.in
icu4c/source/common/unicode/char16ptr.h
icu4c/source/common/unicode/platform.h

index ec08ddd618aa401d4f900540bafcd79d7dc62157..65e7714c498e807baec4fd332353f44d8e8dbbb1 100644 (file)
@@ -194,7 +194,7 @@ EXPAND_ONLY_PREDEF     = YES
 SEARCH_INCLUDES        = YES
 INCLUDE_PATH           = 
 INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = U_EXPORT2= U_STABLE= U_DRAFT= U_INTERNAL= U_SYSTEM= U_DEPRECATED= U_OBSOLETE= U_CALLCONV= U_CDECL_BEGIN= U_CDECL_END=  U_NO_THROW=\ "U_NAMESPACE_BEGIN=namespace icu{" "U_NAMESPACE_END=}" U_SHOW_CPLUSPLUS_API=1 U_DEFINE_LOCAL_OPEN_POINTER()= U_IN_DOXYGEN=1 U_OVERRIDE= U_FINAL= UCONFIG_ENABLE_PLUGINS=1 U_CHAR16_IS_TYPEDEF=0 U_CPLUSPLUS_VERSION=11 U_NO_NULLPTR_T=0
+PREDEFINED             = U_EXPORT2= U_STABLE= U_DRAFT= U_INTERNAL= U_SYSTEM= U_DEPRECATED= U_OBSOLETE= U_CALLCONV= U_CDECL_BEGIN= U_CDECL_END=  U_NO_THROW=\ "U_NAMESPACE_BEGIN=namespace icu{" "U_NAMESPACE_END=}" U_SHOW_CPLUSPLUS_API=1 U_DEFINE_LOCAL_OPEN_POINTER()= U_IN_DOXYGEN=1 U_OVERRIDE= U_FINAL= UCONFIG_ENABLE_PLUGINS=1 U_CHAR16_IS_TYPEDEF=0 U_CPLUSPLUS_VERSION=11
 EXPAND_AS_DEFINED      = 
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
index 018cb2e6d6056622bf436d792c82f49e4408a2aa..a5c89316c40769838b3a13002191e2b1850348b7 100644 (file)
@@ -59,14 +59,12 @@ public:
      */
     inline Char16Ptr(wchar_t *p);
 #endif
-#if !U_NO_NULLPTR_T
     /**
      * nullptr constructor.
      * @param p nullptr
      * @draft ICU 59
      */
     inline Char16Ptr(std::nullptr_t p);
-#endif
     /**
      * Destructor.
      * @draft ICU 59
@@ -114,9 +112,7 @@ Char16Ptr::Char16Ptr(uint16_t *p) : p(cast(p)) {}
 #if U_SIZEOF_WCHAR_T==2
 Char16Ptr::Char16Ptr(wchar_t *p) : p(cast(p)) {}
 #endif
-#if !U_NO_NULLPTR_T
 Char16Ptr::Char16Ptr(std::nullptr_t p) : p(p) {}
-#endif
 Char16Ptr::~Char16Ptr() {
     U_ALIASING_BARRIER(p);
 }
@@ -132,9 +128,7 @@ Char16Ptr::Char16Ptr(uint16_t *p) { u.up = p; }
 #if U_SIZEOF_WCHAR_T==2
 Char16Ptr::Char16Ptr(wchar_t *p) { u.wp = p; }
 #endif
-#if !U_NO_NULLPTR_T
 Char16Ptr::Char16Ptr(std::nullptr_t p) { u.cp = p; }
-#endif
 Char16Ptr::~Char16Ptr() {}
 
 char16_t *Char16Ptr::get() const { return u.cp; }
@@ -170,14 +164,13 @@ public:
      */
     inline ConstChar16Ptr(const wchar_t *p);
 #endif
-#if !U_NO_NULLPTR_T
     /**
      * nullptr constructor.
      * @param p nullptr
      * @draft ICU 59
      */
     inline ConstChar16Ptr(const std::nullptr_t p);
-#endif
+
     /**
      * Destructor.
      * @draft ICU 59
@@ -225,9 +218,7 @@ ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) : p(cast(p)) {}
 #if U_SIZEOF_WCHAR_T==2
 ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) : p(cast(p)) {}
 #endif
-#if !U_NO_NULLPTR_T
 ConstChar16Ptr::ConstChar16Ptr(const std::nullptr_t p) : p(p) {}
-#endif
 ConstChar16Ptr::~ConstChar16Ptr() {
     U_ALIASING_BARRIER(p);
 }
@@ -243,9 +234,7 @@ ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) { u.up = p; }
 #if U_SIZEOF_WCHAR_T==2
 ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) { u.wp = p; }
 #endif
-#if !U_NO_NULLPTR_T
 ConstChar16Ptr::ConstChar16Ptr(const std::nullptr_t p) { u.cp = p; }
-#endif
 ConstChar16Ptr::~ConstChar16Ptr() {}
 
 const char16_t *ConstChar16Ptr::get() const { return u.cp; }
index 85371c9740cb93885b79bbc2464649050e835d1d..41b363093cc1c2d2371d07023193a3fab6c6a846 100644 (file)
 #endif
 
 #if (U_PLATFORM == U_PF_AIX) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11)
-# define U_NO_NULLPTR_T 1
-#else
-# define U_NO_NULLPTR_T 0
+// add in std::nullptr_t
+namespace std {
+  typedef decltype(nullptr) nullptr_t;
+};
 #endif
 
 /**