]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/property_map.hpp
typos
[lyx.git] / boost / boost / property_map.hpp
index e8611e62e1356ade392dbbe59fa7c96be0219cfb..9077ea37cd10d3f690e08462244cacbad706b2dd 100644 (file)
@@ -1,16 +1,17 @@
-//  (C) Copyright Jeremy Siek 1999-2001. Permission to copy, use, modify,
-//  sell and distribute this software is granted provided this
-//  copyright notice appears in all copies. This software is provided
-//  "as is" without express or implied warranty, and with no claim as
-//  to its suitability for any purpose.
+//  (C) Copyright Jeremy Siek 1999-2001.
+// Distributed under 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)
+
+//  See http://www.boost.org/libs/property_map for documentation.
 
 #ifndef BOOST_PROPERTY_MAP_HPP
 #define BOOST_PROPERTY_MAP_HPP
 
 #include <cassert>
-#include <iterator>
 #include <boost/config.hpp>
 #include <boost/pending/cstddef.hpp>
+#include <boost/detail/iterator.hpp>
 #include <boost/concept_check.hpp>
 #include <boost/concept_archetype.hpp>
 
@@ -169,7 +170,9 @@ namespace boost {
   };
   template <typename K, typename V>
   const typename readable_property_map_archetype<K,V>::reference&
-  get(const readable_property_map_archetype<K,V>&, const K&) {
+  get(const readable_property_map_archetype<K,V>&, 
+      const typename readable_property_map_archetype<K,V>::key_type&)
+  {
     typedef typename readable_property_map_archetype<K,V>::reference R;
     return static_object<R>::get();
   }
@@ -197,7 +200,9 @@ namespace boost {
     typedef writable_property_map_tag category;
   };
   template <typename K, typename V>
-  void put(const writable_property_map_archetype<K,V>&, const K&, const V&) { }
+  void put(const writable_property_map_archetype<K,V>&, 
+           const typename writable_property_map_archetype<K,V>::key_type&, 
+           const typename writable_property_map_archetype<K,V>::value_type&) { }
 
 
   template <class PMap, class Key>
@@ -233,10 +238,10 @@ namespace boost {
     void constraints() {
       function_requires< ReadablePropertyMapConcept<PMap, Key> >();
       function_requires< ConvertibleConcept<Category, LvalueTag> >();
-      
+
+      typedef typename property_traits<PMap>::value_type value_type;
       typedef typename require_same<
-        const typename property_traits<PMap>::value_type&,
-        reference>::type req;
+        const value_type&, reference>::type req;
 
       reference ref = pmap[k];
       ignore_unused_variable_warning(ref);
@@ -266,8 +271,10 @@ namespace boost {
     void constraints() { 
       boost::function_requires< ReadWritePropertyMapConcept<PMap, Key> >();
       boost::function_requires<ConvertibleConcept<Category, LvalueTag> >();
+      
+      typedef typename property_traits<PMap>::value_type value_type;
       typedef typename require_same<
-        typename property_traits<PMap>::value_type&,
+        value_type&,
         reference>::type req;
 
       reference ref = pmap[k];
@@ -389,10 +396,11 @@ namespace boost {
     typedef boost::lvalue_property_map_tag category;
 
     inline safe_iterator_property_map(
-      RandomAccessIterator first = RandomAccessIterator()
-      std::size_t n = 0, 
+      RandomAccessIterator first, 
+      std::size_t n_ = 0, 
       const IndexMap& _id = IndexMap() ) 
-      : iter(first), n(n), index(_id) { }
+      : iter(first), n(n_), index(_id) { }
+    inline safe_iterator_property_map() { }
     inline R operator[](key_type v) const {
       assert(get(index, v) < n);
       return *(iter + get(index, v)) ;
@@ -408,14 +416,14 @@ namespace boost {
   template <class RAIter, class ID>
   inline safe_iterator_property_map<
     RAIter, ID,
-    typename std::iterator_traits<RAIter>::value_type,
-    typename std::iterator_traits<RAIter>::reference>
+    typename boost::detail::iterator_traits<RAIter>::value_type,
+    typename boost::detail::iterator_traits<RAIter>::reference>
   make_safe_iterator_property_map(RAIter iter, std::size_t n, ID id) {
     function_requires< RandomAccessIteratorConcept<RAIter> >();
     typedef safe_iterator_property_map<
       RAIter, ID,
-      typename std::iterator_traits<RAIter>::value_type,
-      typename std::iterator_traits<RAIter>::reference> PA;
+      typename boost::detail::iterator_traits<RAIter>::value_type,
+      typename boost::detail::iterator_traits<RAIter>::reference> PA;
     return PA(iter, n, id);
   }
 #endif