From 75221d012453a9ee2798a026198b61a0b8e3130b Mon Sep 17 00:00:00 2001 From: studiosi Date: Sat, 22 Aug 2026 09:37:46 +0300 Subject: [PATCH] Solved: 39 - If Constexpr --- modules/11_cpp17/src/if_constexpr.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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