to_substr() and to_csubstr() is used in generic code like format(), and allow adding construction of substrings from new types like containers.
More...
|
| substr | c4::to_substr (substr s) noexcept |
| | neutral version for use in generic code More...
|
| |
| csubstr | c4::to_csubstr (substr s) noexcept |
| | neutral version for use in generic code More...
|
| |
| csubstr | c4::to_csubstr (csubstr s) noexcept |
| | neutral version for use in generic code More...
|
| |
| template<size_t N> |
| substr | c4::to_substr (char(&s)[N]) noexcept |
| |
| template<size_t N> |
| csubstr | c4::to_csubstr (const char(&s)[N]) noexcept |
| |
| template<class U > |
| auto | c4::to_substr (U s) noexcept -> typename std::enable_if< std::is_same< U, char * >::value, substr >::type |
| |
| template<class U > |
| auto | c4::to_csubstr (U s) noexcept -> typename std::enable_if< std::is_same< U, const char * >::value||std::is_same< U, char * >::value, csubstr >::type |
| |
to_substr() and to_csubstr() is used in generic code like format(), and allow adding construction of substrings from new types like containers.
◆ to_substr() [1/3]
| substr c4::to_substr |
( |
substr |
s | ) |
|
|
inlinenoexcept |
neutral version for use in generic code
Definition at line 2208 of file substr.hpp.
◆ to_csubstr() [1/4]
| csubstr c4::to_csubstr |
( |
substr |
s | ) |
|
|
inlinenoexcept |
neutral version for use in generic code
Definition at line 2210 of file substr.hpp.
2210 {
return csubstr{s.str, s.len}; }
◆ to_csubstr() [2/4]
| csubstr c4::to_csubstr |
( |
csubstr |
s | ) |
|
|
inlinenoexcept |
neutral version for use in generic code
Definition at line 2212 of file substr.hpp.
◆ to_substr() [2/3]
template<size_t N>
| substr c4::to_substr |
( |
char(&) |
s[N] | ) |
|
|
inlinenoexcept |
Definition at line 2215 of file substr.hpp.
2217 return substr(s, N-1);
◆ to_csubstr() [3/4]
template<size_t N>
| csubstr c4::to_csubstr |
( |
const char(&) |
s[N] | ) |
|
|
inlinenoexcept |
Definition at line 2219 of file substr.hpp.
2221 return csubstr(s, N-1);
◆ to_substr() [3/3]
template<class U >
| auto c4::to_substr |
( |
U |
s | ) |
-> typename std::enable_if<std::is_same<U, char*>::value, substr>::type
|
|
inlinenoexcept |
◆ to_csubstr() [4/4]
template<class U >
| auto c4::to_csubstr |
( |
U |
s | ) |
-> typename std::enable_if<std::is_same<U, const char*>::value || std::is_same<U, char*>::value, csubstr>::type
|
|
inlinenoexcept |