Boost logo

Boost Users :

Subject: Re: [Boost-users] [fusion] Constructing a vector with non-default/non-copy constructor
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-12-27 17:53:18


AMDG

Tilo Nitzsche wrote:
> class A {
> public:
> A(int i) : i(i) {};
> private:
> A();
> A(const A&);
> int i;
> };
>
> typedef boost::fusion::vector<A, A> VecA;
> boost::fusion::vector<int, int> int_vec(1, 2);
> VecA v(int_vec); // doesn't compile, needs copy constructor
>
> I'm trying to construct a vector of classes that don't have either a default constructor or a copy constructor. Is that possible at all?
>

Not currently. See also https://svn.boost.org/trac/boost/ticket/2087

In Christ,
Steven Watanabe


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