MRPT  1.9.9
mrpt::typemeta::string_literal< N > Class Template Reference

Detailed Description

template<int N>
class mrpt::typemeta::string_literal< N >

Examples:
typemeta_StaticString/test.cpp.

Definition at line 25 of file static_string.h.

#include <mrpt/typemeta/static_string.h>

Public Member Functions

constexpr string_literal (const char(&lit)[N+1])
 Ctor from C string literal, with trailing zero. More...
 
constexpr std::size_t size () const
 
constexpr char operator[] (int i) const
 
constexpr const char * c_str () const
 
constexpr operator const char * () const
 
 operator std::string () const
 

Private Attributes

const char(& _lit )[N+1]
 

Constructor & Destructor Documentation

◆ string_literal()

template<int N>
constexpr mrpt::typemeta::string_literal< N >::string_literal ( const char(&)  lit[N+1])
inline

Ctor from C string literal, with trailing zero.

Definition at line 31 of file static_string.h.

Member Function Documentation

◆ c_str()

template<int N>
constexpr const char* mrpt::typemeta::string_literal< N >::c_str ( ) const
inline

Definition at line 40 of file static_string.h.

References mrpt::typemeta::string_literal< N >::_lit.

Referenced by mrpt::typemeta::string_literal< N >::operator const char *().

Here is the caller graph for this function:

◆ operator const char *()

template<int N>
constexpr mrpt::typemeta::string_literal< N >::operator const char * ( ) const
inline

Definition at line 41 of file static_string.h.

References mrpt::typemeta::string_literal< N >::c_str().

Here is the call graph for this function:

◆ operator std::string()

template<int N>
mrpt::typemeta::string_literal< N >::operator std::string ( ) const
inline

Definition at line 42 of file static_string.h.

References mrpt::typemeta::string_literal< N >::_lit.

◆ operator[]()

template<int N>
constexpr char mrpt::typemeta::string_literal< N >::operator[] ( int  i) const
inline

Definition at line 36 of file static_string.h.

References mrpt::typemeta::string_literal< N >::_lit, and MRPT_X_ASSERT.

◆ size()

template<int N>
constexpr std::size_t mrpt::typemeta::string_literal< N >::size ( ) const
inline

Definition at line 35 of file static_string.h.

Member Data Documentation

◆ _lit




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019