Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75593 - trunk/boost/property_tree/detail
From: sebastian.redl_at_[hidden]
Date: 2011-11-21 08:11:18


Author: cornedbee
Date: 2011-11-21 08:11:18 EST (Mon, 21 Nov 2011)
New Revision: 75593
URL: http://svn.boost.org/trac/boost/changeset/75593

Log:
Improve pair member bug workaround: should now hopefully work with Intel; also improve code clarity. See bug #5307.
Text files modified:
   trunk/boost/property_tree/detail/ptree_implementation.hpp | 19 ++++++++-----------
   1 files changed, 8 insertions(+), 11 deletions(-)

Modified: trunk/boost/property_tree/detail/ptree_implementation.hpp
==============================================================================
--- trunk/boost/property_tree/detail/ptree_implementation.hpp (original)
+++ trunk/boost/property_tree/detail/ptree_implementation.hpp 2011-11-21 08:11:18 EST (Mon, 21 Nov 2011)
@@ -17,8 +17,10 @@
 #include <boost/utility/swap.hpp>
 #include <memory>
 
-#if defined(BOOST_MSVC) && \
- (_MSC_FULL_VER >= 160000000 && _MSC_FULL_VER < 170000000)
+#if (defined(BOOST_MSVC) && \
+ (_MSC_FULL_VER >= 160000000 && _MSC_FULL_VER < 170000000)) || \
+ (defined(BOOST_INTEL_WIN) && \
+ defined(BOOST_DINKUMWARE_STDLIB))
 #define BOOST_PROPERTY_TREE_PAIR_BUG
 #endif
 
@@ -34,28 +36,23 @@
         // class. Unfortunately this does break the interface.
         BOOST_STATIC_CONSTANT(unsigned,
             first_offset = offsetof(value_type, first));
+#endif
         typedef multi_index_container<value_type,
             multi_index::indexed_by<
                 multi_index::sequenced<>,
                 multi_index::ordered_non_unique<multi_index::tag<by_name>,
+#if defined(BOOST_PROPERTY_TREE_PAIR_BUG)
                     multi_index::member_offset<value_type, const key_type,
                                         first_offset>,
- key_compare
- >
- >
- > base_container;
 #else
- typedef multi_index_container<value_type,
- multi_index::indexed_by<
- multi_index::sequenced<>,
- multi_index::ordered_non_unique<multi_index::tag<by_name>,
                     multi_index::member<value_type, const key_type,
                                         &value_type::first>,
+#endif
                     key_compare
>
>
> base_container;
-#endif
+
         // The by-name lookup index.
         typedef typename base_container::template index<by_name>::type
             by_name_index;


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