This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Concept-check bug ?


On Fri, Jun 17, 2005 at 02:51:09PM +0200, Gabriel Dos Reis wrote:

> Jonathan Wakely <cow@compsoc.man.ac.uk> writes:
> | 
> | Presumably the truly legal way to do it is with a (smart) pointer to the
> 
> Probably "legal", but surely overkill and obfuscatory.  
> 
> Do you really believe that
> 
>   template<class T>
>     struct Vector {
>         T* data;
>         int size;
>         // ...
>     };
> 
>    struct A {
>       Vector<A> v;
>    };
> 
> shall be expressed as:
> 
> |     struct A {
> |         std::tr1::shared_ptr<std::vector<A> > v;
> | 
> |         A() : v(new std::vector<A>) { }
> |     };
> 
> ?  
> 
> Ugh.

No, I wouldn't do it like that myself, it's horrible.

I'm just poking around playing with some ideas.

jon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]