Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61919 - trunk/boost/property_map/parallel
From: jewillco_at_[hidden]
Date: 2010-05-11 16:32:46


Author: jewillco
Date: 2010-05-11 16:32:46 EDT (Tue, 11 May 2010)
New Revision: 61919
URL: http://svn.boost.org/trac/boost/changeset/61919

Log:
Applied patch from Joaquín M López Muñoz to work around VC++ 10 issue
Text files modified:
   trunk/boost/property_map/parallel/distributed_property_map.hpp | 21 ++++++++++++++++++---
   1 files changed, 18 insertions(+), 3 deletions(-)

Modified: trunk/boost/property_map/parallel/distributed_property_map.hpp
==============================================================================
--- trunk/boost/property_map/parallel/distributed_property_map.hpp (original)
+++ trunk/boost/property_map/parallel/distributed_property_map.hpp 2010-05-11 16:32:46 EDT (Tue, 11 May 2010)
@@ -264,6 +264,23 @@
     property_map_multiput
   };
 
+ // Code from Joaquín M López Muñoz to work around unusual implementation of
+ // std::pair in VC++ 10:
+ template<typename First,typename Second>
+ class pair_first_extractor {
+ typedef std::pair<First,Second> value_type;
+
+ public:
+ typedef First result_type;
+ const result_type& operator()(const value_type& x) const {
+ return x.first;
+ }
+
+ result_type& operator()(value_type& x) const {
+ return x.first;
+ }
+ };
+
  public:
   /// The type of the ghost cells
   typedef multi_index::multi_index_container<
@@ -271,9 +288,7 @@
             multi_index::indexed_by<
               multi_index::sequenced<>,
               multi_index::hashed_unique<
- multi_index::member<std::pair<key_type, value_type>,
- key_type,
- &std::pair<key_type, value_type>::first>
+ pair_first_extractor<key_type, value_type>
>
>
> ghost_cells_type;


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