From 5aff5b943f1255716a9dfecc243127234291c59e Mon Sep 17 00:00:00 2001 From: Christian Mazakas <5543573+cmazakas@users.noreply.github.com> Date: Tue, 22 Nov 2022 07:39:39 -0800 Subject: [PATCH] Fix Missing CTAD (#169) * Update deduction tests to include missing guides for set * Add missing deduction guides for set --- .../boost/unordered/unordered_flat_set.hpp | 15 +++++++ include/boost/unordered/unordered_set.hpp | 29 ++++++++++++++ test/unordered/deduction_tests.cpp | 39 ++++++++++++++++--- 3 files changed, 78 insertions(+), 5 deletions(-) diff --git a/include/boost/unordered/unordered_flat_set.hpp b/include/boost/unordered/unordered_flat_set.hpp index b1291caf..413144dd 100644 --- a/include/boost/unordered/unordered_flat_set.hpp +++ b/include/boost/unordered/unordered_flat_set.hpp @@ -563,6 +563,21 @@ namespace boost { class = boost::enable_if_t > > unordered_flat_set(std::initializer_list, std::size_t, Hash, Allocator) -> unordered_flat_set, Allocator>; + + template >, + class = boost::enable_if_t > > + unordered_flat_set(InputIterator, InputIterator, Allocator) + -> unordered_flat_set< + typename std::iterator_traits::value_type, + boost::hash::value_type>, + std::equal_to::value_type>, + Allocator>; + + template > > + unordered_flat_set(std::initializer_list, Allocator) + -> unordered_flat_set, std::equal_to, Allocator>; #endif } // namespace unordered diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index 7c8ce72c..a054ed64 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -673,6 +673,20 @@ namespace boost { unordered_set(std::initializer_list, std::size_t, Hash, Allocator) -> unordered_set, Allocator>; + template >, + class = boost::enable_if_t > > + unordered_set(InputIterator, InputIterator, Allocator) + -> unordered_set::value_type, + boost::hash::value_type>, + std::equal_to::value_type>, + Allocator>; + + template > > + unordered_set(std::initializer_list, Allocator) + -> unordered_set, std::equal_to, Allocator>; + #endif template class unordered_multiset @@ -1303,6 +1317,21 @@ namespace boost { unordered_multiset(std::initializer_list, std::size_t, Hash, Allocator) -> unordered_multiset, Allocator>; + template >, + class = boost::enable_if_t > > + unordered_multiset(InputIterator, InputIterator, Allocator) + -> unordered_multiset< + typename std::iterator_traits::value_type, + boost::hash::value_type>, + std::equal_to::value_type>, + Allocator>; + + template > > + unordered_multiset(std::initializer_list, Allocator) + -> unordered_multiset, std::equal_to, Allocator>; + #endif //////////////////////////////////////////////////////////////////////////// diff --git a/test/unordered/deduction_tests.cpp b/test/unordered/deduction_tests.cpp index c979937f..7c942186 100644 --- a/test/unordered/deduction_tests.cpp +++ b/test/unordered/deduction_tests.cpp @@ -269,14 +269,14 @@ template