From d712294190f2e0507d6b6ad5e930842f5431323c Mon Sep 17 00:00:00 2001 From: Christos Choutouridis Date: Mon, 4 Oct 2021 21:13:30 +0300 Subject: [PATCH] WIP: invoke c++17 rework --- include/utl/meta/typelist.h | 2 +- include/utl/utility/invoke.h | 9 +++++---- test/main.cpp | 7 +++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/utl/meta/typelist.h b/include/utl/meta/typelist.h index 6e62651..50936f0 100644 --- a/include/utl/meta/typelist.h +++ b/include/utl/meta/typelist.h @@ -265,7 +265,7 @@ namespace meta { //! @{ namespace back_impl { template - struct back_ { }; + struct back_ { using type = nil_; }; template struct back_> { diff --git a/include/utl/utility/invoke.h b/include/utl/utility/invoke.h index 7c992a2..850d6ac 100644 --- a/include/utl/utility/invoke.h +++ b/include/utl/utility/invoke.h @@ -21,7 +21,7 @@ //! @{ namespace utl { -#if !defined __cpp_lib_is_invocable +//#if !defined __cpp_lib_is_invocable namespace detail { template @@ -216,9 +216,10 @@ namespace utl { >; //! @} -#else - -#endif +//#else +//using is_invocable = std::is_invocable; +// +//#endif } //! @} diff --git a/test/main.cpp b/test/main.cpp index 7ed18c0..21a2473 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -19,11 +19,14 @@ * */ #include +#include -GTEST_API_ int main(int argc, char **argv) { +GTEST_API_ int main(int argc, char **argv) try { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } - +catch (std::exception& e) { + std::cout << "Exception: " << e.what() << '\n'; +}