Boost logo

Boost :

From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2002-06-28 00:57:46


At 09:38 PM 06/27/2002, Aleksey Gurtovoy wrote:
>Greg Colvin wrote:
>> >> 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;
>> ...
>> };
>
>Not for the sake of the argument at all :)

Hah!

> - the above assumes that
>'template< typename T > class ptr' is _the_ de-facto standard for smart
>pointers' "signature",

No, it simply imposes that requirement on its Ptr argument.

Anyway, we are well off topic by now.


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