repr 0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
librepr::const_string< N > Struct Template Reference

#include <const_string.h>

Collaboration diagram for librepr::const_string< N >:
[legend]

Public Member Functions

constexpr const_string ()=default
 
constexpr explicit (false) const _string(char const (&literal)[N+1])
 
constexpr const_string (std::string_view data)
 
constexpr operator char const * () const noexcept
 
constexpr auto to_sv () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr char constoperator[] (std::size_t Idx) const
 

Public Attributes

char value [N+1] {}
 

Static Public Attributes

static constexpr auto size = N
 

Friends

constexpr auto operator== (const_string lhs, std::string_view rhs) noexcept
 

Constructor & Destructor Documentation

◆ const_string() [1/2]

template<std::size_t N>
constexpr librepr::const_string< N >::const_string ( )
constexprdefault

◆ const_string() [2/2]

template<std::size_t N>
constexpr librepr::const_string< N >::const_string ( std::string_view  data)
inlineexplicitconstexpr

Member Function Documentation

◆ empty()

template<std::size_t N>
constexpr bool librepr::const_string< N >::empty ( ) const
inlineconstexprnoexcept

◆ explicit()

template<std::size_t N>
constexpr librepr::const_string< N >::explicit ( false  ) )[N+1] const &
inlineconstexpr

◆ operator char const *()

template<std::size_t N>
constexpr librepr::const_string< N >::operator char const * ( ) const
inlineexplicitconstexprnoexcept

◆ operator[]()

template<std::size_t N>
constexpr char const & librepr::const_string< N >::operator[] ( std::size_t  Idx) const
inlineconstexpr

◆ to_sv()

template<std::size_t N>
constexpr auto librepr::const_string< N >::to_sv ( ) const
inlineconstexprnoexcept

Friends And Related Symbol Documentation

◆ operator==

template<std::size_t N>
constexpr auto operator== ( const_string< N lhs,
std::string_view  rhs 
)
friend

Member Data Documentation

◆ size

template<std::size_t N>
constexpr auto librepr::const_string< N >::size = N
staticconstexpr

◆ value

template<std::size_t N>
char librepr::const_string< N >::value[N+1] {}

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