mirror of
https://github.com/boostorg/smart_ptr.git
synced 2026-05-05 12:24:17 +02:00
Stricter tests; associated bug fixes. ;-)
[SVN r16369]
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <cstring> // for std::memcpy
|
||||
|
||||
#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4284) // odd return type for operator->
|
||||
@@ -42,8 +44,11 @@ public:
|
||||
// generated copy constructor, assignment, destructor are fine
|
||||
|
||||
template<class Y>
|
||||
weak_ptr(weak_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
|
||||
weak_ptr(weak_ptr<Y> const & r): pn(r.pn) // never throws
|
||||
{
|
||||
// r.px may be an invalid pointer value
|
||||
using namespace std;
|
||||
memcpy(&this->px, &r.px, sizeof(r.px));
|
||||
}
|
||||
|
||||
template<class Y>
|
||||
|
||||
Reference in New Issue
Block a user