blob: fdefc8d9111620ca7c65facd1a49e25d5b69ee9b [file] [log] [blame]
Brian Silverman355f11d2018-08-04 23:57:00 -07001// Boost shared_ptr_example2 implementation file -----------------------------//
2
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)
6
7
8// See http://www.boost.org/libs/smart_ptr for documentation.
9
10#include "shared_ptr_example2.hpp"
11#include <iostream>
12
13class example::implementation
14{
15 public:
16 ~implementation() { std::cout << "destroying implementation\n"; }
17};
18
19example::example() : _imp( new implementation ) {}
20
21void example::do_something()
22 { std::cout << "use_count() is " << _imp.use_count() << "\n"; }