MRPT  2.0.4
List of all members | Public Member Functions | Private Attributes
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.

◆ 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 >::_lit.

◆ 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

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



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020