Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2002-10-09 06:39:24


Appologies for replying out of time, but here goes anyway...

I like the library and I think that it should be accepted into boost.

The docs look excellent to me.

In the implementation is there any reason why minmax_element(first, last)
doesn't just call minmax_element(first, last, std::less<>) ? It would cut
down on the amount of code duplication by quite a lot. Oh hold on, is this
a partial specialisation issue (not being able to deduce the iterator value
type?). If so maybe the iterators library already has a solution?

In the test program you make an unqualified call to ::atoi without including
the appropriate
header (<stdlib.h>, without this C++ Builder 6 to rejects the code).

The example looks like it needs updating I see the following errors:

Error E2316 minmax_timer.cpp 99: 'min_element_if' is not a member of 'boost'
in
function void test_minmax_element<int *>(int *,int *,int,char *)
Error E2316 minmax_timer.cpp 101: 'max_element_if' is not a member of
'boost' in
 function void test_minmax_element<int *>(int *,int *,int,char *)
Error E2316 minmax_timer.cpp 99: 'min_element_if' is not a member of 'boost'
in
function void
test_minmax_element<_STL::_List_iterator<int,_STL::_Nonconst_trait
s<int> > >(_STL::_List_iterator<int,_STL::_Nonconst_traits<int>
>,_STL::_List_it
erator<int,_STL::_Nonconst_traits<int> >,int,char *)
Error E2316 minmax_timer.cpp 101: 'max_element_if' is not a member of
'boost' in
 function void
test_minmax_element<_STL::_List_iterator<int,_STL::_Nonconst_trai
ts<int> > >(_STL::_List_iterator<int,_STL::_Nonconst_traits<int>
>,_STL::_List_i
terator<int,_STL::_Nonconst_traits<int> >,int,char *)
Error E2316 minmax_timer.cpp 99: 'min_element_if' is not a member of 'boost'
in
function void
test_minmax_element<_STL::_Rb_tree_iterator<int,_STL::_Const_trait
s<int> > >(_STL::_Rb_tree_iterator<int,_STL::_Const_traits<int>
>,_STL::_Rb_tree
_iterator<int,_STL::_Const_traits<int> >,int,char *)
Error E2316 minmax_timer.cpp 101: 'max_element_if' is not a member of
'boost' in
 function void
test_minmax_element<_STL::_Rb_tree_iterator<int,_STL::_Const_trai
ts<int> > >(_STL::_Rb_tree_iterator<int,_STL::_Const_traits<int>
>,_STL::_Rb_tre
e_iterator<int,_STL::_Const_traits<int> >,int,char *)
Error E2268 E:\cpp\CBuilder6\Include\stl/_algo.c 432: Call to undefined
function
 'rand' in function _STL::int __random_number<int>(int)
*** 9 errors in Compile ***

Regards,

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


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