Skip to content

Non-copyable types of elements are not supported #22

Description

@AStepaniuk

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions