Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80420 - trunk/boost/pending
From: jewillco_at_[hidden]
Date: 2012-09-06 09:44:21


Author: jewillco
Date: 2012-09-06 09:44:21 EDT (Thu, 06 Sep 2012)
New Revision: 80420
URL: http://svn.boost.org/trac/boost/changeset/80420

Log:
Fixed issues with indirect_cmp; fixes #7338
Text files modified:
   trunk/boost/pending/indirect_cmp.hpp | 5 +++--
   1 files changed, 3 insertions(+), 2 deletions(-)

Modified: trunk/boost/pending/indirect_cmp.hpp
==============================================================================
--- trunk/boost/pending/indirect_cmp.hpp (original)
+++ trunk/boost/pending/indirect_cmp.hpp 2012-09-06 09:44:21 EDT (Thu, 06 Sep 2012)
@@ -33,14 +33,15 @@
     typedef typename boost::property_traits<ReadablePropertyMap>::key_type K;
     typedef K first_argument_type;
     typedef K second_argument_type;
- typedef T result_type;
+ typedef bool result_type;
     inline indirect_cmp(const ReadablePropertyMap& df, const Compare& c = Compare())
       : d(df), cmp(c) { }
 
     template <class A, class B>
     inline bool
     operator()(const A& u, const B& v) const {
- T du = get(d, u), dv = get(d, v);
+ const T& du = get(d, u);
+ const T& dv = get(d, v);
       return cmp(du, dv);
     }
   protected:


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