kblib 0.2.3
General utilities library for modern C++
kblib::detail::str_type< T, void > Struct Template Reference

Performs a natural conversion to a stringlike type. More...

#include <kblib/stringops.h>

Public Types

using type = T
 Non-arithmetic types are either already stringlike, or have no natural conversion to std::string. More...
 

Static Public Member Functions

static auto convert (T &&in) -> type
 Returns the argument unchanged. More...
 

Detailed Description

template<typename T>
struct kblib::detail::str_type< T, void >

Performs a natural conversion to a stringlike type.

A natural conversion for an arithmetic type is std::to_string. For any other type, there is no assumed transformation, so they are passed through unchanged.

Note
This is primarily an implementation detail of concat, provided in the main namespace because it might be generally useful. This partial specialization is for non-arithmetic types.

Definition at line 141 of file stringops.h.

Member Typedef Documentation

◆ type

template<typename T >
using kblib::detail::str_type< T, void >::type = T

Non-arithmetic types are either already stringlike, or have no natural conversion to std::string.

Definition at line 146 of file stringops.h.

Member Function Documentation

◆ convert()

template<typename T >
static auto kblib::detail::str_type< T, void >::convert ( T &&  in) -> type
inlinestatic

Returns the argument unchanged.

Definition at line 150 of file stringops.h.


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