mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 01:36:46 +08:00
Fix the unit tests
This commit is contained in:
parent
70c716bb28
commit
1edd1e633d
@ -225,7 +225,7 @@ auto make_result(T&&... values) {
|
||||
namespace std {
|
||||
// The GCC standard library defines tuple_size as class and struct which
|
||||
// triggers a warning here.
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#if defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
|
||||
@ -150,13 +150,13 @@ public:
|
||||
/// we don't jump accidentally from the exception path to the result path.
|
||||
template <typename T, typename... Args>
|
||||
constexpr auto invoke_callback(T&& callable, exception_arg_t exception_arg,
|
||||
Args&&... args) noexcept {
|
||||
Args&&... args) {
|
||||
return util::partial_invoke(std::integral_constant<std::size_t, 01>{},
|
||||
std::forward<T>(callable), exception_arg,
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
template <typename T, typename... Args>
|
||||
constexpr auto invoke_callback(T&& callable, Args&&... args) noexcept {
|
||||
constexpr auto invoke_callback(T&& callable, Args&&... args) {
|
||||
return util::partial_invoke(std::integral_constant<std::size_t, 0U>{},
|
||||
std::forward<T>(callable),
|
||||
std::forward<Args>(args)...);
|
||||
|
||||
@ -131,7 +131,8 @@ template <std::size_t KeepArgs, typename T, typename... Args>
|
||||
partial_invoke(std::integral_constant<std::size_t, KeepArgs>, T&& callable,
|
||||
Args&&... args) {
|
||||
// Test whether we are able to call the function with the given arguments.
|
||||
traits::is_invokable_from_tuple<decltype(callable), std::tuple<Args...>>
|
||||
constexpr traits::is_invokable_from_tuple<decltype(callable),
|
||||
std::tuple<Args...>>
|
||||
is_invokable;
|
||||
|
||||
// The implementation is done in a shortcut way so there are less
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user