[Boost-bugs] [Boost C++ Libraries] #4633: boost/ptr_container/ptr_sequence_adapter.hpp:671: unreferenced parameters 'first', 'last' when compiled with no assertions

Subject: [Boost-bugs] [Boost C++ Libraries] #4633: boost/ptr_container/ptr_sequence_adapter.hpp:671: unreferenced parameters 'first', 'last' when compiled with no assertions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-07 19:33:56


#4633: boost/ptr_container/ptr_sequence_adapter.hpp:671: unreferenced parameters
'first', 'last' when compiled with no assertions
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: nesotto
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: ptr_container
  Version: Boost 1.44.0 | Severity: Cosmetic
 Keywords: |
------------------------------+---------------------------------------------
 As of r65343 file boost/ptr_container/ptr_sequence_adapter.hpp at function
 range_check_impl (std::random_access_iterator_tag version), the parameters
 'first' and 'last' are referenced only inside a BOOST_ASSERT call. When
 assertions are compiled out, these parameters become unreferenced. This
 causes warning C4100 from Microsoft Visual Studio 9. It would be nice to
 mark the parameters as intentionally unused so that this warning is not
 generated. The simplest way to do this is to add "(void)first;
 (void)last;" in the function body. Other more elaborate mechanisms exist,
 but as far as I know, casting to void is a simple and portable way to
 prevent the warning without disrupting the debug code's access to these
 variables.

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