Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-06-26 06:36:28


Whoops... I overlooked this post - now we have a duplicate answer.

dan marsden wrote:
> Sorry for the slow reply, I had to think a bit about which approach I preferred.
>
> Does the attached code, using transform_view do what you need?

Seems a bit nicer of a solution than what I suggested.

> I'm not comfortable adding non const ctors to vector for a few reasons, so I'd prefer this approach if possible.

Still, it's just a workaround (IMHO) as it requires us to transform the
whole sequence just because we can't keep it from getting const
qualified. It certainly adds compile time overhead and I bet it even
directly or indirectly infers code with some compilers.

What about making the existing "Seq const & ctor" accept reference wrappers?

Regards,
Tobias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk