Commit 16b8be1f authored by COULAUD Olivier's avatar COULAUD Olivier

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

parent 7610d859
......@@ -132,11 +132,13 @@ public:
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...>,
inria::index_sequence<Js...>,
const Position& position,
Args... args) {
Args... args)
{
using vt = typename FBase::value_type;
constexpr auto Dim = Particle::position_t::Dim;
constexpr int missing_offset = Dim + sizeof...(args);
......
......@@ -8,6 +8,7 @@
#include <stdexcept>
#include <tuple>
#include <type_traits>
#include <utility>
#include "FOstreamTuple.hpp"
......@@ -191,7 +192,7 @@ public:
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());
}
......@@ -924,7 +925,7 @@ private:
*/
template <typename... Values>
iterator insert_impl(
const_iterator pos,
iterator pos,
size_type count,
Values&&... values)
{
......@@ -956,7 +957,7 @@ public:
* \return An iterator pointing to the inserted element
*/
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),
"Given tuple does not have the right size");
return insert_impl(pos, 1, std::get<Indices>(std::forward<ValueTuple>(values))...);
......@@ -973,7 +974,7 @@ public:
* \return An iterator pointing to the first inserted element
*/
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),
"Given tuple does not have the right size");
return insert_impl(pos, count, std::get<Indices>(std::forward<ValueTuple>(values))...);
......@@ -1036,7 +1037,7 @@ public:
template<class TupleIterator,
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 count = last - first;
......@@ -1074,7 +1075,7 @@ public:
template<class ValueIterator,
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();
while(first != last) {
insert(pos, *first);
......@@ -1183,7 +1184,7 @@ public:
*
* \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...);
}
......@@ -1291,7 +1292,7 @@ public:
template<typename... Types, std::size_t... Indices>
class variadic_vector_iterator<std::tuple<Types...>, inria::index_sequence<Indices...>>
class variadic_vector_iterator<std::tuple<Types...>, inria::index_sequence<Indices...> >
: public std::tuple<Types*...> {
using base_t = std::tuple<Types*...>;
......@@ -1304,12 +1305,13 @@ public:
using reference = std::tuple<Types&...>;
using pointer = void;
using iterator_category = std::random_access_iterator_tag;
using base_seq = inria::index_sequence<Indices...> ;
using pointer_tuple = std::tuple<Types*...>;
using typename base_t::tuple;
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){}
......
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