mirror of https://github.com/CGAL/cgal
Random_numbers: Add overload for unifoem_smallint
This commit is contained in:
parent
a7a4966de8
commit
ffcdb79bb6
|
|
@ -84,6 +84,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
|
||||
template <typename IntType>
|
||||
IntType
|
||||
uniform_smallint(IntType lower, IntType upper)
|
||||
|
|
@ -95,6 +96,16 @@ public:
|
|||
return generator();
|
||||
}
|
||||
|
||||
// Overload to avoid a warning with VC++
|
||||
template <>
|
||||
inline
|
||||
std::size_t
|
||||
uniform_smallint(std::size_t lower, std::size_t upper)
|
||||
{
|
||||
return uniform_smallint(static_cast<boost::rand48::result_type>(lower),
|
||||
static_cast<boost::rand48::result_type>(upper));
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
IntType
|
||||
uniform_smallint(IntType lower)
|
||||
|
|
|
|||
Loading…
Reference in New Issue