[Boost-bugs] [Boost C++ Libraries] #6164: Add a function to dynamic_bitset to test and set

Subject: [Boost-bugs] [Boost C++ Libraries] #6164: Add a function to dynamic_bitset to test and set
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-22 19:12:35


#6164: Add a function to dynamic_bitset to test and set
--------------------------------------------------------+-------------------
 Reporter: Chris Kingsley <chris.kingsley@…> | Owner: jsiek
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: dynamic_bitset
  Version: Boost 1.48.0 | Severity: Optimization
 Keywords: |
--------------------------------------------------------+-------------------
 I often use an idiom:
    if (!dynBitset.test(pos)) {
       dynBitset.set(pos);
       // do a once-only operation

 It would be nice to have something like:
    if (!dynBitset.test_set(pos)) {
       // do a once-only operation

 Yes, it could be done by saving a temporary reference, but this form is
 compact and easy to understand.

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