Boost logo

Boost :

Subject: [boost] [core] [noncopyable] Add nonmoveable?
From: Viktor Sehr (viktor.sehr_at_[hidden])
Date: 2017-04-25 10:10:06


In addition to noncopyable, I sometimes want to force classes to be
nonmoveable as well (mainly node-type classes in tree structures which
other classes point to). Therefore I'd suggest adding a cousin to
noncopyable; boost::nonmoveable which simply prevents an instance to be
nonmoveable (as well as noncopyable).

Note; even due the delete modifier were added in C++11 I still think
inheriting boost:noncopyable\nonmoveable syntactically nicer than manually
marking the copy\move constructors\assignment operators delete.

/Viktor Sehr


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