Query Constructors - cemderv/linq GitHub Wiki

from()

Constructs an immutable query from generic containers, which includes std::set, std::array, std::map, std::initializer_list and std::span. Immutable means that the query provides immutable (const) references to the container's elements. The container must live throughout the lifetime of the query. The query does not perform any lifetime checks, so an access to an invalid container is undefined behavior.

The query is lazily evaluated, meaning that changes to the container are reflected in the query.

from_mutable()

A variant of from() that provides mutable (non-const) references to the container's elements. from_mutable() does not allow construction from std::initializer_list.

from_copy()

A variant of from() that stores a copy of the container. The query provides mutable (non-const) references to the container's elements. Changes to the original container are not reflected in the query.