1 // Boost scoped_ptr_example header file ------------------------------------//
3 // Copyright Beman Dawes 2001. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 // See http://www.boost.org/libs/smart_ptr for documentation.
10 #include <boost/utility.hpp>
11 #include <boost/scoped_ptr.hpp>
13 // The point of this example is to prove that even though
14 // example::implementation is an incomplete type in translation units using
15 // this header, scoped_ptr< implementation > is still valid because the type
16 // is complete where it counts - in the inplementation translation unit where
17 // destruction is actually instantiated.
19 class example : private boost::noncopyable
27 boost::scoped_ptr< implementation > _imp; // hide implementation details