#include <random>
#include <algorithm>
#include <vector>
int main() {
std::vector < int > a = {1, 2, 3};
std::mt19937 generator;
std::random_shuffle(a.begin(), a.end(), generator);
}
I am trying to compile this code with g++ -std=c++0x, receiving a huge compiler dump ending with
/usr/include/c++/4.9.2/bits/random.h:546:7: note: candidate expects 0 arguments, 1 provided
Any way of doing it correctly?