Boost logo

Boost Users :

Subject: [Boost-users] [fusion] filter_if at run-time???
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2013-03-12 09:04:28


I've got a fusion set say:

set<int, optional<double>, bool> s(...)

I'd like to filter out empty optional<double> values when streaming out:

std::cout << s;

so for s(1, 2.0, true) ==> (1,2.0,true)

and for s(3, optional<double>(), false) ==> (2,false)

filter_if's predicate is an a Metafunction returning mpl::bool_ so it
looks to me like this won't support run time?

Is there another facility that would achieve the above?

Thanks, Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net