Boost logo

Boost :

Subject: Re: [boost] [core/noncopyable][test/boost::unit_test::singleton]massive test failures
From: Peter Dimov (lists_at_[hidden])
Date: 2014-08-21 09:26:06


Andrey Semashev wrote:
> Why do you think it's not sensible to have a trivial default
> constructor/destructor for a non-copyable class?

Because it isn't. Think about it. Trivial constructors and destructors do
nothing at all. A trivial constructor leaves the object uninitialized.

But it's possible I'm constrained by my lack of imagination; show me one
example.

> Technically, you can apply memcpy to any object and deal with the
> consequences.

Technically... if an object has a trivial copy constructor it's well defined
to use memcpy to copy it. See 3.9/3.


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