Fix the unit tests

This commit is contained in:
Denis Blank 2018-11-28 17:00:35 +01:00
parent 70c716bb28
commit 1edd1e633d
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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)...);

View File

@ -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