ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions
icu::Char16Ptr Class Referencefinal

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

`#include <char16ptr.h>`

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

## Detailed Description

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

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 39 of file char16ptr.h.

## Constructor & Destructor Documentation

icu::Char16Ptr::Char16Ptr | ( | char16_t * | p | ) |
| inline

Copies the pointer.

Parameters

  p | pointer

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 126 of file char16ptr.h.

icu::Char16Ptr::Char16Ptr | ( | uint16_t * | p | ) |
| inline

Converts the pointer to char16_t *.

Parameters

  p | pointer to be converted

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 128 of file char16ptr.h.

icu::Char16Ptr::Char16Ptr | ( | wchar_t * | p | ) |
| inline

Converts the pointer to char16_t *.

(Only defined if U_SIZEOF_WCHAR_T==2.)

Parameters

  p | pointer to be converted

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

icu::Char16Ptr::Char16Ptr | ( | std::nullptr_t | p | ) |
| inline

nullptr constructor.

Parameters

  p | nullptr

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 133 of file char16ptr.h.

icu::Char16Ptr::~Char16Ptr | ( |  | ) |
| inline

Destructor.

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 134 of file char16ptr.h.

## Member Function Documentation

char16_t * icu::Char16Ptr::get | ( |  | ) | const
| inline

Pointer access.

Returns
  the wrapped pointer

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 136 of file char16ptr.h.

icu::Char16Ptr::operator char16_t * | ( |  | ) | const
| inline

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

Returns
  the wrapped pointer

Draft:
  This API may be changed in the future versions and was introduced in ICU 59

Definition at line 87 of file char16ptr.h.

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

- char16ptr.h