[Boost-bugs] [Boost C++ Libraries] #7966: static_assert: doc: nitpicking

Subject: [Boost-bugs] [Boost C++ Libraries] #7966: static_assert: doc: nitpicking
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-02 17:13:46


#7966: static_assert: doc: nitpicking
-----------------------------------------------------+----------------------
 Reporter: Akim Demaille <akim.demaille@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: static_assert
  Version: Boost 1.52.0 | Severity: Cosmetic
 Keywords: doc |
-----------------------------------------------------+----------------------
 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!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7966>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC