Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-05-02 15:35:28


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:009801c1f215$4d773ea0$1d00a8c0_at_pdimov2...
> [...]
> template<class T> void f(typename ptr<T>::shared p);
>
> ptr<int>::shared q;
>
> f(p); // fail

I assume you mean f(q). ;) Is it the fact that shared is a typedef
inside ptr that confuses the compiler? Would it be tremendously
difficult for the compiler to handle this situation in the expected
way?

> [...]
> The only suggestion I have is to encode the fat policy list in a
> single type (usually called a configuration):
>
> struct shared_config
> {
> typedef assert_check checking_policy;
> typedef shared_ownership ownership_policy;
> // etc
> };
> [...]

I see. This is yet another policy bundler. How exactly do you
go about passing the right parameters to the policies?

Dave


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