Hello,
Comments are in the code. Any help appreciated.
*.hpp
template
class mu
: public accumulator_base
{
typedef mu self_type;
typedef parameter::deduced par0_type;
typedef parameter::parameters params;
public:
typedef RealType result_type;
mu(result_type value):value_(value){}
template<typename Args>
mu(const Args& args):value_((result_type)(0)){
// compile bottleneck (caused by the assigment, not the rhs)
const self_type& input = params()(args);
value_ = input.value_;
}
private:
result_type value_;
};
*cpp:
typedef mpl::int_<0> id0_t;
typedef accumulators::tag::mu mu0_t;
typedef boost::mpl::vector<
mu0_t
> explicit_entities;
typedef double value_type;
typedef accumulators::accumulator_set<
value_type,
explicit_entities
> acc_type;
typedef mpl::apply::type input0_type;
input0_type input0(0.5);
// acc_type acc; // compiles fast
acc_type acc((input0)); // compiles forever