Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-03-16 17:06:28


At 02:52 PM 3/16/00 -0500, Kevin Atkinson wrote:

>> diff fromfile tofile
>
>You should really use "diff -u fromfile tofile" if your diff utility
>supports unified output format as it is FAR more readable than
normal diff
>output.

Yes, you are certainly right.

If anyone cares, attached is the diff output with and without -u for
the changes Mark Borgerding just sent in to smart_ptr.hpp.

--Beman


--- \boost\site\boost\smart_ptr.hpp Sun Mar 05 07:48:08 2000
+++ \apps\eudora\attach\smart_ptr1.hpp Thu Mar 16 15:03:55 2000
@@ -9,6 +9,8 @@
 // See http://www.boost.org for most recent version including documentation.
 
 // Revision History
+// 16 Mar 00 Moved the template assignment and copy construction to make MSVC
+// happy. Also changed config.hpp to make use of this (Mark Borgerding)
 // 1 Feb 00 Additional shared_ptr BOOST_NO_MEMBER_TEMPLATES workarounds
 // (Dave Abrahams)
 // 31 Dec 99 Condition tightened for no member template friend workaround
@@ -121,15 +123,8 @@
       catch (...) { delete p; throw; }
    }
 
- shared_ptr(const shared_ptr& r) throw() : px(r.px) { ++*(pn = r.pn); }
-
- ~shared_ptr() { dispose(); }
-
- shared_ptr& operator=(const shared_ptr& r) {
- share(r.px,r.pn);
- return *this;
- }
-
+ ~shared_ptr() { dispose(); }
+
 #if !defined( BOOST_NO_MEMBER_TEMPLATES )
    template<typename Y>
       shared_ptr(const shared_ptr<Y>& r) throw() : px(r.px) {
@@ -179,6 +174,13 @@
       }
 #endif
 
+ shared_ptr(const shared_ptr& r) throw() : px(r.px) { ++*(pn = r.pn); }
+
+ shared_ptr& operator=(const shared_ptr& r) {
+ share(r.px,r.pn);
+ return *this;
+ }
+
    void reset(T* p=0) {
       if ( px == p ) return; // fix: self-assignment safe
       if (--*pn == 0) { delete px; }
@@ -365,4 +367,5 @@
 #endif // ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
 #endif // BOOST_SMART_PTR_HPP
+
 

11a12,13
> // 16 Mar 00 Moved the template assignment and copy construction to make MSVC
> // happy. Also changed config.hpp to make use of this (Mark Borgerding)
124,132c126,127
< shared_ptr(const shared_ptr& r) throw() : px(r.px) { ++*(pn = r.pn); }
<
< ~shared_ptr() { dispose(); }
<
< shared_ptr& operator=(const shared_ptr& r) {
< share(r.px,r.pn);
< return *this;
< }
<

---
>    ~shared_ptr() { dispose(); }   
>    
181a177,183
>    shared_ptr(const shared_ptr& r) throw() : px(r.px) { ++*(pn = r.pn); }
> 
>    shared_ptr& operator=(const shared_ptr& r) {
>       share(r.px,r.pn);
>       return *this;
>    }
> 
367a370
> 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk