Concept-check bug ?

Jonathan Wakely cow@compsoc.man.ac.uk
Fri Jun 17 12:55:00 GMT 2005


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



More information about the Libstdc++ mailing list