4#ifndef _Stroika_Foundation_Containers_Concrete_SortedCollection_Factory_h_
5#define _Stroika_Foundation_Containers_Concrete_SortedCollection_Factory_h_
7#include "Stroika/Foundation/StroikaPreComp.h"
15 class SortedCollection;
18namespace Stroika::Foundation::Containers::Factory {
20 using Common::ITotallyOrderingComparer;
30 template <
typename T, ITotallyOrderingComparer<T> COMPARER = less<T>>
33 static_assert (not is_reference_v<T> and not is_reference_v<COMPARER>,
34 "typically if this fails its because a (possibly indirect) caller forgot to use forward<TTT>(), or remove_cvref_t");
100 static void Register (
const optional<SortedCollection_Factory>& f = nullopt);
117#include "SortedCollection_Factory.inl"
Singleton factory object - Used to create the default backend implementation of a SortedCollection<> ...
static const SortedCollection_Factory & Default()
static void Register(const optional< SortedCollection_Factory > &f=nullopt)
SortedCollection< T > ConstructedType
constexpr SortedCollection_Factory()
nonvirtual ConstructedType operator()(const COMPARER &comparer={}) const
function< ConstructedType(const COMPARER &comparer)> FactoryFunctionType
A SortedCollection is a Collection<T> which remains sorted (iteration produces items sorted) even as ...