Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

=delete emulation

C++11 allows to delete some implicitly generated functions as constructors and assignment using '= delete' as in

public:
  thread(thread const&) = delete;

On compilers not supporting this feature, Boost.Thread relays on a partial simulation, it declares the function as private without definition.

private:
  thread(thread &);

The emulation is partial as the private function can be used for overload resolution for some compilers and prefer it to other overloads that need a conversion. See below the consequences on the move semantic emulation.


PrevUpHomeNext