Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55918 - in branches/release: boost/intrusive boost/intrusive/detail libs/intrusive/test
From: C.Hite_at_[hidden]
Date: 2009-08-31 08:16:59


Author: chris_hite
Date: 2009-08-31 08:16:58 EDT (Mon, 31 Aug 2009)
New Revision: 55918
URL: http://svn.boost.org/trac/boost/changeset/55918

Log:
merged sandbox-branches/intrusive_fix_SunCC (r55765 and r55775) fixing intrusive for Sun CC (#3339)
Text files modified:
   branches/release/boost/intrusive/detail/utilities.hpp | 8 +-
   branches/release/boost/intrusive/hashtable.hpp | 4
   branches/release/libs/intrusive/test/smart_ptr.hpp | 104 ++++++++++++++++++++--------------------
   3 files changed, 58 insertions(+), 58 deletions(-)

Modified: branches/release/boost/intrusive/detail/utilities.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/utilities.hpp (original)
+++ branches/release/boost/intrusive/detail/utilities.hpp 2009-08-31 08:16:58 EDT (Mon, 31 Aug 2009)
@@ -46,7 +46,7 @@
    struct two_or_three {one _[2 + Add];};
    template <class U> static one test(...);
    template <class U> static two_or_three<U::boost_intrusive_tags::is_base_hook>
- test (detail::bool_<U::boost_intrusive_tags::is_base_hook>* = 0);
+ test (int);
    static const std::size_t value = sizeof(test<T>(0));
 };
 
@@ -63,7 +63,7 @@
    struct two_or_three {one _[2 + Add];};
    template <class U> static one test(...);
    template <class U> static two_or_three<U::is_any_hook>
- test (detail::bool_<U::is_any_hook>* = 0);
+ test (int);
    static const std::size_t value = sizeof(test<T>(0));
 };
 
@@ -81,7 +81,7 @@
    struct two_or_three {one _[2 + Add];};
    template <class U> static one test(...);
    template <class U> static two_or_three<U::external_value_traits>
- test (detail::bool_<U::external_value_traits>* = 0);
+ test (int);
    static const std::size_t value = sizeof(test<T>(0));
 };
 
@@ -92,7 +92,7 @@
    struct two_or_three {one _[2 + Add];};
    template <class U> static one test(...);
    template <class U> static two_or_three<U::external_bucket_traits>
- test (detail::bool_<U::external_bucket_traits>* = 0);
+ test (int);
    static const std::size_t value = sizeof(test<T>(0));
 };
 

Modified: branches/release/boost/intrusive/hashtable.hpp
==============================================================================
--- branches/release/boost/intrusive/hashtable.hpp (original)
+++ branches/release/boost/intrusive/hashtable.hpp 2009-08-31 08:16:58 EDT (Mon, 31 Aug 2009)
@@ -187,7 +187,7 @@
    struct two_or_three {one _[2 + Add];};
    template <class U> static one test(...);
    template <class U> static two_or_three<U::store_hash>
- test (detail::bool_<U::store_hash>* = 0);
+ test (int);
    static const std::size_t value = sizeof(test<T>(0));
 };
 
@@ -204,7 +204,7 @@
    struct two_or_three {one _[2 + Add];};
    template <class U> static one test(...);
    template <class U> static two_or_three<U::optimize_multikey>
- test (detail::bool_<U::optimize_multikey>* = 0);
+ test (int);
    static const std::size_t value = sizeof(test<T>(0));
 };
 

Modified: branches/release/libs/intrusive/test/smart_ptr.hpp
==============================================================================
--- branches/release/libs/intrusive/test/smart_ptr.hpp (original)
+++ branches/release/libs/intrusive/test/smart_ptr.hpp 2009-08-31 08:16:58 EDT (Mon, 31 Aug 2009)
@@ -34,9 +34,9 @@
 struct empty_type{};
 
 template<class T>
-struct random_it
-: public boost::iterator<std::random_access_iterator_tag,
- T, std::ptrdiff_t, T*, T&>
+struct random_it
+: public boost::iterator<std::random_access_iterator_tag,
+ T, std::ptrdiff_t, T*, T&>
 {
    typedef const T* const_pointer;
    typedef const T& const_reference;
@@ -108,25 +108,25 @@
    public: //Public Functions
 
    //!Constructor from raw pointer (allows "0" pointer conversion). Never throws.
- explicit smart_ptr(pointer ptr = 0)
+ smart_ptr(pointer ptr = 0)
       : m_ptr(ptr)
    {}
 
    //!Constructor from other pointer. Never throws.
    template <class T>
- smart_ptr(T *ptr)
+ smart_ptr(T *ptr)
       : m_ptr(ptr)
    {}
 
- //!Constructor from other smart_ptr
+ //!Constructor from other smart_ptr
    smart_ptr(const smart_ptr& ptr)
       : m_ptr(ptr.m_ptr)
    {}
 
- //!Constructor from other smart_ptr. If pointers of pointee types are
+ //!Constructor from other smart_ptr. If pointers of pointee types are
    //!convertible, offset_ptrs will be convertibles. Never throws.
    template<class T2>
- smart_ptr(const smart_ptr<T2> &ptr)
+ smart_ptr(const smart_ptr<T2> &ptr)
       : m_ptr(ptr.m_ptr)
    {}
 
@@ -159,16 +159,16 @@
    { return m_ptr; }
 
    //!Pointer-like -> operator. It can return 0 pointer. Never throws.
- pointer operator->() const
+ pointer operator->() const
    { return this->get(); }
 
- //!Dereferencing operator, if it is a null smart_ptr behavior
+ //!Dereferencing operator, if it is a null smart_ptr behavior
    //! is undefined. Never throws.
- reference operator* () const
+ reference operator* () const
    { return *(this->get()); }
 
    //!Indexing operator. Never throws.
- reference operator[](std::ptrdiff_t idx) const
+ reference operator[](std::ptrdiff_t idx) const
    { return this->get()[idx]; }
 
    //!Assignment from pointer (saves extra conversion). Never throws.
@@ -179,18 +179,18 @@
    smart_ptr& operator= (const smart_ptr & pt)
    { m_ptr = pt.m_ptr; return *this; }
 
- //!Assignment from related smart_ptr. If pointers of pointee types
+ //!Assignment from related smart_ptr. If pointers of pointee types
    //! are assignable, offset_ptrs will be assignable. Never throws.
    template <class T2>
    smart_ptr& operator= (const smart_ptr<T2> & pt)
    { m_ptr = pt.m_ptr; return *this; }
-
+
    //!smart_ptr + std::ptrdiff_t. Never throws.
- smart_ptr operator+ (std::ptrdiff_t offset) const
+ smart_ptr operator+ (std::ptrdiff_t offset) const
    { return smart_ptr(this->get()+offset); }
 
    //!smart_ptr - std::ptrdiff_t. Never throws.
- smart_ptr operator- (std::ptrdiff_t offset) const
+ smart_ptr operator- (std::ptrdiff_t offset) const
    { return smart_ptr(this->get()-offset); }
 
    //!smart_ptr += std::ptrdiff_t. Never throws.
@@ -202,7 +202,7 @@
    { m_ptr -= offset; return *this; }
 
    //!++smart_ptr. Never throws.
- smart_ptr& operator++ (void)
+ smart_ptr& operator++ (void)
    { ++m_ptr; return *this; }
 
    //!smart_ptr++. Never throws.
@@ -210,7 +210,7 @@
    { smart_ptr temp(*this); ++*this; return temp; }
 
    //!--smart_ptr. Never throws.
- smart_ptr& operator-- (void)
+ smart_ptr& operator-- (void)
    { --m_ptr; return *this; }
 
    //!smart_ptr--. Never throws.
@@ -218,16 +218,16 @@
    { smart_ptr temp(*this); --*this; return temp; }
 
    //!safe bool conversion operator. Never throws.
- operator unspecified_bool_type() const
+ operator unspecified_bool_type() const
    { return this->get()? &self_t::unspecified_bool_type_func : 0; }
 
- //!Not operator. Not needed in theory, but improves portability.
+ //!Not operator. Not needed in theory, but improves portability.
    //!Never throws.
    bool operator! () const
    { return this->get() == 0; }
 /*
    friend void swap (smart_ptr &pt, smart_ptr &pt2)
- {
+ {
       value_type *ptr = pt.get();
       pt = pt2;
       pt2 = ptr;
@@ -237,67 +237,67 @@
 
 //!smart_ptr<T1> == smart_ptr<T2>. Never throws.
 template<class T1, class T2>
-inline bool operator== (const smart_ptr<T1> &pt1,
+inline bool operator== (const smart_ptr<T1> &pt1,
                         const smart_ptr<T2> &pt2)
 { return pt1.get() == pt2.get(); }
 
 //!smart_ptr<T1> != smart_ptr<T2>. Never throws.
 template<class T1, class T2>
-inline bool operator!= (const smart_ptr<T1> &pt1,
+inline bool operator!= (const smart_ptr<T1> &pt1,
                         const smart_ptr<T2> &pt2)
 { return pt1.get() != pt2.get(); }
 
 //!smart_ptr<T1> < smart_ptr<T2>. Never throws.
 template<class T1, class T2>
-inline bool operator< (const smart_ptr<T1> &pt1,
+inline bool operator< (const smart_ptr<T1> &pt1,
                        const smart_ptr<T2> &pt2)
 { return pt1.get() < pt2.get(); }
 
 //!smart_ptr<T1> <= smart_ptr<T2>. Never throws.
 template<class T1, class T2>
-inline bool operator<= (const smart_ptr<T1> &pt1,
+inline bool operator<= (const smart_ptr<T1> &pt1,
                         const smart_ptr<T2> &pt2)
 { return pt1.get() <= pt2.get(); }
 
 //!smart_ptr<T1> > smart_ptr<T2>. Never throws.
 template<class T1, class T2>
-inline bool operator> (const smart_ptr<T1> &pt1,
+inline bool operator> (const smart_ptr<T1> &pt1,
                        const smart_ptr<T2> &pt2)
 { return pt1.get() > pt2.get(); }
 
 //!smart_ptr<T1> >= smart_ptr<T2>. Never throws.
 template<class T1, class T2>
-inline bool operator>= (const smart_ptr<T1> &pt1,
+inline bool operator>= (const smart_ptr<T1> &pt1,
                         const smart_ptr<T2> &pt2)
 { return pt1.get() >= pt2.get(); }
 
-//!operator<<
-template<class E, class T, class Y>
-inline std::basic_ostream<E, T> & operator<<
+//!operator<<
+template<class E, class T, class Y>
+inline std::basic_ostream<E, T> & operator<<
    (std::basic_ostream<E, T> & os, smart_ptr<Y> const & p)
 { return os << p.get(); }
 
-//!operator>>
-template<class E, class T, class Y>
-inline std::basic_istream<E, T> & operator>>
+//!operator>>
+template<class E, class T, class Y>
+inline std::basic_istream<E, T> & operator>>
    (std::basic_istream<E, T> & os, smart_ptr<Y> & p)
 { Y * tmp; return os >> tmp; p = tmp; }
 
-//!std::ptrdiff_t + smart_ptr
+//!std::ptrdiff_t + smart_ptr
 template<class T>
 inline smart_ptr<T> operator+(std::ptrdiff_t diff, const smart_ptr<T>& right)
 { return right + diff; }
 
-//!smart_ptr - smart_ptr
+//!smart_ptr - smart_ptr
 template<class T, class T2>
 inline std::ptrdiff_t operator- (const smart_ptr<T> &pt, const smart_ptr<T2> &pt2)
 { return pt.get()- pt2.get(); }
 
-//!swap specialization
+//!swap specialization
 template<class T>
-inline void swap (smart_ptr<T> &pt,
+inline void swap (smart_ptr<T> &pt,
                   smart_ptr<T> &pt2)
-{
+{
    typename smart_ptr<T>::value_type *ptr = pt.get();
    pt = pt2;
    pt2 = ptr;
@@ -310,35 +310,35 @@
 { return p.get(); }
 
 //!Simulation of static_cast between pointers. Never throws.
-template<class T, class U>
-inline smart_ptr<T>
+template<class T, class U>
+inline smart_ptr<T>
    static_pointer_cast(smart_ptr<U> const & r)
-{
- return smart_ptr<T>(r, detail::static_cast_tag());
+{
+ return smart_ptr<T>(r, detail::static_cast_tag());
 }
 
 //!Simulation of const_cast between pointers. Never throws.
-template<class T, class U>
+template<class T, class U>
 inline smart_ptr<T>const_pointer_cast(smart_ptr<U> const & r)
-{
- return smart_ptr<T>(r, detail::const_cast_tag());
+{
+ return smart_ptr<T>(r, detail::const_cast_tag());
 }
 
 //!Simulation of dynamic_cast between pointers. Never throws.
-template<class T, class U>
-inline smart_ptr<T>
+template<class T, class U>
+inline smart_ptr<T>
    dynamic_pointer_cast(smart_ptr<U> const & r)
-{
+{
    return smart_ptr<T>
- (r, detail::dynamic_cast_tag());
+ (r, detail::dynamic_cast_tag());
 }
 
 //!Simulation of reinterpret_cast between pointers. Never throws.
-template<class T, class U>
+template<class T, class U>
 inline smart_ptr<T>
    reinterpret_pointer_cast(smart_ptr<U> const & r)
-{
- return smart_ptr<T>(r, detail::reinterpret_cast_tag());
+{
+ return smart_ptr<T>(r, detail::reinterpret_cast_tag());
 }
 
 } //namespace intrusive {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk