Skip to content

Commit

Permalink
Correct deduct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Oct 31, 2024
1 parent dcf7682 commit 3fd849d
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 29 deletions.
4 changes: 1 addition & 3 deletions test/sources/libcxx/map/map.cons/deduct.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ int main(int, char**)
#endif

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
AssociativeContainerDeductionGuidesSfinaeAway<std::map, std::map<int, long>>();
#endif
//AssociativeContainerDeductionGuidesSfinaeAway<std::map, std::map<int, long>>();
AssociativeContainerDeductionGuidesSfinaeAway<momo::stdish::map, momo::stdish::map<int, long>>();
#endif

Expand Down
4 changes: 1 addition & 3 deletions test/sources/libcxx/multimap/multimap.cons/deduct.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ int main(int, char**)
#endif

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
AssociativeContainerDeductionGuidesSfinaeAway<std::multimap, std::multimap<int, long>>();
#endif
//AssociativeContainerDeductionGuidesSfinaeAway<std::multimap, std::multimap<int, long>>();
AssociativeContainerDeductionGuidesSfinaeAway<momo::stdish::multimap, momo::stdish::multimap<int, long>>();
#endif

Expand Down
4 changes: 1 addition & 3 deletions test/sources/libcxx/multiset/multiset.cons/deduct.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ int main(int, char **) {
#endif

//#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
AssociativeContainerDeductionGuidesSfinaeAway<std::multiset, std::multiset<int>>();
#endif
//AssociativeContainerDeductionGuidesSfinaeAway<std::multiset, std::multiset<int>>();
AssociativeContainerDeductionGuidesSfinaeAway<momo::stdish::multiset, momo::stdish::multiset<int>>();
//#endif

Expand Down
4 changes: 1 addition & 3 deletions test/sources/libcxx/set/set.cons/deduct.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ int main(int, char **) {
#endif

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
AssociativeContainerDeductionGuidesSfinaeAway<std::set, std::set<int>>();
#endif
//AssociativeContainerDeductionGuidesSfinaeAway<std::set, std::set<int>>();
AssociativeContainerDeductionGuidesSfinaeAway<momo::stdish::set, momo::stdish::set<int>>();
#endif

Expand Down
4 changes: 0 additions & 4 deletions test/sources/libcxx/support/deduction_guides_sfinae_checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ constexpr void AssociativeContainerDeductionGuidesSfinaeAway() {
// comparators.

#if TEST_STD_VER >= 23
#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
using Range = RangeT<ValueType>;
using BadRange = BadRangeT<ValueType>;

Expand Down Expand Up @@ -265,7 +264,6 @@ constexpr void AssociativeContainerDeductionGuidesSfinaeAway() {
static_assert(SFINAEs_away<Container, std::from_range_t, BadRange, Alloc>);
// Note: (from_range, range, BAD_alloc) is interpreted as (from_range, range, comp) instead.
#endif
#endif
}

// For unordered containers the deduction guides should be SFINAE'd away when
Expand Down Expand Up @@ -434,7 +432,6 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
static_assert(SFINAEs_away<Container, InitList, BadAlloc>);

#if TEST_STD_VER >= 23
#ifdef LIBCPP_HAS_BAD_NEWS_FOR_MOMO
using Range = RangeT<ValueType>;
using BadRange = BadRangeT<ValueType>;

Expand Down Expand Up @@ -514,7 +511,6 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
// Note: (from_range, range, buckets, hash, BAD_alloc) is interpreted as (from_range, range, buckets, hash, pred),
// which is valid because the only requirement for the predicate parameter is that it does not resemble an allocator.
#endif
#endif
}

#endif // TEST_SUPPORT_DEDUCTION_GUIDES_SFINAE_CHECKS_H
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ int main(int, char**)
#endif

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
UnorderedContainerDeductionGuidesSfinaeAway<std::unordered_map, std::unordered_map<int, long>>();
#endif
//UnorderedContainerDeductionGuidesSfinaeAway<std::unordered_map, std::unordered_map<int, long>>();
UnorderedContainerDeductionGuidesSfinaeAway<momo::stdish::unordered_map, momo::stdish::unordered_map<int, long>>();
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ int main(int, char**)
#endif

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
UnorderedContainerDeductionGuidesSfinaeAway<std::unordered_multimap, std::unordered_multimap<int, long>>();
#endif
//UnorderedContainerDeductionGuidesSfinaeAway<std::unordered_multimap, std::unordered_multimap<int, long>>();
UnorderedContainerDeductionGuidesSfinaeAway<momo::stdish::unordered_multimap, momo::stdish::unordered_multimap<int, long>>();
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ int main(int, char**)
#endif

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11)
UnorderedContainerDeductionGuidesSfinaeAway<std::unordered_set, std::unordered_set<int>>();
#endif
//UnorderedContainerDeductionGuidesSfinaeAway<std::unordered_set, std::unordered_set<int>>();
UnorderedContainerDeductionGuidesSfinaeAway<momo::stdish::unordered_set, momo::stdish::unordered_set<int>>();
#endif

Expand Down
5 changes: 1 addition & 4 deletions test/sources/libcxx/vector/vector.cons/deduct.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,7 @@ TEST_CONSTEXPR_CXX20 bool tests() {
}

#if MOMO_VERSION_MAJOR > 3
#if !(defined(TEST_MSVC) && _MSC_VER < 1930) && !(defined(TEST_GCC) && __GNUC__ < 11) \
&& !(defined(__clang_major__) && !defined(_MSC_VER) && __clang_major__ == 19) // clang 19
SequenceContainerDeductionGuidesSfinaeAway<std::vector, std::vector<int>>();
#endif
//SequenceContainerDeductionGuidesSfinaeAway<std::vector, std::vector<int>>();
SequenceContainerDeductionGuidesSfinaeAway<momo::stdish::vector, momo::stdish::vector<int>>();
#endif

Expand Down

0 comments on commit 3fd849d

Please sign in to comment.