I was experimenting with a toy sample
program:
map<int, char> foo { { 1, 'a' }, { 2, 'b' }, { 3, 'c' } };
vector<pair<decltype(foo)::key_type, decltype(foo)::mapped_type>> bar(size(foo));
sample(begin(foo), end(foo), begin(bar), size(foo), mt19937{ random_device{}() });
But bar
always contains the contents of foo
in order. Is this a gcc implementation problem, or am I just repeatedly getting unlucky?
Aucun commentaire:
Enregistrer un commentaire