Subject: Re: [boost] [1.44][Serialization] fails to compile on OSX universal
From: David Abrahams (dave_at_[hidden])
Date: 2010-08-21 18:54:45
At Sat, 21 Aug 2010 18:04:37 +0100,
David Irvine wrote:
> This looks like a good move and I think very efficient, although I
> think perhaps for completeness you should declare the assignment
> operator private, to prevent the compiler declaring if for you.
Not just perhaps; definitely. The intent clearly appears to be that
assignment should be forbidden:
// don't permit id to change - don't define assignment
// but copying is ok
special_type(const special_type & s) : m_i(s.m_i) ;
And probably the constructor should be explicit.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk