[Boost-bugs] [Boost C++ Libraries] #12717: Incomplete documentation of boost::lockfree::queue::queue

Subject: [Boost-bugs] [Boost C++ Libraries] #12717: Incomplete documentation of boost::lockfree::queue::queue
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-29 18:13:56


#12717: Incomplete documentation of boost::lockfree::queue::queue
-------------------------------------+--------------------------
 Reporter: pmoran@… | Owner: timblechmann
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: lockfree
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------
 {{{boost::lockfree::queue::queue(void)}}} can only be called if if
 {{{boost::lockfree::capacity}}} was specified (as enforced by the
 {{{BOOST_ASSERT}}} in include/boost/lockfree/queue.hpp line 179. However
 this requirement is not enforced in a non-debug build and it is not
 mentioned in the documentation for
 {{{boost::lockfree::queue::queue(void)}}}.

 The same thing is true of {{{boost::lockfree::queue::queue(allocator const
 &)}}} in include/boost/lockfree/queue.hpp line 198 and of
 {{{boost::lockfree::queue::queue(size_type)}}} in
 include/boost/lockfree/queue.hpp line 210.

 I think these restrictions should be included in the documentation. The
 docs would lead me to believe that one could write
 {{{
 void some_function() {
   boost::lockfree::queue<int> q;
 }
 }}}
 But if that is built in debug mode it will fail the assertion in
 include/boost/lockfree/queue.hpp line 179

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