Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50501 - in sandbox/partition_point/boost: iterator partition_point partition_point/detail
From: aschoedl_at_[hidden]
Date: 2009-01-07 09:51:30


Author: schoedl
Date: 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
New Revision: 50501
URL: http://svn.boost.org/trac/boost/changeset/50501

Log:
use nested detail::<library> namespaces
Text files modified:
   sandbox/partition_point/boost/iterator/indirect_partition_point.hpp | 6 ++--
   sandbox/partition_point/boost/iterator/shared_container_partition_point.hpp | 2
   sandbox/partition_point/boost/iterator/transform_partition_point.hpp | 2
   sandbox/partition_point/boost/partition_point/detail/lazy_typedef.hpp | 44 ++++++++++++++++++++--------------------
   sandbox/partition_point/boost/partition_point/partition_algorithms.hpp | 12 +++++-----
   sandbox/partition_point/boost/partition_point/partition_range_algorithms.hpp | 12 +++++-----
   6 files changed, 39 insertions(+), 39 deletions(-)

Modified: sandbox/partition_point/boost/iterator/indirect_partition_point.hpp
==============================================================================
--- sandbox/partition_point/boost/iterator/indirect_partition_point.hpp (original)
+++ sandbox/partition_point/boost/iterator/indirect_partition_point.hpp 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
@@ -15,7 +15,7 @@
 // so a pointer-to-member cannot be used. There is also no functor defined
 // in std for the dereference operator, so we define our own.
 // It takes the functor by value just like boost::bind.
-namespace detail {
+namespace detail { namespace iterator {
         template< class UnaryPred >
         struct chain_dereference {
         private:
@@ -30,7 +30,7 @@
                         return m_pred( *t );
                 }
         };
-}
+}} // namespace detail::iterator
 
 /* Template functions lower_bound, upper_bound, equal_range and binary_search
 expressed in terms of partition_point, special version for indirect_iterator */
@@ -41,7 +41,7 @@
     partition_point(
       itBegin.base(),
       itEnd.base(),
- detail::chain_dereference<UnaryPred>( pred )
+ detail::iterator::chain_dereference<UnaryPred>( pred )
     )
   );
 }

Modified: sandbox/partition_point/boost/iterator/shared_container_partition_point.hpp
==============================================================================
--- sandbox/partition_point/boost/iterator/shared_container_partition_point.hpp (original)
+++ sandbox/partition_point/boost/iterator/shared_container_partition_point.hpp 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
@@ -25,6 +25,6 @@
   );
 }
 
-}; /* namespace */
+}; // namespace boost
 
 #endif // BOOST_SHARED_CONTAINER_PARTITION_POINT_HPP
\ No newline at end of file

Modified: sandbox/partition_point/boost/iterator/transform_partition_point.hpp
==============================================================================
--- sandbox/partition_point/boost/iterator/transform_partition_point.hpp (original)
+++ sandbox/partition_point/boost/iterator/transform_partition_point.hpp 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
@@ -26,6 +26,6 @@
   );
 }
 
-}; /* namespace */
+}; // namespace boost
 
 #endif // BOOST_TRANSFORM_PARTITION_POINT_HPP
\ No newline at end of file

Modified: sandbox/partition_point/boost/partition_point/detail/lazy_typedef.hpp
==============================================================================
--- sandbox/partition_point/boost/partition_point/detail/lazy_typedef.hpp (original)
+++ sandbox/partition_point/boost/partition_point/detail/lazy_typedef.hpp 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
@@ -9,32 +9,32 @@
 
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // required for lazy_typedef to work as intended
 
-namespace boost {
- namespace detail {
- template< typename T > struct exists { typedef void type; };
- }
-}
-
-// Defines lazy_typedef_[some_typedef]<T> which exposes T::[some_typedef] as lazy_typedef_[some_typedef]<T>::type
-// if T::[some_typedef] exists. Otherwise lazy_typedef_[some_typedef]<T> is empty.
-#define BOOST_DECLARE_LAZY_TYPEDEF( some_typedef ) \
- template< typename C, typename Enable=void > \
- struct lazy_typedef_ ## some_typedef \
- {}; \
- template< typename C > \
- struct lazy_typedef_ ## some_typedef< C \
- , BOOST_DEDUCED_TYPENAME boost::detail::exists< BOOST_DEDUCED_TYPENAME C::some_typedef >::type \
- > { \
- typedef BOOST_DEDUCED_TYPENAME C::some_typedef type; \
+namespace boost { namespace detail { namespace partition_point {
+ template< typename T > struct exists { typedef void type; };
+}}} // boost::detail::partition_point
+
+// Defines lazy_typedef_[some_typedef]<T> which exposes T::[some_typedef]
+// as lazy_typedef_[some_typedef]<T>::type if T::[some_typedef] exists.
+// Otherwise lazy_typedef_[some_typedef]<T> is empty.
+#define BOOST_DECLARE_LAZY_TYPEDEF( some_typedef ) \
+ template< typename C, typename Enable=void > \
+ struct lazy_typedef_ ## some_typedef \
+ {}; \
+ template< typename C > \
+ struct lazy_typedef_ ## some_typedef< C, \
+ BOOST_DEDUCED_TYPENAME boost::detail::partition_point::exists< \
+ BOOST_DEDUCED_TYPENAME C::some_typedef >::type \
+ > { \
+ typedef BOOST_DEDUCED_TYPENAME C::some_typedef type; \
         };
 
 #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
-#define BOOST_DECLARE_LAZY_TYPEDEF( some_typedef ) \
- template< typename C > \
- struct lazy_typedef_ ## some_typedef \
- { \
- typedef BOOST_DEDUCED_TYPENAME C::some_typedef type; \
+#define BOOST_DECLARE_LAZY_TYPEDEF( some_typedef ) \
+ template< typename C > \
+ struct lazy_typedef_ ## some_typedef \
+ { \
+ typedef BOOST_DEDUCED_TYPENAME C::some_typedef type; \
         };
 
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

Modified: sandbox/partition_point/boost/partition_point/partition_algorithms.hpp
==============================================================================
--- sandbox/partition_point/boost/partition_point/partition_algorithms.hpp (original)
+++ sandbox/partition_point/boost/partition_point/partition_algorithms.hpp 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
@@ -18,14 +18,14 @@
 
 namespace boost {
 
- namespace detail {
+ namespace detail { namespace partition_point {
                 struct generic_less {
                         template< class T1, class T2 >
                         bool operator()( T1 const& t1, T2 const& t2 ) const {
                                 return t1 < t2;
                         }
                 };
- }
+ }} // namespace detail::partition_point
 
         namespace partition_algorithms_adl_barrier {
 
@@ -66,22 +66,22 @@
 
                 template< typename It, typename Val >
                 It lower_bound(It itBegin,It itEnd,Val const& x) {
- return boost::lower_bound( itBegin, itEnd, x, ::boost::detail::generic_less() );
+ return boost::lower_bound( itBegin, itEnd, x, ::boost::detail::partition_point::generic_less() );
                 }
 
                 template< typename It, typename Val >
                 It upper_bound(It itBegin,It itEnd,Val const& x) {
- return boost::upper_bound( itBegin, itEnd, x, ::boost::detail::generic_less() );
+ return boost::upper_bound( itBegin, itEnd, x, ::boost::detail::partition_point::generic_less() );
                 }
 
                 template< typename It, typename Val >
                 bool binary_search(It itBegin,It itEnd,Val const& x) {
- return boost::binary_search( itBegin, itEnd, x, ::boost::detail::generic_less() );
+ return boost::binary_search( itBegin, itEnd, x, ::boost::detail::partition_point::generic_less() );
                 }
 
                 template< typename It, typename Val >
                 std::pair<It,It> equal_range(It itBegin,It itEnd,Val const& x) {
- return boost::equal_range( itBegin, itEnd, x, ::boost::detail::generic_less() );
+ return boost::equal_range( itBegin, itEnd, x, ::boost::detail::partition_point::generic_less() );
                 }
         }
 

Modified: sandbox/partition_point/boost/partition_point/partition_range_algorithms.hpp
==============================================================================
--- sandbox/partition_point/boost/partition_point/partition_range_algorithms.hpp (original)
+++ sandbox/partition_point/boost/partition_point/partition_range_algorithms.hpp 2009-01-07 09:51:29 EST (Wed, 07 Jan 2009)
@@ -23,12 +23,12 @@
                 // default
                 //////////////////////////////////////////////////////////////////////////
             
- namespace detail {
+ namespace detail { namespace range {
                         BOOST_DECLARE_LAZY_TYPEDEF( const_iterator )
- }
+ }}
 
                 template< typename C >
- struct range_const_iterator: detail::lazy_typedef_const_iterator<C>
+ struct range_const_iterator: detail::range::lazy_typedef_const_iterator<C>
                 {};
             
                 //////////////////////////////////////////////////////////////////////////
@@ -55,12 +55,12 @@
                 // default
                 //////////////////////////////////////////////////////////////////////////
             
- namespace detail {
+ namespace detail { namespace range {
                         BOOST_DECLARE_LAZY_TYPEDEF( iterator )
- }
+ }}
 
                 template< typename C >
- struct range_mutable_iterator: detail::lazy_typedef_iterator<C>
+ struct range_mutable_iterator: detail::range::lazy_typedef_iterator<C>
                 {};
             
                 //////////////////////////////////////////////////////////////////////////


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