
3 Feb
2006
3 Feb
'06
1:02 p.m.
Neal Becker wrote:
For what it's worth, the use case I most often employ is:
template<typename out_t, typename in_t> out_t func (in_t const& in) { out = out_t (boost::size (in)); do something return out; }
I realize this isn't always efficient, but it's very convenient. Also, I hope my preferred compiler (gcc-4.1) will perform RVO.
This reminds me thar there is another reason for not supplying "output ranges": out_t = boost::copy_range<out_t>( rng | xxx | yyy ); and this is optimal with RVO. -Thorsten