Opened 7 years ago

#12100 new Bugs

including <boost/accumulators/statistics/rolling_mean.hpp> brings static c++ initializers into my code

Reported by: Richard Powell <rmpowell77@…> Owned by: Eric Niebler
Milestone: To Be Determined Component: accumulator
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

At least I think so.

If I #include <boost/accumulators/statistics/rolling_mean.hpp>

Then I see that I have static variables that will need to be initialized. Because I want to include my code as a framework for other projects, we have a policy of avoiding having static initializers run (because of dynamic linkage).

I believe the issue is with the extractors:

namespace extract {

extractor<tag::lazy_rolling_mean> const lazy_rolling_mean = {}; extractor<tag::immediate_rolling_mean> const immediate_rolling_mean = {}; extractor<tag::rolling_mean> const rolling_mean = {};

BOOST_ACCUMULATORS_IGNORE_GLOBAL(lazy_rolling_mean)

BOOST_ACCUMULATORS_IGNORE_GLOBAL(immediate_rolling_mean) BOOST_ACCUMULATORS_IGNORE_GLOBAL(rolling_mean)

}

using extract::lazy_rolling_mean; using extract::immediate_rolling_mean; using extract::rolling_mean;

I think lazy_rolling_mean is the issue.

Change History (0)

Note: See TracTickets for help on using tickets.