Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > by-pkgid > e5dfed2a49e9c96e6ee7b3880f2b1017 > files > 590

libboost1-examples-1.31.0-1mdk.i586.rpm

// Boost shared_ptr_example2 implementation file  -----------------------------//

//  Copyright Beman Dawes 2001.
//  See accompanying license for terms and conditions of use.

//  See http://www.boost.org/libs/smart_ptr for documentation.

#include "shared_ptr_example2.hpp"
#include <iostream>

class example::implementation
{
 public:
  ~implementation() { std::cout << "destroying implementation\n"; }
};

example::example() : _imp( new implementation ) {}

void example::do_something()
  { std::cout << "use_count() is " << _imp.use_count() << "\n"; }