|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80927 - in branches/release: . boost boost/accumulators/framework boost/accumulators/statistics status
From: eric_at_[hidden]
Date: 2012-10-09 22:22:25
Author: eric_niebler
Date: 2012-10-09 22:22:24 EDT (Tue, 09 Oct 2012)
New Revision: 80927
URL: http://svn.boost.org/trac/boost/changeset/80927
Log:
accumulators: fix long-standing dependency tracking bug. merge [80826], [80885], [80888] from trunk. fixes #7409
Properties modified:
branches/release/ (props changed)
branches/release/boost/ (props changed)
branches/release/status/ (props changed)
branches/release/status/explicit-failures-markup.xml (contents, props changed)
Text files modified:
branches/release/boost/accumulators/framework/depends_on.hpp | 41 ++++++++++++++++++++++++++++++++++++++-
branches/release/boost/accumulators/statistics/density.hpp | 2
branches/release/status/explicit-failures-markup.xml | 2 +
3 files changed, 42 insertions(+), 3 deletions(-)
Modified: branches/release/boost/accumulators/framework/depends_on.hpp
==============================================================================
--- branches/release/boost/accumulators/framework/depends_on.hpp (original)
+++ branches/release/boost/accumulators/framework/depends_on.hpp 2012-10-09 22:22:24 EDT (Tue, 09 Oct 2012)
@@ -11,6 +11,8 @@
#include <boost/version.hpp>
#include <boost/mpl/end.hpp>
#include <boost/mpl/map.hpp>
+#include <boost/mpl/set.hpp>
+#include <boost/mpl/copy.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/sort.hpp>
@@ -26,6 +28,7 @@
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/insert_range.hpp>
+#include <boost/mpl/back_inserter.hpp>
#include <boost/mpl/transform_view.hpp>
#include <boost/mpl/inherit_linearly.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
@@ -94,15 +97,49 @@
template<typename A, typename B>
struct is_dependent_on
: is_base_and_derived<
- typename undroppable<B>::type
+ typename feature_of<typename undroppable<B>::type>::type
, typename undroppable<A>::type
>
{};
+ template<typename Feature>
+ struct dependencies_of
+ {
+ typedef typename Feature::dependencies type;
+ };
+
+ // Should use mpl::insert_range, but doesn't seem to work with mpl sets
+ template<typename Set, typename Range>
+ struct set_insert_range
+ : mpl::fold<
+ Range
+ , Set
+ , mpl::insert<mpl::_1, mpl::_2>
+ >
+ {};
+
+ template<typename Features>
+ struct collect_abstract_features
+ : mpl::fold<
+ Features
+ , mpl::set0<>
+ , set_insert_range<
+ mpl::insert<mpl::_1, feature_of<mpl::_2> >
+ , collect_abstract_features<dependencies_of<mpl::_2> >
+ >
+ >
+ {};
+
template<typename Features>
struct depends_on_base
: mpl::inherit_linearly<
- typename mpl::sort<Features, is_dependent_on<mpl::_1, mpl::_2> >::type
+ typename mpl::sort<
+ typename mpl::copy<
+ typename collect_abstract_features<Features>::type
+ , mpl::back_inserter<mpl::vector0<> >
+ >::type
+ , is_dependent_on<mpl::_1, mpl::_2>
+ >::type
// Don't inherit multiply from a feature
, mpl::if_<
is_dependent_on<mpl::_1, mpl::_2>
Modified: branches/release/boost/accumulators/statistics/density.hpp
==============================================================================
--- branches/release/boost/accumulators/statistics/density.hpp (original)
+++ branches/release/boost/accumulators/statistics/density.hpp 2012-10-09 22:22:24 EDT (Tue, 09 Oct 2012)
@@ -95,7 +95,7 @@
}
// Once cache_size samples have been accumulated, create num_bins bins of same size between
- // the minimum and maximum of the cached samples as well as an under- and and an overflow bin.
+ // the minimum and maximum of the cached samples as well as under and overflow bins.
// Store their lower bounds (bin_positions) and fill the bins with the cached samples (samples_in_bin).
if (cnt == this->cache_size)
{
Modified: branches/release/status/explicit-failures-markup.xml
==============================================================================
--- branches/release/status/explicit-failures-markup.xml (original)
+++ branches/release/status/explicit-failures-markup.xml 2012-10-09 22:22:24 EDT (Tue, 09 Oct 2012)
@@ -45,6 +45,8 @@
<toolset name="sun-5.8"/>
<toolset name="sun-5.9"/>
<toolset name="borland-*"/>
+ <toolset name="vacpp-*"/>
+ <toolset name="cray-*"/>
</mark-unusable>
<mark-expected-failures>
<test name="tail_variate_means"/>
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