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 23 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
 

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 29 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

◆ operator const char *()

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

Definition at line 39 of file static_string.h.

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

◆ operator[]()

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

Definition at line 34 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 33 of file static_string.h.

Member Data Documentation

◆ _lit

template<int N>
const char(& mrpt::typemeta::string_literal< N >::_lit)[N+1]
private



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020