X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=boost%2Fboost%2Fenable_shared_from_this.hpp;h=b1bb63d9a21dac93d13904e286c56a16890f3661;hb=43c09d723435a5b203f2ac0c39e2086de836b386;hp=0cf7854ccc99f9f74b7ac9e021b7953846a9f9b7;hpb=2349a51b124cafaf65ca673f8e7fd931f4ba4961;p=lyx.git diff --git a/boost/boost/enable_shared_from_this.hpp b/boost/boost/enable_shared_from_this.hpp index 0cf7854ccc..b1bb63d9a2 100644 --- a/boost/boost/enable_shared_from_this.hpp +++ b/boost/boost/enable_shared_from_this.hpp @@ -6,62 +6,13 @@ // // Copyright (c) 2002 Peter Dimov // -// 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) +// 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 // // http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html // -#include -#include -#include -#include - -namespace boost -{ - -template class enable_shared_from_this -{ -protected: - - enable_shared_from_this() - { - } - - enable_shared_from_this(enable_shared_from_this const &) - { - } - - enable_shared_from_this & operator=(enable_shared_from_this const &) - { - return *this; - } - - ~enable_shared_from_this() - { - } - -public: - - shared_ptr shared_from_this() - { - shared_ptr p(_internal_weak_this); - BOOST_ASSERT(p.get() == this); - return p; - } - - shared_ptr shared_from_this() const - { - shared_ptr p(_internal_weak_this); - BOOST_ASSERT(p.get() == this); - return p; - } - - typedef T _internal_element_type; // for bcc 5.5.1 - mutable weak_ptr<_internal_element_type> _internal_weak_this; -}; - -} // namespace boost +#include #endif // #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED