Boost logo

Boost Users :

Subject: [Boost-users] [fusion] Constructing a vector with non-default/non-copy constructor
From: Tilo Nitzsche (tricorus_at_[hidden])
Date: 2008-12-27 17:02:47


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?

Thanks,
Tilo

      


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