Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 16b8be1f authored by Olivier COULAUD's avatar Olivier COULAUD
Browse files

Fux bug with clang-5.0 still some compilation errors occur and some tests are failed

parent 7610d859
No related branches found
No related tags found
No related merge requests found
...@@ -132,11 +132,13 @@ public: ...@@ -132,11 +132,13 @@ public:
position, args...); position, args...);
} }
template<typename Position, typename... Args, std::size_t... Is, std::size_t... Js, typename... Ts> template<typename Position, typename... Args, std::size_t... Is,
std::size_t... Js, typename... Ts >
void push_impl(inria::index_sequence<Is...>, void push_impl(inria::index_sequence<Is...>,
inria::index_sequence<Js...>, inria::index_sequence<Js...>,
const Position& position, const Position& position,
Args... args) { Args... args)
{
using vt = typename FBase::value_type; using vt = typename FBase::value_type;
constexpr auto Dim = Particle::position_t::Dim; constexpr auto Dim = Particle::position_t::Dim;
constexpr int missing_offset = Dim + sizeof...(args); constexpr int missing_offset = Dim + sizeof...(args);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdexcept> #include <stdexcept>
#include <tuple> #include <tuple>
#include <type_traits> #include <type_traits>
#include <utility>
#include "FOstreamTuple.hpp" #include "FOstreamTuple.hpp"
...@@ -191,7 +192,7 @@ public: ...@@ -191,7 +192,7 @@ public:
this->assign(first, last); this->assign(first, last);
} }
variadic_vector_impl(const variadic_vector_impl& other) { variadic_vector_impl( variadic_vector_impl& other) {
this->assign(other.begin(), other.end()); this->assign(other.begin(), other.end());
} }
...@@ -924,7 +925,7 @@ private: ...@@ -924,7 +925,7 @@ private:
*/ */
template <typename... Values> template <typename... Values>
iterator insert_impl( iterator insert_impl(
const_iterator pos, iterator pos,
size_type count, size_type count,
Values&&... values) Values&&... values)
{ {
...@@ -956,7 +957,7 @@ public: ...@@ -956,7 +957,7 @@ public:
* \return An iterator pointing to the inserted element * \return An iterator pointing to the inserted element
*/ */
template <typename ValueTuple> template <typename ValueTuple>
iterator insert(const_iterator pos, ValueTuple&& values) { iterator insert(iterator pos, ValueTuple&& values) {
static_assert(std::tuple_size<std::decay_t<ValueTuple>>::value == sizeof...(Indices), static_assert(std::tuple_size<std::decay_t<ValueTuple>>::value == sizeof...(Indices),
"Given tuple does not have the right size"); "Given tuple does not have the right size");
return insert_impl(pos, 1, std::get<Indices>(std::forward<ValueTuple>(values))...); return insert_impl(pos, 1, std::get<Indices>(std::forward<ValueTuple>(values))...);
...@@ -973,7 +974,7 @@ public: ...@@ -973,7 +974,7 @@ public:
* \return An iterator pointing to the first inserted element * \return An iterator pointing to the first inserted element
*/ */
template <typename ValueTuple> template <typename ValueTuple>
iterator insert(const_iterator pos, size_type count, ValueTuple&& values) { iterator insert(iterator pos, size_type count, ValueTuple&& values) {
static_assert(std::tuple_size<std::decay_t<ValueTuple>>::value == sizeof...(Indices), static_assert(std::tuple_size<std::decay_t<ValueTuple>>::value == sizeof...(Indices),
"Given tuple does not have the right size"); "Given tuple does not have the right size");
return insert_impl(pos, count, std::get<Indices>(std::forward<ValueTuple>(values))...); return insert_impl(pos, count, std::get<Indices>(std::forward<ValueTuple>(values))...);
...@@ -1036,7 +1037,7 @@ public: ...@@ -1036,7 +1037,7 @@ public:
template<class TupleIterator, template<class TupleIterator,
typename std::enable_if<is_tuple_get_like<TupleIterator>::value, char>::type = 0 typename std::enable_if<is_tuple_get_like<TupleIterator>::value, char>::type = 0
> >
iterator insert(const_iterator pos, TupleIterator first, TupleIterator last) { iterator insert(iterator pos, TupleIterator first, TupleIterator last) {
size_type pos_idx = pos - this->begin(); size_type pos_idx = pos - this->begin();
size_type count = last - first; size_type count = last - first;
...@@ -1074,7 +1075,7 @@ public: ...@@ -1074,7 +1075,7 @@ public:
template<class ValueIterator, template<class ValueIterator,
typename std::enable_if<! is_tuple_get_like<ValueIterator>::value, char>::type = 0 typename std::enable_if<! is_tuple_get_like<ValueIterator>::value, char>::type = 0
> >
iterator insert(const_iterator pos, ValueIterator first, ValueIterator last) { iterator insert(iterator pos, ValueIterator first, ValueIterator last) {
auto ret_offset = pos - this->cbegin(); auto ret_offset = pos - this->cbegin();
while(first != last) { while(first != last) {
insert(pos, *first); insert(pos, *first);
...@@ -1183,7 +1184,7 @@ public: ...@@ -1183,7 +1184,7 @@ public:
* *
* \param values Values to insert into the sub-arrays * \param values Values to insert into the sub-arrays
*/ */
void push_back(const Types&... values) { void push_back(Types const&... values) {
this->insert_impl(this->end(), 1, values...); this->insert_impl(this->end(), 1, values...);
} }
...@@ -1304,12 +1305,13 @@ public: ...@@ -1304,12 +1305,13 @@ public:
using reference = std::tuple<Types&...>; using reference = std::tuple<Types&...>;
using pointer = void; using pointer = void;
using iterator_category = std::random_access_iterator_tag; using iterator_category = std::random_access_iterator_tag;
using base_seq = inria::index_sequence<Indices...> ;
using pointer_tuple = std::tuple<Types*...>; using pointer_tuple = std::tuple<Types*...>;
using typename base_t::tuple; using typename base_t::tuple;
variadic_vector_iterator(base_t tup_in) : base_t(tup_in){} variadic_vector_iterator(base_t tup_in) : base_t(tup_in){}
variadic_vector_iterator(base_t tup_in, base_seq t) : base_t(tup_in){}
/* /*
*/ */
// variadic_vector_iterator(base_t tup_in):(tup_in){} // variadic_vector_iterator(base_t tup_in):(tup_in){}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment