// Test of forwarding a move-only parameter through boost::make_shared // // Copyright (c) 2009 Frank Mori Hess // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #include class move_only { public: move_only() {} move_only(move_only && other) {} move_only& operator=(move_only && other) { return *this; } private: move_only(const move_only & other) {} move_only& operator=(const move_only & other) {return *this;} }; class X { public: X(move_only &&object){} }; int main() { boost::shared_ptr sp = boost::make_shared(move_only()); return 0; }