scoped_ptr_example.cpp 645 B

1234567891011121314151617181920212223
  1. // Boost scoped_ptr_example implementation file -----------------------------//
  2. // Copyright Beman Dawes 2001. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/smart_ptr for documentation.
  6. #include "scoped_ptr_example.hpp"
  7. #include <iostream>
  8. class example::implementation
  9. {
  10. public:
  11. ~implementation() { std::cout << "destroying implementation\n"; }
  12. };
  13. example::example() : _imp( new implementation ) {}
  14. void example::do_something() { std::cout << "did something\n"; }
  15. example::~example() {}