|
Boost : |
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-03-12 17:36:28
Bellow are few notes to circular_buffer library.
Over weekend I'll reread the code and post remaining notes.
/Pavel
____________________________________
1. docs: there should be warning for
data() documentation that the returned
pointer gets very easily invalidated.
____________________________________
2. docs: Synopsis in circular_buffer.html
could be splitted by <p> into two paragraphs.
It would look less "heavy".
____________________________________
3. the macros as BOOST_CB_TRY should be at some time
replaced by common Boost macros.
These macros are proposed but not yet added there AFAIK.
#if !(defined BOOST_NO_EXCEPTIONS)
# define BOOST_TRY { try
# define BOOST_CATCH(x) catch(x)
# define BOOST_RETHROW throw
# define BOOST_CATCH_END }
#else
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# define BOOST_TRY { if ("")
# define BOOST_CATCH(x) else if (!"")
# else
# define BOOST_TRY { if (true)
# define BOOST_CATCH else if (false)
# endif
# define BOOST_RETHROW
# define BOOST_CATCH_END }
#endif
_________________________________________
4. circular_buffer.hpp:
#include <boost/type_traits.hpp>
should be replaced by finer granularity includes.
This line big huge impact on compilation time.
__________________________________________
5. base.hpp:
#if BOOST_CB_ENABLE_DEBUG
#include <string.h>
#endif
maybe this can change to <cstring>.
__________________________________________
6. base.hpp, Intel C++ 7.0, warning on line:
void replace(pointer pos, param_value_type item) {
replace(pos, item, cb_details::template
cb_replace_category_traits<value_type>::tag()); <<< here
C:\Temp\temp\circular_buffer3.6\circular_buffer\boost/circular_buffer/base.h
pp(1105): warning #1017: name following "template"
must be a member template
Dtto assign(), insert(), rinsert(). insert()/rinsert() in adaptor.hpp.
__________________________________________
7. base.hpp: few places contain text "circular_buffer<T, Alloc>".
Helper type, e.g. self_t can be created and used
there. Its slightly easier to read.
__________________________________________
EOF
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk