Boost logo

Boost :

From: Greg Colvin (greg_at_[hidden])
Date: 2002-06-27 20:10:05


At 05:45 PM 06/27/2002, David Abrahams wrote:

>From: "Greg Colvin" <greg_at_[hidden]>
>
>> >I don't see the advantage over having raw_ptr be a function template which
>> >returns a T*. At least then the user doesn't have to explicitly specify the
>> >template argument.
>>
>> So you can write generic code like
>>
>> template<template<typename T> class Ptr> struct x { Ptr<X> p; };
>>
>> and have a Ptr with raw pointer semantics.
>
>And the advantage of this over
>
> template<class Ptr> struct x { Ptr p; };
>
>is?

template<template<typename T> class Ptr> struct x {
   Ptr<X> px;
   Ptr<Y> py;
   ...
};


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