-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle PlayStation platforms #2562
Conversation
@@ -89,7 +89,7 @@ namespace Catch { | |||
TestCaseInfo const* rhs ) { | |||
return *lhs < *rhs; | |||
}; | |||
std::set<TestCaseInfo const*, decltype(testInfoCmp)> seenTests(testInfoCmp); | |||
std::set<TestCaseInfo const*, decltype(testInfoCmp) &> seenTests(testInfoCmp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the ref here needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without &
, The std::set
in PlayStation SDK's STL tried to invoke a copy-constructor (and failed).
STL Bug?
MSBuild version 17.4.0+18d5aef85 for .NET Framework
catch_chronometer.cpp
catch_benchmark_function.cpp
catch_run_for_at_least.cpp
catch_stats.cpp
catch_get_random_seed.cpp
catch_tag_alias_autoregistrar.cpp
catch_test_spec.cpp
catch_timer.cpp
catch_tostring.cpp
catch_totals.cpp
catch_version.cpp
catch_generator_exception.cpp
catch_generators.cpp
catch_generators_random.cpp
catch_interfaces_capture.cpp
catch_interfaces_config.cpp
catch_interfaces_exception.cpp
catch_interfaces_registry_hub.cpp
catch_interfaces_reporter_factory.cpp
catch_interfaces_reporter_registry.cpp
catch_interfaces_testcase.cpp
catch_decomposer.cpp
catch_errno_guard.cpp
catch_lazy_expr.cpp
catch_leak_detector.cpp
catch_message_info.cpp
catch_polyfills.cpp
catch_startup_exception_registry.cpp
catch_test_case_info_hasher.cpp
catch_test_case_registry_impl.cpp
In file included from D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:14:
In file included from D:\dev\Catch2\src\src\catch2\..\catch2/internal/catch_run_context.hpp:11:
In file included from D:\dev\Catch2\src\src\catch2\..\catch2/interfaces/catch_interfaces_reporter.hpp:22:
In file included from C:\tools\SCE\Orbis-SDK\10.000\target\include\map:10:
C:\tools\SCE\Orbis-SDK\10.000\target\include\xtree(1058,11): error : no matching constructor for initialization of 'std::_Tree_comp<false, std::_Tset_traits<const Catch::TestCaseInfo *, (lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28), std::allocator<const Catch::TestCaseInfo *>, false>>::key_compare' (aka '(lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28)') [D:\dev\Catch2\0.B\orbis\src\Catch2.vcxproj]
return (key_compare());
^
C:\tools\SCE\Orbis-SDK\10.000\target\include\xtree(1986,38): note: in instantiation of member function 'std::_Tree_comp<false, std::_Tset_traits<const Catch::TestCaseInfo *, (lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28), std::allocator<const Catch::TestCaseInfo *>, false>>::_Getcomp' requested here
_Addleft = !_DEBUG_LT_PRED(this->_Getcomp(),
^
C:\tools\SCE\Orbis-SDK\10.000\target\include\xtree(1403,11): note: in instantiation of function template specialization 'std::_Tree<std::_Tset_traits<const Catch::TestCaseInfo *, (lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28), std::allocator<const Catch::TestCaseInfo *>, false>>::_Insert_nohint<const std::_Tree<std::_Tset_traits<const Catch::TestCaseInfo *, (lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28), std::allocator<const Catch::TestCaseInfo *>, false>>::value_type &, std::_Nil>' requested here
return (_Insert_nohint(false,
^
C:\tools\SCE\Orbis-SDK\10.000\target\include\set(226,20): note: in instantiation of member function 'std::_Tree<std::_Tset_traits<const Catch::TestCaseInfo *, (lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28), std::allocator<const Catch::TestCaseInfo *>, false>>::insert' requested here
return (_Mybase::insert(_Val));
^
D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp(95,41): note: in instantiation of member function 'std::set<const Catch::TestCaseInfo *, (lambda at D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp:88:28)>::insert' requested here
const auto prev = seenTests.insert( infoPtr );
^
D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp(88,28): note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
auto testInfoCmp = []( TestCaseInfo const* lhs,
^
D:\dev\Catch2\src\src\catch2\internal\catch_test_case_registry_impl.cpp(88,28): note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided
1 error generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bleh. This is an upstream bug and needs to be reported there.
I am willing to merge to workaround in the meantime though.
catchorg#2562 (comment) Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
Suggested in catchorg#2562 (comment)
Suggested in catchorg#2562 (comment)
Codecov Report
@@ Coverage Diff @@
## devel #2562 +/- ##
==========================================
+ Coverage 91.09% 91.11% +0.01%
==========================================
Files 187 187
Lines 7623 7623
==========================================
+ Hits 6944 6945 +1
+ Misses 679 678 -1 |
Description
This PR tries to resolve the following problems when compiling Catch2 for the Playstation platform.
getenv
gmtime_r
gmtime_s
exists but using C11's definition 😢