#pragma once #include #include /** * Concept for the Container named requirement. * * https://en.cppreference.com/w/cpp/named_req/Container */ template concept Container = requires(ContainerType container_a, const ContainerType container_b) { typename ContainerType::value_type; typename ContainerType::reference; typename ContainerType::const_reference; typename ContainerType::iterator; typename ContainerType::const_iterator; typename ContainerType::difference_type; typename ContainerType::size_type; requires std::regular; requires std::swappable; requires std::destructible; requires std:: same_as; requires std::same_as< typename ContainerType::const_reference, const typename ContainerType::value_type &>; requires std::forward_iterator; requires std::forward_iterator; requires std::signed_integral; requires std::same_as< typename ContainerType::difference_type, typename std::iterator_traits::difference_type>; requires std::same_as< typename ContainerType::difference_type, typename std::iterator_traits< typename ContainerType::const_iterator>::difference_type>; requires std::convertible_to< typename ContainerType::iterator, typename ContainerType::const_iterator>; { container_a.begin() } -> std::same_as; { container_a.end() } -> std::same_as; { container_b.begin() } -> std::same_as; { container_b.end() } -> std::same_as; { container_a.cbegin() } -> std::same_as; { container_a.cend() } -> std::same_as; { container_a.size() } -> std::same_as; { container_a.max_size() } -> std::same_as; { container_a.empty() } -> std::same_as; }; template concept HasPushBack = requires(ContainerType container, typename ContainerType::value_type value) { container.push_back(value); };