arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::utility::compile_time_string< Cs > Class Template Reference

#include <arg_router/utility/compile_time_string.hpp>

Classes

struct  append
 

Public Types

using array_type = std::tuple< traits::integral_constant< Cs >... >
 
template<typename T >
using append_t = typename append< T >::type
 

Public Member Functions

template<char... OtherCs>
constexpr auto operator+ ([[maybe_unused]] const compile_time_string< OtherCs... > &other) const noexcept
 

Static Public Member Functions

constexpr static std::size_t size () noexcept
 
constexpr static bool empty () noexcept
 
constexpr static std::string_view get () noexcept
 

Detailed Description

template<char... Cs>
class arg_router::utility::compile_time_string< Cs >

Compile time string.

Template Parameters
CsPack of chars

Definition at line 331 of file compile_time_string.hpp.

Member Typedef Documentation

◆ append_t

template<char... Cs>
template<typename T >
using arg_router::utility::compile_time_string< Cs >::append_t = typename append<T>::type

Helper alias for append.

Template Parameters
TString to append

Definition at line 375 of file compile_time_string.hpp.

◆ array_type

template<char... Cs>
using arg_router::utility::compile_time_string< Cs >::array_type = std::tuple<traits::integral_constant<Cs>...>

Array of characters as a type.

Definition at line 335 of file compile_time_string.hpp.

Member Function Documentation

◆ empty()

template<char... Cs>
constexpr static bool arg_router::utility::compile_time_string< Cs >::empty ( )
inlinestaticconstexprnoexcept

True if string is empty.

Returns
True if number of characters is zero

Definition at line 347 of file compile_time_string.hpp.

◆ get()

template<char... Cs>
constexpr static std::string_view arg_router::utility::compile_time_string< Cs >::get ( )
inlinestaticconstexprnoexcept

Returns the string data as a view.

Returns
View of the string data

Definition at line 353 of file compile_time_string.hpp.

◆ operator+()

template<char... Cs>
template<char... OtherCs>
constexpr auto arg_router::utility::compile_time_string< Cs >::operator+ ( [[maybe_unused] ] const compile_time_string< OtherCs... > &  other) const
inlineconstexprnoexcept

Concatentation operator.

Template Parameters
OtherCsCharacter pack from other instance
Parameters
otherInstance to concatenate (only used for CTAD)
Returns
New instance

Definition at line 384 of file compile_time_string.hpp.

◆ size()

template<char... Cs>
constexpr static std::size_t arg_router::utility::compile_time_string< Cs >::size ( )
inlinestaticconstexprnoexcept

Number of characters in string.

Returns
String size

Definition at line 341 of file compile_time_string.hpp.


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