Build failure with early libcxx
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
ambiguous empty
**Expected behavior**
compilation
**Reproduction steps**
Steps to reproduce the bug.
sudo apt install clang-7 libc++abi-7-dev libc++-7-dev lld-7
env CXX=clang-7 CXXFLAGS=-stdlib=libc++ CXX_LD=lld-7 meson builddir
meson test -C builddir
**Platform information:**
- OS: Ubuntu 20.04
- Compiler+version: **clang-7** + libcxx-7
- Catch version: **v3.4.0*
``
2023-08-06T03:20:23.3453867Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/catch_matchers_container_properties.hpp:27:24: error: call to 'empty' is ambiguous
2023-08-06T03:20:23.3454212Z return empty(rng);
2023-08-06T03:20:23.3454419Z ^~~~~
2023-08-06T03:20:23.3455404Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/internal/catch_matchers_impl.hpp:27:49: note: in instantiation of function template specialization 'Catch::Matchers::IsEmptyMatcher::match &>' requested here
2023-08-06T03:20:23.3455966Z : ITransientExpression{ true, matcher.match( arg ) }, // not forwarding arg here on purpose
2023-08-06T03:20:23.3456264Z ^
2023-08-06T03:20:23.3456983Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/internal/catch_matchers_impl.hpp:50:16: note: in instantiation of member function 'Catch::MatchExpr &, Catch::Matchers::IsEmptyMatcher>::MatchExpr' requested here
2023-08-06T03:20:23.3457486Z return MatchExpr( CATCH_FORWARD(arg), matcher );
2023-08-06T03:20:23.3457743Z ^
2023-08-06T03:20:23.3458468Z ../subprojects/Catch2-3.4.0/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp:117:9: note: in instantiation of function template specialization 'Catch::makeMatchExpr &, Catch::Matchers::IsEmptyMatcher>' requested here
2023-08-06T03:20:23.3458964Z REQUIRE_THAT(empty_array, IsEmpty());
2023-08-06T03:20:23.3459182Z ^
2023-08-06T03:20:23.3459594Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/catch_matchers.hpp:222:40: note: expanded from macro 'REQUIRE_THAT'
2023-08-06T03:20:23.3460063Z #define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg )
2023-08-06T03:20:23.3460395Z ^
2023-08-06T03:20:23.3460868Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/internal/catch_matchers_impl.hpp:61:54: note: expanded from macro 'INTERNAL_CHECK_THAT'
2023-08-06T03:20:23.3461311Z catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher ) ); \
2023-08-06T03:20:23.3461627Z ^
2023-08-06T03:20:23.3462127Z /usr/lib/llvm-7/bin/../include/c++/v1/iterator:1846:16: note: candidate function [with _Cont = std::__1::array]
2023-08-06T03:20:23.3462472Z constexpr auto empty(const _Cont& __c)
2023-08-06T03:20:23.3462674Z ^
2023-08-06T03:20:23.3463234Z ../subprojects/Catch2-3.4.0/src/catch2/internal/catch_container_nonmembers.hpp:42:20: note: candidate function [with Container = std::__1::array]
2023-08-06T03:20:23.3463730Z constexpr auto empty(Container const& cont) -> decltype(cont.empty()) {
2023-08-06T03:20:23.3463979Z ^
2023-08-06T03:20:23.3464399Z In file included from ../subprojects/Catch2-3.4.0/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp:10:
2023-08-06T03:20:23.3464973Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/catch_matchers_container_properties.hpp:27:24: error: call to 'empty' is ambiguous
2023-08-06T03:20:23.3465312Z return empty(rng);
2023-08-06T03:20:23.3465508Z ^~~~~
2023-08-06T03:20:23.3466201Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/catch_matchers_templated.hpp:232:35: note: in instantiation of function template specialization 'Catch::Matchers::IsEmptyMatcher::match &>' requested here
2023-08-06T03:20:23.3466652Z return !m_matcher.match(arg);
2023-08-06T03:20:23.3466865Z ^
2023-08-06T03:20:23.3467645Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/internal/catch_matchers_impl.hpp:27:49: note: in instantiation of function template specialization 'Catch::Matchers::Detail::MatchNotOfGeneric::match &>' requested here
2023-08-06T03:20:23.3468358Z : ITransientExpression{ true, matcher.match( arg ) }, // not forwarding arg here on purpose
2023-08-06T03:20:23.3468659Z ^
2023-08-06T03:20:23.3469523Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/internal/catch_matchers_impl.hpp:50:16: note: in instantiation of member function 'Catch::MatchExpr &, Catch::Matchers::Detail::MatchNotOfGeneric >::MatchExpr' requested here
2023-08-06T03:20:23.3470302Z return MatchExpr( CATCH_FORWARD(arg), matcher );
2023-08-06T03:20:23.3470553Z ^
2023-08-06T03:20:23.3471368Z ../subprojects/Catch2-3.4.0/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp:118:9: note: in instantiation of function template specialization 'Catch::makeMatchExpr &, Catch::Matchers::Detail::MatchNotOfGeneric >' requested here
2023-08-06T03:20:23.3471899Z REQUIRE_THAT(non_empty_array, !IsEmpty());
2023-08-06T03:20:23.3472118Z ^
2023-08-06T03:20:23.3472536Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/catch_matchers.hpp:222:40: note: expanded from macro 'REQUIRE_THAT'
2023-08-06T03:20:23.3472995Z #define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg )
2023-08-06T03:20:23.3473320Z ^
2023-08-06T03:20:23.3473790Z ../subprojects/Catch2-3.4.0/src/catch2/matchers/internal/catch_matchers_impl.hpp:61:54: note: expanded from macro 'INTERNAL_CHECK_THAT'
2023-08-06T03:20:23.3474227Z catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher ) ); \
2023-08-06T03:20:23.3474535Z ^
2023-08-06T03:20:23.3475018Z /usr/lib/llvm-7/bin/../include/c++/v1/iterator:1846:16: note: candidate function [with _Cont = std::__1::array]
2023-08-06T03:20:23.3475356Z constexpr auto empty(const _Cont& __c)
2023-08-06T03:20:23.3475567Z ^
2023-08-06T03:20:23.3476113Z ../subprojects/Catch2-3.4.0/src/catch2/internal/catch_container_nonmembers.hpp:42:20: note: candidate function [with Container = std::__1::array]
2023-08-06T03:20:23.3476611Z constexpr auto empty(Container const& cont) -> decltype(cont.empty()) {
2023-08-06T03:20:23.3476868Z ^
```
Contributor guide
Assessment
This issue has not been assessed yet.