mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 13:35:32 +00:00
ICU-12766 aix/escaper: WIP. bring back std::nullptr_t!
X-SVN-Rev: 39820
This commit is contained in:
parent
967bf42d24
commit
f98c39a60f
3 changed files with 6 additions and 16 deletions
|
@ -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
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -487,9 +487,10 @@
|
|||
#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
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue