simdutf 8.0.0
Unicode at GB/s.
Loading...
Searching...
No Matches
simdutf::detail::constexpr_write_ptr< SrcType, TargetType > Struct Template Reference

helper for working around reinterpret_cast not being allowed during constexpr evaluation. More...

#include <constexpr_ptr.h>

Public Member Functions

constexpr constexpr_write_ptr (TargetType *raw)
 
constexpr constexpr_write_ptr_proxy< SrcType, TargetType > operator* () const
 
constexpr constexpr_write_ptr_proxy< SrcType, TargetType > operator[] (std::ptrdiff_t n) const
 
constexpr constexpr_write_ptroperator++ ()
 
constexpr constexpr_write_ptr operator++ (int)
 
constexpr std::ptrdiff_t operator- (const constexpr_write_ptr &other) const
 

Public Attributes

TargetType * p
 

Detailed Description

template<typename SrcType, typename TargetType>
struct simdutf::detail::constexpr_write_ptr< SrcType, TargetType >

helper for working around reinterpret_cast not being allowed during constexpr evaluation.

will try to act as a SrcType* but actually write to the pointer given in the constructor, which is of another type TargetType

Definition at line 101 of file constexpr_ptr.h.

Constructor & Destructor Documentation

◆ constexpr_write_ptr()

template<typename SrcType , typename TargetType >
constexpr simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::constexpr_write_ptr ( TargetType *  raw)
inlineexplicitconstexpr

Definition at line 102 of file constexpr_ptr.h.

Member Function Documentation

◆ operator*()

template<typename SrcType , typename TargetType >
constexpr constexpr_write_ptr_proxy< SrcType, TargetType > simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::operator* ( ) const
inlineconstexpr

Definition at line 104 of file constexpr_ptr.h.

◆ operator++() [1/2]

template<typename SrcType , typename TargetType >
constexpr constexpr_write_ptr & simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::operator++ ( )
inlineconstexpr

Definition at line 113 of file constexpr_ptr.h.

◆ operator++() [2/2]

template<typename SrcType , typename TargetType >
constexpr constexpr_write_ptr simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::operator++ ( int  )
inlineconstexpr

Definition at line 118 of file constexpr_ptr.h.

◆ operator-()

template<typename SrcType , typename TargetType >
constexpr std::ptrdiff_t simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::operator- ( const constexpr_write_ptr< SrcType, TargetType > &  other) const
inlineconstexpr

Definition at line 124 of file constexpr_ptr.h.

◆ operator[]()

template<typename SrcType , typename TargetType >
constexpr constexpr_write_ptr_proxy< SrcType, TargetType > simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::operator[] ( std::ptrdiff_t  n) const
inlineconstexpr

Definition at line 109 of file constexpr_ptr.h.

Member Data Documentation

◆ p

template<typename SrcType , typename TargetType >
TargetType* simdutf::detail::constexpr_write_ptr< SrcType, TargetType >::p

Definition at line 128 of file constexpr_ptr.h.


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