diff --git a/Src/Utils/variadic_container.hpp b/Src/Utils/variadic_container.hpp index 5a610fdc03adf0725d69b852735efc455fd69b1d..3c4cd0d8e2c189c010e71bcc5621b7cba47a3f6a 100644 --- a/Src/Utils/variadic_container.hpp +++ b/Src/Utils/variadic_container.hpp @@ -18,8 +18,7 @@ struct noop_t { noop_t(const Types&...) {} }; -/// Check if allocator has a special behaviour when allocating memory for -/// contiguous multiple type arrays +/// Check whether allocator can rebind to multiple type at the same time template<typename T, typename... Types> class check_multi_allocator_rebind { @@ -135,8 +134,8 @@ public: * \return The new variadic_vector */ variadic_vector_impl(size_type count, - const value_type& value, - const allocator_type_tuple& alloc = allocator_type_tuple()) + const value_type& value, + const allocator_type_tuple& alloc = allocator_type_tuple()) : _allocator_tuple(alloc) { this->reserve(count); @@ -157,7 +156,7 @@ public: this->reserve(count); this->_size = count; for(size_type i = 0; i < count; ++i) { - noop_t((std::get<Indices>(_allocator_tuple).construct(std::get<Indices>(_data_tuple)+i), 0)... ); + noop_t{(std::get<Indices>(_allocator_tuple).construct(std::get<Indices>(_data_tuple)+i), 0)... }; } } @@ -584,7 +583,10 @@ private: * * \note Only used when the Allocator is not a multi-allocator. * - * This function works recursively. This overload will set the J_th element + * This function works recursively. The first call is assumed t + * + * + * This overload will set the J_th element * of `data_tuple` to `data_ptr` and will the advance it to the end of the * sub-array for a subsequent call. * @@ -994,6 +996,7 @@ private: return p - count; } + /** Trait that checks whether a type is a tuple of iterators or not */ template<class T> struct is_tuple_get_like { template<class U, class = decltype(std::get<0>(std::declval<U>()))> @@ -1006,7 +1009,7 @@ public: /** \brief Insert elements from a range * - * \tparam TupleIterator Iterator type convertible to a tuple of elements + * \tparam TupleIterator Iterator type convertible to a tuple of iterators * that are convertible to the elements of #value_type. * * \param pos Position before which to insert values @@ -1255,7 +1258,7 @@ public: * \return The moved iterator */ variadic_vector_iterator& operator+=(difference_type n) { - noop_t((std::get<Indices>(*this) += n)...); + noop_t{(std::get<Indices>(*this) += n)...}; return (*this); }