hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
static_str< N > Class Template Reference

#include <magic_enum.h>

Public Member Functions

constexpr static_str (str_view str) noexcept
 
constexpr static_str (string_view str) noexcept
 
constexpr const char_typedata () const noexcept
 
constexpr std::uint16_t size () const noexcept
 
constexpr operator string_view () const noexcept
 

Private Member Functions

template<std::uint16_t... I>
constexpr static_str (const char *str, std::integer_sequence< std::uint16_t, I... >) noexcept
 
template<std::uint16_t... I>
constexpr static_str (string_view str, std::integer_sequence< std::uint16_t, I... >) noexcept
 

Private Attributes

char_type chars_ [static_cast< std::size_t >(N)+1]
 

Detailed Description

template<std::uint16_t N>
class magic_enum::detail::static_str< N >

Definition at line 257 of file magic_enum.h.

Constructor & Destructor Documentation

◆ static_str() [1/4]

template<std::uint16_t N>
constexpr static_str ( str_view  str)
inlineexplicitconstexprnoexcept

Definition at line 259 of file magic_enum.h.

◆ static_str() [2/4]

template<std::uint16_t N>
constexpr static_str ( string_view  str)
inlineexplicitconstexprnoexcept

Definition at line 263 of file magic_enum.h.

References static_str< N >::data().

Here is the call graph for this function:

◆ static_str() [3/4]

template<std::uint16_t N>
template<std::uint16_t... I>
constexpr static_str ( const char *  str,
std::integer_sequence< std::uint16_t, I... >   
)
inlineconstexprprivatenoexcept

Definition at line 275 of file magic_enum.h.

◆ static_str() [4/4]

template<std::uint16_t N>
template<std::uint16_t... I>
constexpr static_str ( string_view  str,
std::integer_sequence< std::uint16_t, I... >   
)
inlineconstexprprivatenoexcept

Definition at line 278 of file magic_enum.h.

Member Function Documentation

◆ data()

template<std::uint16_t N>
constexpr const char_type * data ( ) const
inlineconstexprnoexcept

Definition at line 267 of file magic_enum.h.

References static_str< N >::chars_.

Referenced by static_str< N >::operator string_view(), and static_str< N >::static_str().

Here is the caller graph for this function:

◆ operator string_view()

template<std::uint16_t N>
constexpr operator string_view ( ) const
inlineconstexprnoexcept

Definition at line 271 of file magic_enum.h.

References static_str< N >::data(), and static_str< N >::size().

Here is the call graph for this function:

◆ size()

template<std::uint16_t N>
constexpr std::uint16_t size ( ) const
inlineconstexprnoexcept

Definition at line 269 of file magic_enum.h.

Referenced by magic_enum::detail::enum_name(), static_str< N >::operator string_view(), and magic_enum::detail::type_name().

Here is the caller graph for this function:

Member Data Documentation

◆ chars_

template<std::uint16_t N>
char_type chars_[static_cast< std::size_t >(N)+1]
private

Definition at line 280 of file magic_enum.h.

Referenced by static_str< N >::data().


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