boostorg / icl

Boost.org icl module
http://boost.org/libs/icl
10 stars 44 forks source link

Allow construction from ranges of intervals #6

Closed muggenhor closed 3 years ago

muggenhor commented 8 years ago

This allows constructing interval_map and interval_set as const variables without having to resort to constructor functions. E.g. boost::assign::list_of can now be used to fill them.

jofaber commented 3 years ago

There are already methods to populate icl containers via std::copy or std::transform using icl::inserter and icl::adder see examples https://www.boost.org/doc/libs/1_75_0/libs/icl/doc/html/boost_icl/examples/std_copy.html and https://www.boost.org/doc/libs/1_75_0/libs/icl/doc/html/boost_icl/examples/std_transform.html

I'd like to keep the containers' interface minimal and rather combine the available functions with algorithms.

muggenhor commented 3 years ago

Unfortunately I don't recall what the use case for this was anymore.

I was definitely aware of std::copy and std::transform at the time and am thus sure they didn't suit my purpose. I don't recall anything else beyond that. But I suspect that it was more convenient to match the iterator construction interfaces of standard containers.

Feel free to close this.