Use std::rand() in Templates.