coin-au-carre / MultiDimGrid

An efficient C++14 multi dimensional array container
18 stars 3 forks source link

Start to enable c++11 support. #1

Closed daviddoria closed 8 years ago

daviddoria commented 8 years ago

Here are a few of the required changes. I'm stuck on this error:

    reference operator[] (const ArrayCoord& coord) { 
        return values_[flatten(
            coord.begin(), coord.end(), std_support::index_sequence<DIMS...>{})];
    }
/home/doriad/src/MultiDimGrid/multidim_grid.hpp:100: error: no matching function for call to 'flatten(std::array<long unsigned int, 3ul>::const_iterator, std::array<long unsigned int, 3ul>::const_iterator, std_support::index_sequence<4, 2, 3>)'
             coord.begin(), coord.end(), std_support::index_sequence<DIMS...>{})];
                                                                           ^

It sounds like the template deduction fails because: /home/doriad/src/MultiDimGrid/multidim_grid.hpp:100: note: 'std_support::index_sequence<4, 2, 3>' is not derived from 'std_support::index_sequence<D0>'

Any suggestions?