mirror of
https://github.com/boostorg/range.git
synced 2026-01-24 16:02:22 +01:00
Lambda has no default constructor nor a copy or move assignment. range\test\adaptors.cpp is checking that produced ranges are copiable, but it is not doing so the for lambda, or lambda like objects. default_constructible_unary_fn uses an optional for default construction. I extended it to use its emplace facility to copy assign non copy assignable types. (see boost::optional 'Type Requierment': 'If T is not MoveAssignable, it is still possible to reset the value of optional<T> using function emplace():')