[Boost-bugs] [Boost C++ Libraries] #12852: Resizing fills the circular buffer

Subject: [Boost-bugs] [Boost C++ Libraries] #12852: Resizing fills the circular buffer
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-02-17 21:47:48


#12852: Resizing fills the circular buffer
------------------------------+-----------------------------
 Reporter: b.n.ryland@… | Owner: jano_gaspar
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: circular_buffer
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: resize, full |
------------------------------+-----------------------------
 As the following block of code demonstrates, resizing a circular buffer
 fills it with values and thus full() reports true when one would expect it
 to be false.
 {{{
         boost::circular_buffer<double> cb(3);
         std::cout << cb.full() << std::endl;
         for (auto i : cb)
                 std::cout << i << " ";
         std::cout << std::endl;
         cb.resize(4);
         std::cout << cb.full() << std::endl;
         for (auto i : cb)
                 std::cout << i << " ";
         std::cout << std::endl;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12852>
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-17 21:51:59 UTC