23template <
typename ContainerType>
25 &&
requires(ContainerType c) {
26 typename ContainerType::value_type;
35template <
typename ValueType,
typename StringConverterType>
37 std::invoke_result_t<StringConverterType, ValueType>,
52template <range_container ContainerType,
typename StringConverterType>
54 typename ContainerType::value_type,
57 const ContainerType& container,
58 const std::string& value_separator,
62 if (container.empty()) {
65 return std::ranges::fold_left(
66 std::ranges::next(std::ranges::begin(container)),
67 std::ranges::end(container),
69 [&](
const auto& left,
const auto& right) {
70 return left + value_separator
80template <
typename ContainerType>
82 && std::default_initializable<ContainerType>
84 typename ContainerType::value_type,
85 std::filesystem::path>
86 &&
requires(ContainerType c, std::filesystem::path p) {
89 typename ContainerType::value_type;
102 const std::string& separator =
", "
108 [](
const std::filesystem::path& path) {
109 return path.string();
The file_container concept specifies the requirements of a container which can be used as a file cont...
Definition utility.hpp:81
Define requirements for a range container.
Definition utility.hpp:24
Define requirements for a string converter.
Definition utility.hpp:36
std::string to_string(const ContainerType &container, const std::string &value_separator, StringConverterType string_converter)
Convert any container to string using the string_converter.
Definition utility.hpp:56