Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users] [ptr_container] Genericity on containers
From: Eloi Du Bois (eloi.du.bois_at_[hidden])
Date: 2010-11-23 06:54:40


Sorry, and thank you for the link.

class A
{
  public:
    A(): _strA("A") {}
    std::string _strA;
};

class B : public A
{
  public:
    B(): _strB("B") {}
    std::string _strB;
};

2010/11/23 Robert Jones <robertgbjones_at_[hidden]>

> On Tue, Nov 23, 2010 at 10:54 AM, Eloi Du Bois <eloi.du.bois_at_[hidden]>wrote:
>
>> Hi,
>>
>> I would like to know why is'nt that working:
>>
>> boost::ptr_vector<B> p1;
>> boost::ptr_vector<B> p2;
>> std::vector<B> v1;
>>
>> boost::ptr_vector<A, boost::view_clone_allocator> pview;
>>
>> // add elements...
>>
>> p1 = p2;
>> pview = p1;
>> // p1 = v1; // don't work
>> // pview = v1; // don't work
>>
>> It should be working, or would be interesting to get working.
>>
>>
> Without seeing your A's and B's it's hard to tell, but I think you're
> talking
> about this....
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2911.pdf
>
> HTH
>
> - Rob.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net