[Boost-bugs] [Boost C++ Libraries] #6921: documentation for BOOST_MPL_ASSERT_RELATION inconsistent with implementation

Subject: [Boost-bugs] [Boost C++ Libraries] #6921: documentation for BOOST_MPL_ASSERT_RELATION inconsistent with implementation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-20 19:24:49


#6921: documentation for BOOST_MPL_ASSERT_RELATION inconsistent with
implementation
------------------------------+---------------------------------------------
 Reporter: ramey | Owner: agurtovoy
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: mpl
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 Documenation for MPL states that the proper syntax
 BOOST_MPL_ASSERT_RELATION
 is:

 BOOST_MPL_ASSERT_RELATION( x, op, y );

 where x and y are integral constants.

 Given this, the following assert should trap since 8 is not an integral
 constant
 {{{
 BOOST_MPL_ASSERT_RELATION(8, ==, 8); // no assertion
 }}}
 But in fact it does not.

 On the other hand, the following should not trap
 {{{
 BOOST_MPL_ASSERT_RELATION(
     (boost::mpl::integral_c<int, 8>),
     ==,
     (boost::mpl::integral_c<int, 8>)
 );
 }}}
 But in fact it does.

 So it seems that the documentation doesn't agree with the implementation.

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6921>
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:09 UTC