I am relatively new to boost, so I believe this is an easy problem:
Given, say a fusion::vector<int, int, int>
, I need a good way to turn it into an array<int, 3>
.
You can just use the builtin adaption of array<>
(std or boost) and copy
:
#include <boost/fusion/include/copy.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/adapted/boost_array.hpp>
#include <boost/array.hpp>
using namespace boost;
int main() {
fusion::vector<int, int, int> fv(1,2,3);
array<int, 3> arr;
fusion::copy(fv, arr);
}