This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: vector/deque/list derived allocator issue
On Thu, 2004-03-25 at 23:54, B. Kosnik wrote:
> >Also, this includes the patch for stl_tree and cpp_type_traits.
>
> This bit failed testing. I've changed it to the following patch, which
> passes with no regressions.
I don't know which test case, but is it somethng like the attached file?
If so, then we can work out a method by making _M_impl mutable.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html
#include <map>
using namespace std;
template <typename Map_Type>
void do_test(typename Map_Type::key_compare _comp = typename Map_Type::key_compare())
{
typename Map_Type::value_type temp[10];
Map_Type _map(temp, temp+10, _comp);
// _map.insert(*temp);
typename Map_Type::const_iterator i = _map.begin();
i = _map.find(i->first);
}
bool less_int(int a, int b) { return a < b; }
int main()
{
do_test<std::map<int, int> >();
do_test<const std::map<int, int> >();
do_test<const std::map<int, int, const std::less<int> > >();
do_test<std::map<int, int, const std::less<int> > >();
do_test<const std::map<int, int, typeof(&less_int) > >();
do_test<std::map<int, int, typeof(&less_int) > >(less_int);
do_test<const std::map<int, int, const typeof(&less_int) > >();
do_test<std::map<int, int, const typeof(&less_int) > >(less_int);
}