//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef SUPPORT_FROM_RANGE_UNORDERED_CONTAINERS_H #define SUPPORT_FROM_RANGE_UNORDERED_CONTAINERS_H #include #include #include #include #include #include #include #include #include "../exception_safety_helpers.h" #include "../from_range_helpers.h" #include "../test_compare.h" #include "../test_hash.h" #include "MoveOnly.h" #include "almost_satisfies_types.h" #include "count_new.h" #include "test_macros.h" // template R> // unordered-container(from_range_t, R&& rg, size_type n = see below, // const hasher& hf = hasher(), const key_equal& eql = key_equal(), // const allocator_type& a = allocator_type()); // C++23 // // template R> // unordered-container(from_range_t, R&& rg, size_type n, const allocator_type& a) // : unordered-container(from_range, std::forward(rg), n, hasher(), key_equal(), a) { } // C++23 // // template R> // unordered-container(from_range_t, R&& rg, size_type n, const hasher& hf, const allocator_type& a) // : unordered-container(from_range, std::forward(rg), n, hf, key_equal(), a) { } // C++23 template concept HasFromRangeCtr = requires (Range&& range) { // (from_range, range) Container(std::from_range, std::forward(range)); // (from_range, range, n) Container(std::from_range, std::forward(range), 0); // (from_range, range, n, hash) Container(std::from_range, std::forward(range), 0, std::hash()); // (from_range, range, n, hash, equal) Container(std::from_range, std::forward(range), 0, std::hash(), std::equal_to()); // (from_range, range, n, hash, equal, alloc) Container(std::from_range, std::forward(range), 0, std::hash(), std::equal_to(), std::allocator()); // (from_range, range, n, alloc) Container(std::from_range, std::forward(range), 0, std::allocator()); // (from_range, range, n, hash, alloc) Container(std::from_range, std::forward(range), 0, std::hash(), std::allocator()); }; template