This will not work:
std::vector<std::unique_ptr<MyType>> myVector;
boolinq::from(xmlLogicFragments)
.select([](const auto& uniquePtr) { return uniquePtr.get(); })
.toVector();
I.e. conversion from the vector of the unique ptrs to the vector of raw ptrs does not work.
The vector of unique ptrs is convenient to have RAII for the collection of items, as it is suggested e.g. here http://stackoverflow.com/questions/27460377/why-is-using-vector-of-pointers-considered-bad
Also there are possible the other situations, when non-copyable elements can be used.
Would that be possible if boolinq is working with the references to the elements in such cases instead?
This will not work:
I.e. conversion from the vector of the unique ptrs to the vector of raw ptrs does not work.
The vector of unique ptrs is convenient to have RAII for the collection of items, as it is suggested e.g. here http://stackoverflow.com/questions/27460377/why-is-using-vector-of-pointers-considered-bad
Also there are possible the other situations, when non-copyable elements can be used.
Would that be possible if
boolinqis working with the references to the elements in such cases instead?