Opened 14 years ago

Closed 14 years ago

#2537 closed Bugs (fixed)

Minor documenation bug regarding BOOST_STATIC_ASSERT(std::numeric_limits<UnsignedInt>::is_signed)

Reported by: anonymous Owned by: John Maddock
Milestone: Boost 1.38.0 Component: static_assert
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:

Description

The page: http://www.boost.org/doc/libs/1_37_0/doc/html/boost_staticassert.html

Has the following example: #include <climits> #include <boost/static_assert.hpp>

template <class UnsignedInt> class myclass { private:

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);

public:

/* details here */

};


The problem being that <limits> provides ::is_signed, rather than <climits>

Change History (2)

comment:1 by Daniel James, 14 years ago

Component: Documentationstatic_assert
Owner: changed from Matias Capeletto to John Maddock

comment:2 by John Maddock, 14 years ago

Resolution: fixed
Status: newclosed

(In [50371]) Fix inclusion of incorrect header. Fixes #2537.

Note: See TracTickets for help on using tickets.