
6 May
2015
6 May
'15
11:43 a.m.
Le 06/05/15 13:24, Alex Perry a écrit :
On 05 May 2015 23:24 Boris Rasin [mailto:boris@pointx.org] wrote:
On 5/6/2015 1:08 AM, James Armstrong wrote:
Do you mean something that would work along the lines of...
Snip...
//iterate through doubles for (auto itr = itr_begin<double>(my_vec); itr != itr_end<double>(my_vec); ++itr) { // ... } Snip Yes. And this would work with std::vectorboost::any and std::listboost::variant alike. How would this differ from using boost.range filters?
eg #include
for (auto & val : boost::adaptors::filter(my_vec, []( boost::any & i) { return !i.empty() && i.type() == typeid(int); } ) ) { }
I suspect the reason is efficiency? Vicente