arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::utility::string_view_ops Namespace Reference

Functions

template<typename CharT , typename Traits = std::char_traits<CharT>, typename Allocator = config::allocator<CharT>>
constexpr std::basic_string< CharT, Traits, Allocator > operator+ (std::basic_string< CharT, Traits, Allocator > lhs, std::basic_string_view< CharT, Traits > rhs)
 
template<typename CharT , typename Traits = std::char_traits<CharT>, typename Allocator = config::allocator<CharT>>
constexpr std::basic_string< CharT, Traits, Allocator > operator+ (std::basic_string_view< CharT, Traits > lhs, std::basic_string< CharT, Traits, Allocator > rhs)
 
template<typename CharT , typename Traits = std::char_traits<CharT>>
constexpr std::basic_string< CharT, Traits, config::allocator< CharT > > operator+ (std::basic_string_view< CharT, Traits > lhs, std::basic_string_view< CharT, Traits > rhs)
 

Detailed Description

Namespace for string_view operators.

Function Documentation

◆ operator+() [1/3]

template<typename CharT , typename Traits = std::char_traits<CharT>, typename Allocator = config::allocator<CharT>>
constexpr std::basic_string<CharT, Traits, Allocator> arg_router::utility::string_view_ops::operator+ ( std::basic_string< CharT, Traits, Allocator >  lhs,
std::basic_string_view< CharT, Traits >  rhs 
)
constexpr

Concatentation operator between string and string_view.

The returned string uses the library allocator (config::allocator) by default.

Template Parameters
CharTCharacter type
TraitsCharacter traits
AllocatorAllocator type
Parameters
lhsstring instance
rhsstring_view instance
Returns
string of lhs and rhs concatenated together

Definition at line 27 of file string_view_ops.hpp.

◆ operator+() [2/3]

template<typename CharT , typename Traits = std::char_traits<CharT>, typename Allocator = config::allocator<CharT>>
constexpr std::basic_string<CharT, Traits, Allocator> arg_router::utility::string_view_ops::operator+ ( std::basic_string_view< CharT, Traits >  lhs,
std::basic_string< CharT, Traits, Allocator >  rhs 
)
constexpr

Overload that accepts reversed arguments.

The returned string uses the library allocator (config::allocator) by default.

Template Parameters
CharTCharacter type
TraitsCharacter traits
AllocatorAllocator type
Parameters
lhsstring_view instance
rhsstring instance
Returns
string of lhs and rhs concatenated together

Definition at line 47 of file string_view_ops.hpp.

◆ operator+() [3/3]

template<typename CharT , typename Traits = std::char_traits<CharT>>
constexpr std::basic_string<CharT, Traits, config::allocator<CharT> > arg_router::utility::string_view_ops::operator+ ( std::basic_string_view< CharT, Traits >  lhs,
std::basic_string_view< CharT, Traits >  rhs 
)
constexpr

Returns a string using two string_views.

The returned string uses the library allocator (config::allocator).

Template Parameters
CharTCharacter type
TraitsCharacter traits
Parameters
lhsstring_view instance
rhsstring instance
Returns
string of lhs and rhs concatenated together

Definition at line 65 of file string_view_ops.hpp.