From 25cc1376b0b080106ee180d0cad7c13dcec8ef67 Mon Sep 17 00:00:00 2001 From: Vladimir Chebotarev Date: Fri, 12 Feb 2016 11:52:48 +0300 Subject: [PATCH] libcommon: make_array_n clarification [METR-19529] --- libs/libcommon/include/ext/make_array_n.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/libcommon/include/ext/make_array_n.hpp b/libs/libcommon/include/ext/make_array_n.hpp index a2749e21ff4..c494a186074 100644 --- a/libs/libcommon/include/ext/make_array_n.hpp +++ b/libs/libcommon/include/ext/make_array_n.hpp @@ -4,6 +4,11 @@ #include #include + +/** \brief Produces std::array of specified size, containing copies of provided object. + * Copy is performed N-1 times, and the last element is being moved. + * This helper allows to initialize std::array in place. + */ namespace ext { @@ -13,6 +18,7 @@ namespace ext template constexpr auto make_array_n_impl(T && value, std::index_sequence) { + /// Comma is used to make N-1 copies of value return std::array, size>{ (static_cast(indexes), value)..., std::forward(value) }; }