ICU 64.2  64.2
Public Member Functions
icu::ConstChar16Ptr Class Referencefinal

const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. More...

#include <char16ptr.h>

Public Member Functions

 ConstChar16Ptr (const char16_t *p)
 Copies the pointer. More...
 
 ConstChar16Ptr (const uint16_t *p)
 Converts the pointer to char16_t *. More...
 
 ConstChar16Ptr (const wchar_t *p)
 Converts the pointer to char16_t *. More...
 
 ConstChar16Ptr (const std::nullptr_t p)
 nullptr constructor. More...
 
 ~ConstChar16Ptr ()
 Destructor. More...
 
const char16_t * get () const
 Pointer access. More...
 
 operator const char16_t * () const
 char16_t pointer access via type conversion (e.g., static_cast). More...
 

Detailed Description

const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.

Stable:
ICU 59

Definition at line 146 of file char16ptr.h.

Constructor & Destructor Documentation

◆ ConstChar16Ptr() [1/4]

icu::ConstChar16Ptr::ConstChar16Ptr ( const char16_t *  p)
inline

Copies the pointer.

Parameters
ppointer
Stable:
ICU 59

◆ ConstChar16Ptr() [2/4]

icu::ConstChar16Ptr::ConstChar16Ptr ( const uint16_t *  p)
inline

Converts the pointer to char16_t *.

Parameters
ppointer to be converted
Stable:
ICU 59

◆ ConstChar16Ptr() [3/4]

icu::ConstChar16Ptr::ConstChar16Ptr ( const wchar_t *  p)
inline

Converts the pointer to char16_t *.

(Only defined if U_SIZEOF_WCHAR_T==2.)

Parameters
ppointer to be converted
Stable:
ICU 59

◆ ConstChar16Ptr() [4/4]

icu::ConstChar16Ptr::ConstChar16Ptr ( const std::nullptr_t  p)
inline

nullptr constructor.

Parameters
pnullptr
Stable:
ICU 59

◆ ~ConstChar16Ptr()

icu::ConstChar16Ptr::~ConstChar16Ptr ( )
inline

Destructor.

Stable:
ICU 59

Member Function Documentation

◆ get()

const char16_t* icu::ConstChar16Ptr::get ( ) const
inline

Pointer access.

Returns
the wrapped pointer
Stable:
ICU 59

◆ operator const char16_t *()

icu::ConstChar16Ptr::operator const char16_t * ( ) const
inline

char16_t pointer access via type conversion (e.g., static_cast).

Returns
the wrapped pointer
Stable:
ICU 59

Definition at line 195 of file char16ptr.h.

References U_ALIASING_BARRIER.


The documentation for this class was generated from the following file: