Jon Berndt wrote:
Are you *using* the assignment operator for your class
somewhere?

Not that I know of.

FGTable::FGTable(const FGTable& t) :
               PropertyManager(t.PropertyManager)
{
<snip>
  Tables = t.Tables;

I think the problem is this assignment of vector< FGTable > which involves assignment of individual FGTable instances. The default operator= does not cope with copying non-static const members. You'll either have to define:

const FGTable& FGTable::operator=( const FGTable& t )
{
 // defn goes here
}

or use vector< FGTable* > rather than vector< FGTable >, depending on
what you're wanting to do.

Minimal code that demonstrates the problem:

#include <vector>

class A
{
public:
    A( void* const p )
        : _p( p )
    {}
    A(const A &a)
        : _p( a._p )
    { va = a.va; }
private:
    std::vector< A > va;
    void * const _p;
};

int main( void )
{
    A *pa = new A( 0 );
    A pa2 = *pa;
    return 0;
}

HTH,

Alistair


_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to