jeudi 1 décembre 2016

How to assign an array with move in one line?

For example

using namespace std;

array<vector<int>, 3> a;
vector<int> v0, v1, v2;

// assign with move
a[0] = move(v0);
a[1] = move(v1);
a[2] = move(v2);

How to use one line to implement the assignment like a = {v0, v1, v2}?

Aucun commentaire:

Enregistrer un commentaire