Files
cpp-course/modules/11_cpp17/src/if_constexpr.cpp
T

17 lines
326 B
C++
Raw Normal View History

2026-08-11 17:40:36 +03:00
#include "if_constexpr.hpp"
#include <sstream>
namespace cpp17 {
auto stringify_ints(const std::vector<int>& data) -> std::string {
2026-08-22 09:37:46 +03:00
auto oss = std::stringstream();
for (auto i = 0uz; i < data.size(); ++i) {
if (i > 0) oss << ",";
oss << data[i];
}
return oss.str();
2026-08-11 17:40:36 +03:00
}
} // namespace cpp17