An ampersand before a variable gives you the address of that variable
int a = 3;
std::cout << &a << std::endl; // 0x12345678 or similar
An ampersand after a type makes that a reference type
int& b = a;
std::cout << b << std::endl; // 3
a = 4;
std::cout << b << std::endl; // 4
boost::mt19937
is a type, so boost::mt19937&
is a reference type to boost::mt19937
. Putting the ampersand before (&boost::mt19937
) doesn't make sense because you cannot get the address of a type.