MOS Source Code
Loading...
Searching...
No Matches
string_literal< n > Struct Template Reference

#include <type_utils.hpp>

Public Member Functions

constexpr string_literal (const char(&str)[n])
consteval char operator[] (size_t i) const noexcept
consteval const char * at (size_t i) const noexcept

Public Attributes

const size_t strlen = n
char __data [n]

Detailed Description

template<auto n>
struct mos::string_literal< n >

Definition at line 12 of file type_utils.hpp.

Constructor & Destructor Documentation

◆ string_literal()

template<auto n>
string_literal ( const char(&) str[n])
inlineconstexpr

Definition at line 14 of file type_utils.hpp.

Member Function Documentation

◆ operator[]()

template<auto n>
char operator[] ( size_t i) const
inlineconstevalnoexcept

Definition at line 19 of file type_utils.hpp.

◆ at()

template<auto n>
const char * at ( size_t i) const
inlineconstevalnoexcept

Definition at line 24 of file type_utils.hpp.

Member Data Documentation

◆ strlen

template<auto n>
const size_t strlen = n

Definition at line 29 of file type_utils.hpp.

◆ __data

template<auto n>
char __data[n]

Definition at line 30 of file type_utils.hpp.

Referenced by at(), operator[](), and string_literal().


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