15template <std::
size_t N>
20template <std::
size_t N>
25template <std::
size_t N>
30template <std::
size_t N>
35template <
typename... Ts>
38 std::is_same_v<Ts, char>) &&
41template <
typename... Ts>
46 thread_local std::ostringstream oss;
53template <std::
size_t N>
54[[nodiscard]]
constexpr inline std::size_t
getSize(
char (&)[N])
noexcept
59template <std::
size_t N>
60[[nodiscard]]
constexpr inline std::size_t
getSize(
const char (&)[N])
noexcept
65[[nodiscard]]
constexpr inline std::size_t
getSize(
const char* s)
noexcept
72[[nodiscard]]
constexpr inline std::size_t
getSize(
const char&)
noexcept {
return 1; }
74[[nodiscard]]
inline std::size_t
getSize(
const std::string& s)
noexcept {
return s.size(); }
76[[nodiscard]]
constexpr inline std::size_t
getSize(
const std::string_view& s)
noexcept
81template <
typename... Ts>
85 const std::size_t space = (1 + ... +
getSize(xs));
86 result.reserve(result.size() + space);
87 ((result += xs), ...);
90template <
typename... Ts>
100template <
typename Sep,
typename First,
typename... Rest>
101[[nodiscard]]
auto concat(Sep sep,
const First& first,
const Rest&... rest)
106 ((result += sep, result += rest), ...);
111template <
typename Sep,
typename First,
typename... Rest>
112[[nodiscard]]
auto concat(Sep sep,
const First& first,
const Rest&... rest)
116 thread_local std::ostringstream oss;
119 ((oss << sep << rest), ...);
Definition tile/core/algorithm/cluster_descriptor.hpp:13
auto concatInto(std::string &result, const Ts &... xs) -> std::enable_if_t< AllConvertibleToStringView< Ts... >, void >
Definition concat.hpp:82
constexpr bool AllConvertibleToStringView
Definition concat.hpp:36
auto concat(const Ts &... xs) -> std::enable_if_t<!AllConvertibleToStringView< Ts... >, std::string >
Definition concat.hpp:43
constexpr std::size_t getSize(char(&)[N]) noexcept
Definition concat.hpp:54