simdutf 9.3.3
Unicode at GB/s.
Loading...
Searching...
No Matches
simdutf::detail::constexpr_ptr< to, from > Struct Template Reference

The constexpr_ptr class is a workaround for reinterpret_cast not being allowed during constant evaluation. More...

#include <constexpr_ptr.h>

Public Member Functions

constexpr constexpr_ptr (const from *ptr) noexcept
constexpr to operator* () const noexcept
constexpr constexpr_ptr & operator++ () noexcept
constexpr constexpr_ptr operator++ (int) noexcept
constexpr constexpr_ptr & operator-- () noexcept
constexpr constexpr_ptr operator-- (int) noexcept
constexpr constexpr_ptr & operator+= (std::ptrdiff_t n) noexcept
constexpr constexpr_ptr & operator-= (std::ptrdiff_t n) noexcept
constexpr constexpr_ptr operator+ (std::ptrdiff_t n) const noexcept
constexpr constexpr_ptr operator- (std::ptrdiff_t n) const noexcept
constexpr std::ptrdiff_t operator- (const constexpr_ptr &o) const noexcept
constexpr to operator[] (std::ptrdiff_t n) const noexcept
constexpr operator const void * () const noexcept

Public Attributes

const from * p

Detailed Description

template<typename to, typename from>
requires (sizeof(to) == sizeof(from))
struct simdutf::detail::constexpr_ptr< to, from >

The constexpr_ptr class is a workaround for reinterpret_cast not being allowed during constant evaluation.

Definition at line 14 of file constexpr_ptr.h.

Constructor & Destructor Documentation

◆ constexpr_ptr()

template<typename to, typename from>
simdutf::detail::constexpr_ptr< to, from >::constexpr_ptr ( const from * ptr)
inlineexplicitconstexprnoexcept

Definition at line 17 of file constexpr_ptr.h.

Member Function Documentation

◆ operator const void *()

template<typename to, typename from>
simdutf::detail::constexpr_ptr< to, from >::operator const void * ( ) const
inlineconstexprnoexcept

Definition at line 71 of file constexpr_ptr.h.

◆ operator*()

template<typename to, typename from>
to simdutf::detail::constexpr_ptr< to, from >::operator* ( ) const
inlineconstexprnoexcept

Definition at line 19 of file constexpr_ptr.h.

◆ operator+()

template<typename to, typename from>
constexpr_ptr simdutf::detail::constexpr_ptr< to, from >::operator+ ( std::ptrdiff_t n) const
inlineconstexprnoexcept

Definition at line 53 of file constexpr_ptr.h.

◆ operator++() [1/2]

template<typename to, typename from>
constexpr_ptr & simdutf::detail::constexpr_ptr< to, from >::operator++ ( )
inlineconstexprnoexcept

Definition at line 21 of file constexpr_ptr.h.

◆ operator++() [2/2]

template<typename to, typename from>
constexpr_ptr simdutf::detail::constexpr_ptr< to, from >::operator++ ( int )
inlineconstexprnoexcept

Definition at line 26 of file constexpr_ptr.h.

◆ operator+=()

template<typename to, typename from>
constexpr_ptr & simdutf::detail::constexpr_ptr< to, from >::operator+= ( std::ptrdiff_t n)
inlineconstexprnoexcept

Definition at line 43 of file constexpr_ptr.h.

◆ operator-() [1/2]

template<typename to, typename from>
std::ptrdiff_t simdutf::detail::constexpr_ptr< to, from >::operator- ( const constexpr_ptr< to, from > & o) const
inlineconstexprnoexcept

Definition at line 61 of file constexpr_ptr.h.

◆ operator-() [2/2]

template<typename to, typename from>
constexpr_ptr simdutf::detail::constexpr_ptr< to, from >::operator- ( std::ptrdiff_t n) const
inlineconstexprnoexcept

Definition at line 57 of file constexpr_ptr.h.

◆ operator--() [1/2]

template<typename to, typename from>
constexpr_ptr & simdutf::detail::constexpr_ptr< to, from >::operator-- ( )
inlineconstexprnoexcept

Definition at line 32 of file constexpr_ptr.h.

◆ operator--() [2/2]

template<typename to, typename from>
constexpr_ptr simdutf::detail::constexpr_ptr< to, from >::operator-- ( int )
inlineconstexprnoexcept

Definition at line 37 of file constexpr_ptr.h.

◆ operator-=()

template<typename to, typename from>
constexpr_ptr & simdutf::detail::constexpr_ptr< to, from >::operator-= ( std::ptrdiff_t n)
inlineconstexprnoexcept

Definition at line 48 of file constexpr_ptr.h.

◆ operator[]()

template<typename to, typename from>
to simdutf::detail::constexpr_ptr< to, from >::operator[] ( std::ptrdiff_t n) const
inlineconstexprnoexcept

Definition at line 65 of file constexpr_ptr.h.

Member Data Documentation

◆ p

template<typename to, typename from>
const from* simdutf::detail::constexpr_ptr< to, from >::p

Definition at line 15 of file constexpr_ptr.h.


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