libstdc++: Improve comment on _Power_of_2 helper function
libstdc++-v3/ChangeLog: * include/bits/uniform_int_dist.h (__detail::_Power_of_2): Document that true result for zero is intentional.
This commit is contained in:
parent
ff4bfb1553
commit
b2b8516373
1 changed files with 3 additions and 1 deletions
|
@ -56,7 +56,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
|
||||
namespace __detail
|
||||
{
|
||||
/* Determine whether number is a power of 2. */
|
||||
// Determine whether number is a power of two.
|
||||
// This is true for zero, which is OK because we want _Power_of_2(n+1)
|
||||
// to be true if n==numeric_limits<_Tp>::max() and so n+1 wraps around.
|
||||
template<typename _Tp>
|
||||
constexpr bool
|
||||
_Power_of_2(_Tp __x)
|
||||
|
|
Loading…
Add table
Reference in a new issue