template<class T, class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
class confluent::set_provider< T, Compare, Hash, Equal >
A set_provider provides resources such as nodes and functors to instances of set and map.
If not specified when creating a new set, the created set will use a global instance of the provider, otherwise the specified provider will be used. Binary set operations require both input sets to be using the same provider, if not the result is undefined. New sets that are created as a result of set operations will use the same provider as the parent set(s).
All sets and maps using the same provider will share structurally equal nodes. If an element is inserted in one container and another element that compares equal is inserted in another container using the same provider, it is then undefined which of the elements that will be copy constructed into the shared nodes and later found when looking up elements in the containers.
New providers can be created to make partitions that cannot share nodes or to create containers with stateful functors that cannot be default constructed and therefore prevents default construction of a global provider instance.
A set_provider should be owned by a std::shared_ptr and it is recommended to use the helper function std::make_shared<set_provider<>>() to instantiate new providers.