Boost logo

Boost :

From: Olivier Tristan (olivier_at_[hidden])
Date: 2004-06-25 10:02:43


Hi guys,

I'm currently trying got use boost::any to create some container with
different type and I'm having some trouble
with a small exemple. I try this on VC2003, VC2002 and gcc 3.3

Here is my class

class A {
public:
  A(unsigned long size) : mSize(size), mBuffer(new boost::any[size]) {}
  ~A() { delete mBuffer; }
private:
  unsigned long mSize;
  boost::any *mBuffer;
};

int main(void)
{
    A(256);
    return 0;
}

and I got an assertion in the destructor of A;

Can someone tell me if I did something wrong or if there is some problem
is boost::any

Thanks,

-- 
Olivier Tristan
Ultimate Sound Bank

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk