Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58195 - in branches/release: . boost boost/algorithm/string boost/config boost/detail boost/exception/detail boost/filesystem boost/function boost/functional/hash boost/fusion boost/graph boost/interprocess boost/intrusive boost/iostreams boost/math boost/numeric/ublas boost/program_options boost/property_tree boost/python boost/regex boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/spirit/repository/home/qi/nonterminal boost/system boost/thread boost/tr1 boost/type_traits boost/unordered boost/utility boost/variant boost/wave doc libs libs/config libs/filesystem libs/functional/hash libs/fusion libs/graph_parallel libs/interprocess libs/intrusive libs/iostreams libs/math libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/numeric/ublas libs/numeric/ublas/doc libs/program_options libs/property_tree libs/python libs/regex libs/signals libs/signals2 libs/smart_ptr/test libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/system libs/thread libs/thread/doc libs/timer libs/tr1 libs/type_traits libs/unordered libs/utility libs/wave more people status tools tools/boostbook tools/build/v2 tools/inspect tools/quickbook tools/regression tools/release tools/wave wiki
From: pdimov_at_[hidden]
Date: 2009-12-06 12:50:29


Author: pdimov
Date: 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
New Revision: 58195
URL: http://svn.boost.org/trac/boost/changeset/58195

Log:
Merge [58123], [58127], [58128] to release. Fixes #3666.
Added:
   branches/release/libs/smart_ptr/test/sp_typeinfo_test.cpp
      - copied unchanged from r58128, /trunk/libs/smart_ptr/test/sp_typeinfo_test.cpp
Properties modified:
   branches/release/ (props changed)
   branches/release/CMakeLists.txt (props changed)
   branches/release/INSTALL (props changed)
   branches/release/Jamroot (props changed)
   branches/release/LICENSE_1_0.txt (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost-build.jam (props changed)
   branches/release/boost.css (props changed)
   branches/release/boost.png (props changed)
   branches/release/boost/algorithm/string/ (props changed)
   branches/release/boost/config/ (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/functional/hash/ (props changed)
   branches/release/boost/fusion/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/interprocess/ (props changed)
   branches/release/boost/intrusive/ (props changed)
   branches/release/boost/iostreams/ (props changed)
   branches/release/boost/math/ (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/python/ (props changed)
   branches/release/boost/regex/ (props changed)
   branches/release/boost/signals/ (props changed)
   branches/release/boost/signals2/ (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/boost/spirit/repository/home/qi/nonterminal/subrule.hpp (props changed)
   branches/release/boost/system/ (props changed)
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/boost/tr1/ (props changed)
   branches/release/boost/type_traits/ (props changed)
   branches/release/boost/unordered/ (props changed)
   branches/release/boost/utility/value_init.hpp (props changed)
   branches/release/boost/variant/ (props changed)
   branches/release/boost/version.hpp (props changed)
   branches/release/boost/wave/ (props changed)
   branches/release/bootstrap.bat (props changed)
   branches/release/bootstrap.sh (props changed)
   branches/release/doc/ (props changed)
   branches/release/index.htm (props changed)
   branches/release/index.html (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/config/ (props changed)
   branches/release/libs/filesystem/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
   branches/release/libs/fusion/ (props changed)
   branches/release/libs/graph_parallel/ (props changed)
   branches/release/libs/interprocess/ (props changed)
   branches/release/libs/intrusive/ (props changed)
   branches/release/libs/iostreams/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/maintainers.txt (props changed)
   branches/release/libs/math/ (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
   branches/release/libs/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/python/ (props changed)
   branches/release/libs/regex/ (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
   branches/release/libs/system/ (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/thread/doc/ (props changed)
   branches/release/libs/timer/ (props changed)
   branches/release/libs/tr1/ (props changed)
   branches/release/libs/type_traits/ (props changed)
   branches/release/libs/unordered/ (props changed)
   branches/release/libs/utility/swap.html (props changed)
   branches/release/libs/utility/value_init.htm (props changed)
   branches/release/libs/utility/value_init_test.cpp (props changed)
   branches/release/libs/wave/ (props changed)
   branches/release/more/ (props changed)
   branches/release/people/ (props changed)
   branches/release/rst.css (props changed)
   branches/release/status/ (props changed)
   branches/release/tools/ (props changed)
   branches/release/tools/boostbook/ (props changed)
   branches/release/tools/build/v2/ (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/quickbook/ (props changed)
   branches/release/tools/regression/ (props changed)
   branches/release/tools/release/ (props changed)
   branches/release/tools/wave/ (props changed)
   branches/release/wiki/ (props changed)
Text files modified:
   branches/release/boost/detail/sp_typeinfo.hpp | 54 +++++++++++++++++++++++++++++++++++++--
   branches/release/boost/exception/detail/type_info.hpp | 10 +++---
   branches/release/boost/function/function_base.hpp | 52 ++++++++++++++++++++------------------
   branches/release/libs/smart_ptr/test/Jamfile.v2 | 1
   branches/release/libs/smart_ptr/test/pointer_cast_test.cpp | 10 +++++++
   branches/release/libs/smart_ptr/test/shared_from_this_test.cpp | 2 +
   branches/release/libs/smart_ptr/test/shared_ptr_basic_test.cpp | 12 ++++++++
   branches/release/libs/smart_ptr/test/shared_ptr_test.cpp | 8 +++++
   8 files changed, 115 insertions(+), 34 deletions(-)

Modified: branches/release/boost/detail/sp_typeinfo.hpp
==============================================================================
--- branches/release/boost/detail/sp_typeinfo.hpp (original)
+++ branches/release/boost/detail/sp_typeinfo.hpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -19,20 +19,66 @@
 
 #if defined( BOOST_NO_TYPEID )
 
+#include <boost/current_function.hpp>
+#include <functional>
+
 namespace boost
 {
 
 namespace detail
 {
 
-typedef void* sp_typeinfo;
+class sp_typeinfo
+{
+private:
+
+ sp_typeinfo( sp_typeinfo const& );
+ sp_typeinfo& operator=( sp_typeinfo const& );
+
+ char const * name_;
+
+public:
+
+ explicit sp_typeinfo( char const * name ): name_( name )
+ {
+ }
+
+ bool operator==( sp_typeinfo const& rhs ) const
+ {
+ return this == &rhs;
+ }
+
+ bool operator!=( sp_typeinfo const& rhs ) const
+ {
+ return this != &rhs;
+ }
+
+ bool before( sp_typeinfo const& rhs ) const
+ {
+ return std::less< sp_typeinfo const* >()( this, &rhs );
+ }
+
+ char const* name() const
+ {
+ return name_;
+ }
+};
 
 template<class T> struct sp_typeid_
 {
- static char v_;
+ static sp_typeinfo ti_;
+
+ static char const * name()
+ {
+ return BOOST_CURRENT_FUNCTION;
+ }
 };
 
-template<class T> char sp_typeid_< T >::v_;
+template<class T> sp_typeinfo sp_typeid_< T >::ti_( sp_typeid_< T >::name() );
+
+template<class T> struct sp_typeid_< T & >: sp_typeid_< T >
+{
+};
 
 template<class T> struct sp_typeid_< T const >: sp_typeid_< T >
 {
@@ -50,7 +96,7 @@
 
 } // namespace boost
 
-#define BOOST_SP_TYPEID(T) (&boost::detail::sp_typeid_<T>::v_)
+#define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_<T>::ti_)
 
 #else
 

Modified: branches/release/boost/exception/detail/type_info.hpp
==============================================================================
--- branches/release/boost/exception/detail/type_info.hpp (original)
+++ branches/release/boost/exception/detail/type_info.hpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -43,12 +43,12 @@
         struct
         type_info_
             {
- detail::sp_typeinfo type_;
+ detail::sp_typeinfo const * type_;
             char const * name_;
 
             explicit
- type_info_( detail::sp_typeinfo type, char const * name ):
- type_(type),
+ type_info_( detail::sp_typeinfo const & type, char const * name ):
+ type_(&type),
                 name_(name)
                 {
                 }
@@ -57,14 +57,14 @@
             bool
             operator==( type_info_ const & a, type_info_ const & b )
                 {
- return a.type_==b.type_;
+ return (*a.type_)==(*b.type_);
                 }
 
             friend
             bool
             operator<( type_info_ const & a, type_info_ const & b )
                 {
- return a.type_<b.type_;
+ return 0!=(a.type_->before(*b.type_));
                 }
 
             char const *

Modified: branches/release/boost/function/function_base.hpp
==============================================================================
--- branches/release/boost/function/function_base.hpp (original)
+++ branches/release/boost/function/function_base.hpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -15,8 +15,8 @@
 #include <string>
 #include <memory>
 #include <new>
-#include <typeinfo>
 #include <boost/config.hpp>
+#include <boost/detail/sp_typeinfo.hpp>
 #include <boost/assert.hpp>
 #include <boost/integer.hpp>
 #include <boost/type_traits/has_trivial_copy.hpp>
@@ -54,7 +54,9 @@
 
 // Borrowed from Boost.Python library: determines the cases where we
 // need to use std::type_info::name to compare instead of operator==.
-# if (defined(__GNUC__) && __GNUC__ >= 3) \
+#if defined( BOOST_NO_TYPEID )
+# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
+#elif (defined(__GNUC__) && __GNUC__ >= 3) \
  || defined(_AIX) \
  || ( defined(__sgi) && defined(__host_mips))
 # include <cstring>
@@ -103,7 +105,7 @@
         // For pointers to std::type_info objects
         struct type_t {
           // (get_functor_type_tag, check_functor_type_tag).
- const BOOST_FUNCTION_STD_NS::type_info* type;
+ const detail::sp_typeinfo* type;
 
           // Whether the type is const-qualified.
           bool const_qualified;
@@ -215,12 +217,12 @@
 
           case check_functor_type_tag:
             {
- const BOOST_FUNCTION_STD_NS::type_info& check_type
+ const detail::sp_typeinfo& check_type
                 = *out_buffer.type.type;
 
               // Check whether we have the same type. We can add
               // cv-qualifiers, but we can't take them away.
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(F))
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F))
                   && (!in_buffer.obj_ref.is_const_qualified
                       || out_buffer.type.const_qualified)
                   && (!in_buffer.obj_ref.is_volatile_qualified
@@ -232,7 +234,7 @@
             return;
 
           case get_functor_type_tag:
- out_buffer.type.type = &typeid(F);
+ out_buffer.type.type = &BOOST_SP_TYPEID(F);
             out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified;
             out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified;
             return;
@@ -292,14 +294,14 @@
           } else if (op == destroy_functor_tag)
             out_buffer.func_ptr = 0;
           else if (op == check_functor_type_tag) {
- const BOOST_FUNCTION_STD_NS::type_info& check_type
+ const detail::sp_typeinfo& check_type
               = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = &in_buffer.func_ptr;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -322,14 +324,14 @@
             // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
             reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
           } else if (op == check_functor_type_tag) {
- const BOOST_FUNCTION_STD_NS::type_info& check_type
+ const detail::sp_typeinfo& check_type
               = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = &in_buffer.data;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -381,14 +383,14 @@
             delete f;
             out_buffer.obj_ptr = 0;
           } else if (op == check_functor_type_tag) {
- const BOOST_FUNCTION_STD_NS::type_info& check_type
+ const detail::sp_typeinfo& check_type
               = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = in_buffer.obj_ptr;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -423,7 +425,7 @@
           typedef typename get_function_tag<functor_type>::type tag_type;
           switch (op) {
           case get_functor_type_tag:
- out_buffer.type.type = &typeid(functor_type);
+ out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
             return;
@@ -492,14 +494,14 @@
             wrapper_allocator.deallocate(victim,1);
             out_buffer.obj_ptr = 0;
           } else if (op == check_functor_type_tag) {
- const BOOST_FUNCTION_STD_NS::type_info& check_type
+ const detail::sp_typeinfo& check_type
               = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = in_buffer.obj_ptr;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -526,7 +528,7 @@
           typedef typename get_function_tag<functor_type>::type tag_type;
           switch (op) {
           case get_functor_type_tag:
- out_buffer.type.type = &typeid(functor_type);
+ out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
             return;
@@ -627,11 +629,11 @@
   /** Determine if the function is empty (i.e., has no target). */
   bool empty() const { return !vtable; }
 
- /** Retrieve the type of the stored function object, or typeid(void)
+ /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void)
       if this is empty. */
- const BOOST_FUNCTION_STD_NS::type_info& target_type() const
+ const detail::sp_typeinfo& target_type() const
   {
- if (!vtable) return typeid(void);
+ if (!vtable) return BOOST_SP_TYPEID(void);
 
     detail::function::function_buffer type;
     get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
@@ -644,7 +646,7 @@
       if (!vtable) return 0;
 
       detail::function::function_buffer type_result;
- type_result.type.type = &typeid(Functor);
+ type_result.type.type = &BOOST_SP_TYPEID(Functor);
       type_result.type.const_qualified = is_const<Functor>::value;
       type_result.type.volatile_qualified = is_volatile<Functor>::value;
       get_vtable()->manager(functor, type_result,
@@ -662,7 +664,7 @@
       if (!vtable) return 0;
 
       detail::function::function_buffer type_result;
- type_result.type.type = &typeid(Functor);
+ type_result.type.type = &BOOST_SP_TYPEID(Functor);
       type_result.type.const_qualified = true;
       type_result.type.volatile_qualified = is_volatile<Functor>::value;
       get_vtable()->manager(functor, type_result,

Modified: branches/release/libs/smart_ptr/test/Jamfile.v2
==============================================================================
--- branches/release/libs/smart_ptr/test/Jamfile.v2 (original)
+++ branches/release/libs/smart_ptr/test/Jamfile.v2 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -62,5 +62,6 @@
           [ run esft_constructor_test.cpp ]
           [ compile-fail auto_ptr_lv_fail.cpp ]
           [ run atomic_count_test2.cpp ]
+ [ run sp_typeinfo_test.cpp ]
         ;
 }

Modified: branches/release/libs/smart_ptr/test/pointer_cast_test.cpp
==============================================================================
--- branches/release/libs/smart_ptr/test/pointer_cast_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/pointer_cast_test.cpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -9,6 +9,8 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
+#include <boost/config.hpp>
+
 #include <boost/pointer_cast.hpp>
 
 #include <boost/shared_ptr.hpp>
@@ -58,6 +60,8 @@
 
 // And now some simple check functions
 
+#if !defined( BOOST_NO_RTTI )
+
 template <class BasePtr>
 bool check_dynamic_pointer_cast(const BasePtr &ptr)
 {
@@ -74,6 +78,8 @@
       dynamic_cast<derived_derived*>(boost::get_pointer(ptr));
 }
 
+#endif
+
 template <class BasePtr>
 bool check_static_pointer_cast(const BasePtr &ptr)
 {
@@ -107,7 +113,9 @@
 
         boost::shared_ptr<base> ptr(new derived);
 
+#if !defined( BOOST_NO_RTTI )
         BOOST_TEST( check_dynamic_pointer_cast( ptr ) );
+#endif
         BOOST_TEST( check_static_pointer_cast( ptr ) );
         BOOST_TEST( check_const_pointer_cast( ptr ) );
     }
@@ -117,7 +125,9 @@
 
         boost::scoped_ptr<base> ptr(new derived);
 
+#if !defined( BOOST_NO_RTTI )
         BOOST_TEST( check_dynamic_pointer_cast( ptr.get() ) );
+#endif
         BOOST_TEST( check_static_pointer_cast( ptr.get() ) );
         BOOST_TEST( check_const_pointer_cast( ptr.get() ) );
     }

Modified: branches/release/libs/smart_ptr/test/shared_from_this_test.cpp
==============================================================================
--- branches/release/libs/smart_ptr/test/shared_from_this_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/shared_from_this_test.cpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -63,10 +63,12 @@
 
         px->f();
 
+#if !defined( BOOST_NO_RTTI )
         boost::shared_ptr<Y> py2 = boost::dynamic_pointer_cast<Y>(px);
         BOOST_TEST(py.get() == py2.get());
         BOOST_TEST(!(py < py2 || py2 < py));
         BOOST_TEST(py.use_count() == 3);
+#endif
     }
     catch( boost::bad_weak_ptr const& )
     {

Modified: branches/release/libs/smart_ptr/test/shared_ptr_basic_test.cpp
==============================================================================
--- branches/release/libs/smart_ptr/test/shared_ptr_basic_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/shared_ptr_basic_test.cpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -188,6 +188,7 @@
             test_eq(p, q);
         }
 
+#if !defined( BOOST_NO_RTTI )
         shared_ptr<Y> p3 = dynamic_pointer_cast<Y>(p);
         shared_ptr<Y> p4 = dynamic_pointer_cast<Y>(p2);
 
@@ -201,6 +202,7 @@
         test_is_Y(p3);
         test_eq2(p, p3);
         test_ne2(p2, p4);
+#endif
 
         shared_ptr<void> p5(p);
 
@@ -214,13 +216,17 @@
 
         p.reset();
         p2.reset();
+#if !defined( BOOST_NO_RTTI )
         p3.reset();
         p4.reset();
+#endif
 
         test_is_zero(p);
         test_is_zero(p2);
+#if !defined( BOOST_NO_RTTI )
         test_is_zero(p3);
         test_is_zero(p4);
+#endif
 
         BOOST_TEST(p5.use_count() == 1);
 
@@ -250,6 +256,7 @@
             test_is_nonzero(wp2.lock());
         }
 
+#if !defined( BOOST_NO_RTTI )
         weak_ptr<Y> wp3 = dynamic_pointer_cast<Y>(wp2.lock());
 
         BOOST_TEST(wp3.use_count() == 1);
@@ -259,12 +266,15 @@
 
         BOOST_TEST(wp4.use_count() == 1);
         test_shared(wp2, wp4);
+#endif
 
         wp1 = p2;
         test_is_zero(wp1.lock());
 
+#if !defined( BOOST_NO_RTTI )
         wp1 = p4;
         wp1 = wp3;
+#endif
         wp1 = wp2;
 
         BOOST_TEST(wp1.use_count() == 1);
@@ -279,7 +289,9 @@
 
         BOOST_TEST(wp1.use_count() == 0);
         BOOST_TEST(wp2.use_count() == 0);
+#if !defined( BOOST_NO_RTTI )
         BOOST_TEST(wp3.use_count() == 0);
+#endif
 
         // Test operator< stability for std::set< weak_ptr<> >
         // Thanks to Joe Gottman for pointing this out

Modified: branches/release/libs/smart_ptr/test/shared_ptr_test.cpp
==============================================================================
--- branches/release/libs/smart_ptr/test/shared_ptr_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/shared_ptr_test.cpp 2009-12-06 12:50:28 EST (Sun, 06 Dec 2009)
@@ -2462,6 +2462,8 @@
 
 } // namespace n_const_cast
 
+#if !defined( BOOST_NO_RTTI )
+
 namespace n_dynamic_cast
 {
 
@@ -2527,6 +2529,8 @@
 
 } // namespace n_dynamic_cast
 
+#endif
+
 namespace n_map
 {
 
@@ -3200,10 +3204,12 @@
     BOOST_TEST(px.get() != 0);
     BOOST_TEST(py.use_count() == 2);
 
+#if !defined( BOOST_NO_RTTI )
     boost::shared_ptr<Y> py2 = boost::dynamic_pointer_cast<Y>(px);
     BOOST_TEST(py.get() == py2.get());
     BOOST_TEST(!(py < py2 || py2 < py));
     BOOST_TEST(py.use_count() == 3);
+#endif
 }
 
 } // namespace n_spt_shared_from_this
@@ -3229,7 +3235,9 @@
     n_comparison::test();
     n_static_cast::test();
     n_const_cast::test();
+#if !defined( BOOST_NO_RTTI )
     n_dynamic_cast::test();
+#endif
 
     n_map::test();
 


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