Hi boost users!

I'm having some lifetime issues with range adaptors. It seems boost adaptors (at least, transformed_range) only store iterators from the original range, letting it go out of scope [1].

Unfortunately, this makes boost adaptors not compatible with ranges that return iterators that are only valid while the original range is in scope (ie: any iterator that references the original range).

This type of ranges are useful to avoid the fat-iterator problem, as seen here [2]. Is there any reason for the current behaviour? Should I file a bug or has it been discussed before?

Thanks for your help

[1] https://github.com/boostorg/range/blob/develop/include/boost/range/adaptor/transformed.hpp#L63
[2] http://ericniebler.com/2013/11/07/input-iterators-vs-input-ranges/

--
Álex Puchades