19 Jun
2013
19 Jun
'13
3:03 p.m.
Hi Gonzalo, Gonzalo Brito Gadeschi wrote:
Someone suggested to use boost::size in the other thread, but size does
boost::end(rng) - boost::begin(rng)
which is not the number of elements in the filtered range.
Try boost::distance(rng | filtered(pred)). Size shouldn't even compile, since it requires random access, and a filtered range cannot be random access. HTH, Nate