Seleccione un subconjunto aleatorio exclusivo de un conjunto de valores únicos

C ++. Visual Studio 2010.

Tengo unstd::vector V de N elementos únicos pesad estructuras). ¿Cómo puede elegir eficientemente M elementos aleatorios y únicos de él?

P.ej. V contiene 10 elementos: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} y elijo tres ...

4, 0, 9 0, 7, 8Pero NO esto: 0, 5, 5 <--- ¡no es único!

e prefiere @STL. Entonces, ¿algo como esto?

std::minstd_rand gen; // linear congruential engine??
std::uniform_int<int> unif(0, v.size() - 1);
gen.seed((unsigned int)time(NULL));

// ...?

// Or is there a good solution using std::random_shuffle for heavy objects?