Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77514 - in trunk: boost/property_map libs/property_map/doc
From: jewillco_at_[hidden]
Date: 2012-03-24 13:30:15


Author: jewillco
Date: 2012-03-24 13:30:14 EDT (Sat, 24 Mar 2012)
New Revision: 77514
URL: http://svn.boost.org/trac/boost/changeset/77514

Log:
Applied suggestions from Michel Morin
Text files modified:
   trunk/boost/property_map/function_property_map.hpp | 12 ++++--------
   trunk/libs/property_map/doc/function_property_map.html | 2 +-
   2 files changed, 5 insertions(+), 9 deletions(-)

Modified: trunk/boost/property_map/function_property_map.hpp
==============================================================================
--- trunk/boost/property_map/function_property_map.hpp (original)
+++ trunk/boost/property_map/function_property_map.hpp 2012-03-24 13:30:14 EDT (Sat, 24 Mar 2012)
@@ -10,8 +10,8 @@
 //=======================================================================
 //
 
-#ifndef BOOST_PROPERTY_MAP_FUNCTION_PROPERTY_MAP_H
-#define BOOST_PROPERTY_MAP_FUNCTION_PROPERTY_MAP_H
+#ifndef BOOST_PROPERTY_MAP_FUNCTION_PROPERTY_MAP_HPP
+#define BOOST_PROPERTY_MAP_FUNCTION_PROPERTY_MAP_HPP
 
 #include <boost/config.hpp>
 #include <boost/property_map/property_map.hpp>
@@ -23,7 +23,7 @@
 
 namespace boost {
 
-template<typename Func, typename Key, typename Ret = typename boost::result_of<Func(Key)>::type>
+template<typename Func, typename Key, typename Ret = typename boost::result_of<const Func(const Key&)>::type>
 class function_property_map: public put_get_helper<Ret, function_property_map<Func, Key, Ret> > {
   public:
   typedef Key key_type;
@@ -45,10 +45,6 @@
     return f(k);
   }
 
- reference operator[](const Key& k) {
- return f(k);
- }
-
   private:
   Func f;
 };
@@ -67,4 +63,4 @@
 
 } // boost
 
-#endif /* BOOST_PROPERTY_MAP_FUNCTION_PROPERTY_MAP_H */
+#endif /* BOOST_PROPERTY_MAP_FUNCTION_PROPERTY_MAP_HPP */

Modified: trunk/libs/property_map/doc/function_property_map.html
==============================================================================
--- trunk/libs/property_map/doc/function_property_map.html (original)
+++ trunk/libs/property_map/doc/function_property_map.html 2012-03-24 13:30:14 EDT (Sat, 24 Mar 2012)
@@ -68,7 +68,7 @@
 <TR>
 <TD><TT>Ref</TT></TD>
 <TD>The result type of the function.</TD>
-<TD><TT>boost::result_of&lt;UnaryFunction(Key)&gt;::type</TT></TD>
+<TD><TT>boost::result_of&lt;const UnaryFunction(const Key&amp;)&gt;::type</TT></TD>
 </TR>
 
 


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