diff --git a/modules/11_cpp17/src/if_constexpr.cpp b/modules/11_cpp17/src/if_constexpr.cpp index 71acf71..3c18314 100644 --- a/modules/11_cpp17/src/if_constexpr.cpp +++ b/modules/11_cpp17/src/if_constexpr.cpp @@ -5,8 +5,12 @@ namespace cpp17 { auto stringify_ints(const std::vector& data) -> std::string { - (void)data; - return {}; + auto oss = std::stringstream(); + for (auto i = 0uz; i < data.size(); ++i) { + if (i > 0) oss << ","; + oss << data[i]; + } + return oss.str(); } } // namespace cpp17