jaulib v1.4.0-2-g788cf73
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
jau::StringLiteral< N > Class Template Reference

Static compile-time string literal storage. More...

#include <cpp_lang_util.hpp>

Collaboration diagram for jau::StringLiteral< N >:

Public Member Functions

consteval_cxx20 StringLiteral (const char(&str)[N]) noexcept
 
consteval_cxx20 StringLiteral (const StringLiteral &o) noexcept=delete
 
consteval_cxx20 StringLiteral (StringLiteral &&o) noexcept=default
 
consteval_cxx20 char const * c_str () const noexcept
 Returns c-string w/ EOS.
 
consteval_cxx20 StringLiteraloperator= (const StringLiteral &o) noexcept=delete
 
consteval_cxx20 StringLiteraloperator= (StringLiteral &&o) noexcept=default
 
consteval_cxx20 size_t size () const noexcept
 Returns string literal size w/o EOS.
 
consteval_cxx20 std::string_view view () const noexcept
 Returns string_view.
 

Public Attributes

char buf [N]
 

Detailed Description

template<size_t N>
class jau::StringLiteral< N >

Static compile-time string literal storage.

Template Parameters
Nstring length including EOS

Definition at line 526 of file cpp_lang_util.hpp.

Constructor & Destructor Documentation

◆ StringLiteral() [1/3]

template<size_t N>
consteval_cxx20 jau::StringLiteral< N >::StringLiteral ( const char(&) str[N])
inlinenoexcept

Definition at line 533 of file cpp_lang_util.hpp.

Here is the caller graph for this function:

◆ StringLiteral() [2/3]

template<size_t N>
consteval_cxx20 jau::StringLiteral< N >::StringLiteral ( const StringLiteral< N > & o)
deletenoexcept

◆ StringLiteral() [3/3]

template<size_t N>
consteval_cxx20 jau::StringLiteral< N >::StringLiteral ( StringLiteral< N > && o)
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<size_t N>
consteval_cxx20 StringLiteral & jau::StringLiteral< N >::operator= ( const StringLiteral< N > & o)
deletenoexcept

◆ operator=() [2/2]

template<size_t N>
consteval_cxx20 StringLiteral & jau::StringLiteral< N >::operator= ( StringLiteral< N > && o)
defaultnoexcept

◆ size()

template<size_t N>
consteval_cxx20 size_t jau::StringLiteral< N >::size ( ) const
inlinenoexcept

Returns string literal size w/o EOS.

Definition at line 543 of file cpp_lang_util.hpp.

◆ c_str()

template<size_t N>
consteval_cxx20 char const * jau::StringLiteral< N >::c_str ( ) const
inlinenoexcept

Returns c-string w/ EOS.

Definition at line 545 of file cpp_lang_util.hpp.

◆ view()

template<size_t N>
consteval_cxx20 std::string_view jau::StringLiteral< N >::view ( ) const
inlinenoexcept

Returns string_view.

Definition at line 547 of file cpp_lang_util.hpp.

Member Data Documentation

◆ buf

template<size_t N>
char jau::StringLiteral< N >::buf[N]

Definition at line 530 of file cpp_lang_util.hpp.


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