forked from boostorg/smart_ptr
library. Changing includes to include the new individual smart pointer headers. Replacing old smart pointer library with an include of the new smart pointer headers. Simplify ifdefs that involve the member templates macros now that BOOST_MSVC6_MEMBER_TEMPLATES is also guaranteed to bet set for platforms that have full member templates. [SVN r12647]
20 lines
543 B
C++
20 lines
543 B
C++
// Boost shared_ptr_example2 implementation file -----------------------------//
|
|
|
|
#include "shared_ptr_example2.hpp"
|
|
#include <iostream>
|
|
|
|
class example::implementation
|
|
{
|
|
public:
|
|
~implementation() { std::cout << "destroying implementation\n"; }
|
|
};
|
|
|
|
example::example() : _imp( new implementation ) {}
|
|
example::example( const example & s ) : _imp( s._imp ) {}
|
|
|
|
example & example::operator=( const example & s )
|
|
{ _imp = s._imp; return *this; }
|
|
|
|
void example::do_something()
|
|
{ std::cout << "use_count() is " << _imp.use_count() << "\n"; }
|