|
Boost : |
Subject: Re: [boost] Minimizing Dependencies within Generic Classes for Faster and Smaller Programs
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-11-12 07:42:35
----- Original Message -----
From: "Felipe Magno de Almeida" <felipe.m.almeida_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, November 12, 2010 10:44 AM
Subject: Re: [boost] Minimizing Dependencies within Generic Classes for Faster and Smaller Programs
2010/11/11 Ion Gaztañaga <igaztanaga_at_[hidden]>:
>
[snip]
> I plan to implement this technique for Boost.Container if the library is
> accepted,
It seems that for C++0X, you must make the red-black-tree dependent
on Allocator, since you must use Allocator::pointer everywhere.
Or am I missing something?
_______________________________________________
Hi,
The iterator can depend on the Allocator::pointer but this doesn't forcerly means that it depends on the Allocator. If Allocator::pointer is a typedef to a type idependent of Allocator the independency is ensured.
In addition we could make iterator depend on Allocator::void_pointer and use pointer_traits<>::rebind.
Am I missing something?
Best,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk