Basically can anybody give me a hint how to properly serialize this class, using
boost serialization library?

Regards
Lukasz

class A
{
public:

  A( int size ) : m_size( size )
  {
    m_ref_count = new int;
    *m_ref_count = 1;
    m_vec = new double [ m_size ];
  }

  ~A(){
    (*m_ref_count)--;
    if ( *m_ref_count == 0 ){
      delete m_vec;
    }
  }

  A( const A & a )
    : m_size ( a.m_size )
    , m_ref_count( a.m_ref_count )
    , m_vec( a.m_vec )
  {
    (*m_ref_count)++;
  }

  int * m_ref_count;
  double * m_vec;
  int m_size;
};