Skip to content
Snippets Groups Projects
Commit f79c39a1 authored by Christian Godenschwager's avatar Christian Godenschwager
Browse files

Work around for visual studio compiler bug

parent 46d893d5
Branches
Tags
No related merge requests found
......@@ -49,8 +49,25 @@ void seedRandomGenerator( const std::mt19937::result_type & seed ); // std::mt19
*/
//**********************************************************************************************************************
template< typename INT >
INT intRandom( const INT min = std::numeric_limits<INT>::min(), const INT max = std::numeric_limits<INT>::max(),
std::mt19937 & generator = internal::getGenerator() )
INT intRandom()
{
return intRandom( std::numeric_limits<INT>::min(), std::numeric_limits<INT>::max() );
}
template< typename INT >
INT intRandom( const INT min )
{
return intRandom( min, std::numeric_limits<INT>::max(), internal::getGenerator() );
}
template< typename INT >
INT intRandom( const INT min, const INT max )
{
return intRandom( min, max, internal::getGenerator() );
}
template< typename INT >
INT intRandom( const INT min, const INT max, std::mt19937 & generator )
{
static_assert_int_t< INT >();
static_assert(sizeof(INT) > sizeof(char), "cannot use char");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment