Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-03-04 21:23:17


> The review of Jan Gaspar's Circular Buffer
> library starts today (March 5th) and runs for 10 days.
>

Here's result of first look into 3.6.
More details will follow later.

/Pavel

________________________________________________
1. docs: the table "Friend Functions" should
   be rather "Standalone Functions" and should mention
   swap, <=, >= as well.
________________________________________________
2. base.hpp: standalone function
   bool operator > (...) should be added.
________________________________________________
3. docs: why is the (SGI) in paragraph
   "Model of" and why it is twice there?
________________________________________________
4. docs: "Type Requirements": doesn't the T need
   to be DefaultConstructible as well, e.g.
   to support push_back(void)?

   Maybe the title should be "Element Type Requirements".
________________________________________________
5. compiling test on BCB 6.4, adaptor.hpp:

in snippet:

#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
    reference operator [] (size_type n) { return circular_buffer<T,
Alloc>::operator[](n); }
    return_value_type operator [] (size_type n) const { return
circular_buffer<T, Alloc>::operator[](n); } <<<=== here
#else
    using circular_buffer<T, Alloc>::operator[];
#endif

the line starting with "return_value_type" fails to compile
with error:

------------
[C++ Error] adaptor.hpp(67): E2303 Type name expected
  Full parser context
    base_test.cpp(9): #include
C:\Temp\temp\circular_buffer3.6\circular_buffer\libs\circular_buffer\test\te
st.hpp
    test.hpp(16): #include
C:\Temp\temp\circular_buffer3.6\circular_buffer\libs\circular_buffer\test\..
/../../boost/circular_buffer.hpp
    circular_buffer.hpp(54): #include
C:\Temp\temp\circular_buffer3.6\circular_buffer\libs\circular_buffer\test\..
/../../boost/circular_buffer/adaptor.hpp
    adaptor.hpp(16): namespace boost
    adaptor.hpp(32): class circular_buffer_space_optimized<T,Alloc>
[C++ Error] adaptor.hpp(67): E2139 Declaration missing ;
  Full parser context
    base_test.cpp(9): #include
C:\Temp\temp\circular_buffer3.6\circular_buffer\libs\circular_buffer\test\te
st.hpp
    test.hpp(16): #include
C:\Temp\temp\circular_buffer3.6\circular_buffer\libs\circular_buffer\test\..
/../../boost/circular_buffer.hpp
    circular_buffer.hpp(54): #include
C:\Temp\temp\circular_buffer3.6\circular_buffer\libs\circular_buffer\test\..
/../../boost/circular_buffer/adaptor.hpp
    adaptor.hpp(16): namespace boost
    adaptor.hpp(32): class circular_buffer_space_optimized<T,Alloc>
------------

When I change return type to "value_type" all
compiles OK.

This could be some BCB quirk.
________________________________________________
6. compiling test on Intel C++ 7.0: all is OK.
________________________________________________
7. compiling base_test.cpp on VC6.5: I am getting
"user breakpoint" within Boost.Test. This may be
regression of Test, though. I'll try to dig deeper.
________________________________________________
EOF


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk