Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit d00bda58 authored by Quentin Khan's avatar Quentin Khan
Browse files

variadic_vector_iterator: type definitions conform to std random iterator

parent 48f3bfa7
......@@ -1222,8 +1222,12 @@ class variadic_vector_iterator<std::tuple<Types...>, std::index_sequence<Indices
public:
using difference_type = std::ptrdiff_t;
using value_type = std::tuple<Types...>;
using reference = std::tuple<Types&...>;
using pointer = void;
using iterator_category = std::random_access_iterator_tag;
using pointer_tuple = std::tuple<Types*...>;
using reference_tuple = std::tuple<Types&...>;
using base_t::base_t;
......@@ -1359,8 +1363,8 @@ public:
*
* \return A tuple of references to the values of the pointer element
*/
reference_tuple operator*() {
return reference_tuple(*std::get<Indices>(*this)...);
reference operator*() {
return reference(*std::get<Indices>(*this)...);
}
/** \brief Shifted dereference operator
......@@ -1369,7 +1373,7 @@ public:
*
* \return A tuple of references to the values of the pointer element
*/
reference_tuple operator[](difference_type n) {
reference operator[](difference_type n) {
return *(*this + n);
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment