Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2008-06-04 11:37:57


Author: nesotto
Date: 2008-06-04 11:37:56 EDT (Wed, 04 Jun 2008)
New Revision: 46120
URL: http://svn.boost.org/trac/boost/changeset/46120

Log:
minor fixes
Removed:
   trunk/boost/ptr_container/ptr_unoredered_map.hpp
Text files modified:
   trunk/boost/ptr_container/detail/associative_ptr_container.hpp | 8 ++++++--
   1 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/boost/ptr_container/detail/associative_ptr_container.hpp
==============================================================================
--- trunk/boost/ptr_container/detail/associative_ptr_container.hpp (original)
+++ trunk/boost/ptr_container/detail/associative_ptr_container.hpp 2008-06-04 11:37:56 EDT (Wed, 04 Jun 2008)
@@ -61,6 +61,10 @@
                                 const_local_iterator;
         typedef BOOST_DEDUCED_TYPENAME base_type::size_type
                                 size_type;
+ typedef BOOST_DEDUCED_TYPENAME base_type::reference
+ reference;
+ typedef BOOST_DEDUCED_TYPENAME base_type::const_reference
+ const_reference;
 
     public: // foundation
         associative_ptr_container()
@@ -275,7 +279,7 @@
         reference front()
         {
             BOOST_ASSERT( !this->empty() );
- BOOST_ASSERT( !::boost::is_null( this->begin() ) );
+ BOOST_ASSERT( *this->begin().base() != 0 );
             return *this->begin();
         }
 
@@ -287,7 +291,7 @@
         reference back()
         {
             BOOST_ASSERT( !this->empty() );
- BOOST_ASSERT( !::boost::is_null( --this->end() ) );
+ BOOST_ASSERT( *(--this->end()).base() != 0 );
             return *--this->end();
         }
 

Deleted: trunk/boost/ptr_container/ptr_unoredered_map.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_unoredered_map.hpp 2008-06-04 11:37:56 EDT (Wed, 04 Jun 2008)
+++ (empty file)
@@ -1,151 +0,0 @@
-//
-// Boost.Pointer Container
-//
-// Copyright Thorsten Ottosen 2003-2005. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/ptr_container/
-//
-
-#ifndef BOOST_PTR_CONTAINER_PTR_MAP_HPP
-#define BOOST_PTR_CONTAINER_PTR_MAP_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif
-
-#include <map>
-#include <boost/ptr_container/ptr_map_adapter.hpp>
-
-namespace boost
-{
-
- template
- <
- class Key,
- class T,
- class Compare = std::less<Key>,
- class CloneAllocator = heap_clone_allocator,
- class Allocator = std::allocator< std::pair<const Key,void*> >
- >
- class ptr_map :
- public ptr_map_adapter<T,std::map<Key,void*,
- Compare,Allocator>,CloneAllocator>
- {
- typedef ptr_map_adapter<T,std::map<Key,void*,
- Compare,Allocator>,CloneAllocator>
- base_type;
-
- typedef ptr_map<Key,T,Compare,CloneAllocator,Allocator> this_type;
-
- public:
- explicit ptr_map( const Compare& comp = Compare(),
- const Allocator& a = Allocator() )
- : base_type( comp, a ) { }
-
- template< class InputIterator >
- ptr_map( InputIterator first, InputIterator last,
- const Compare& comp = Compare(),
- const Allocator& a = Allocator() )
- : base_type( first, last, comp, a )
- { }
-
- BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( ptr_map, base_type,
- this_type );
-
- template< class U >
- ptr_map( const ptr_map<Key,U>& r ) : base_type( r )
- { }
-
- template< class U >
- ptr_map& operator=( const ptr_map<Key,U>& r )
- {
- base_type::operator=( r );
- return *this;
- }
- };
-
-
-
- template
- <
- class Key,
- class T,
- class Compare = std::less<Key>,
- class CloneAllocator = heap_clone_allocator,
- class Allocator = std::allocator< std::pair<const Key,void*> >
- >
- class ptr_multimap :
- public ptr_multimap_adapter<T,std::multimap<Key,void*,
- Compare,Allocator>,CloneAllocator>
- {
- typedef ptr_multimap_adapter<T,std::multimap<Key,void*,
- Compare,Allocator>,CloneAllocator>
- base_type;
-
- typedef ptr_multimap<Key,T,Compare,CloneAllocator,Allocator> this_type;
-
- public:
- explicit ptr_multimap( const Compare& comp = Compare(),
- const Allocator& a = Allocator() )
- : base_type( comp, a ) { }
-
- template< class InputIterator >
- ptr_multimap( InputIterator first, InputIterator last,
- const Compare& comp = Compare(),
- const Allocator& a = Allocator() )
- : base_type( first, last, comp, a )
- { }
-
- BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( ptr_multimap,
- base_type,
- this_type );
-
- template< class U >
- ptr_multimap( const ptr_multimap<Key,U>& r ) : base_type( r )
- { }
-
- template< class U >
- ptr_multimap& operator=( const ptr_multimap<Key,U>& r )
- {
- base_type::operator=( r );
- return *this;
- }
- };
-
- //////////////////////////////////////////////////////////////////////////////
- // clonability
-
- template< class K, class T, class C, class CA, class A >
- inline ptr_map<K,T,C,CA,A>* new_clone( const ptr_map<K,T,C,CA,A>& r )
- {
- return r.clone().release();
- }
-
- template< class K, class T, class C, class CA, class A >
- inline ptr_multimap<K,T,C,CA,A>* new_clone( const ptr_multimap<K,T,C,CA,A>& r )
- {
- return r.clone().release();
- }
-
- /////////////////////////////////////////////////////////////////////////
- // swap
-
- template< typename K, typename T, typename C, typename CA, typename A >
- inline void swap( ptr_map<K,T,C,CA,A>& l, ptr_map<K,T,C,CA,A>& r )
- {
- l.swap(r);
- }
-
- template< typename K, typename T, typename C, typename CA, typename A >
- inline void swap( ptr_multimap<K,T,C,CA,A>& l, ptr_multimap<K,T,C,CA,A>& r )
- {
- l.swap(r);
- }
-
-
-}
-
-#endif


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