Opened 10 years ago
Closed 10 years ago
#7966 closed Bugs (fixed)
static_assert: doc: nitpicking
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | static_assert |
| Version: | Boost 1.52.0 | Severity: | Cosmetic |
| Keywords: | doc | Cc: |
Description
The following patch is really cosmetic. The doc reads:
BOOST_STATIC_ASSERT((std::numeric_limits<UnsignedInt>::digits >= 16)
&& std::numeric_limits<UnsignedInt>::is_specialized
&& std::numeric_limits<UnsignedInt>::is_integer
&& !std::numeric_limits<UnsignedInt>::is_signed);
It does not make much sense, imho, to check is_specialized _after_ having already use digits. I know all this is meant to fail, but it makes more sense to check is_specialized first, and the number of digits after we know this is an unsigned int. (FWIW, I would use four assertions, to facilitate the understanding of what failed).
Thanks for Boost, I'm a happy user!
Attachments (1)
Note:
See TracTickets
for help on using tickets.

doc patch