diff --git a/include/boost/leaf/all.hpp b/include/boost/leaf/all.hpp index 6a95e3e..bf4266c 100644 --- a/include/boost/leaf/all.hpp +++ b/include/boost/leaf/all.hpp @@ -1609,6 +1609,11 @@ namespace boost { namespace leaf { { }; + template + struct is_result_type: is_result_type + { + }; + namespace leaf_detail { template ::value> diff --git a/include/boost/leaf/error.hpp b/include/boost/leaf/error.hpp index 537e5da..8e6712a 100644 --- a/include/boost/leaf/error.hpp +++ b/include/boost/leaf/error.hpp @@ -817,6 +817,11 @@ namespace boost { namespace leaf { { }; + template + struct is_result_type: is_result_type + { + }; + namespace leaf_detail { template ::value> diff --git a/meson.build b/meson.build index 3bc6360..a9b7c89 100644 --- a/meson.build +++ b/meson.build @@ -173,7 +173,7 @@ if exceptions endif endif -if get_option('cpp_eh')=='none' +if not exceptions executable('deep_stack_leaf', 'benchmark/deep_stack_leaf.cpp', dependencies: [leaf]) if get_option('boost_examples') executable('deep_stack_outcome', 'benchmark/deep_stack_outcome.cpp', dependencies: [leaf,boost_headers], override_options: ['cpp_std=c++17'] ) diff --git a/test/_test_res.hpp b/test/_test_res.hpp index 984e466..b2280e9 100644 --- a/test/_test_res.hpp +++ b/test/_test_res.hpp @@ -9,7 +9,7 @@ #include "_test_ec.hpp" template -class res +class test_res { enum class variant { @@ -20,13 +20,13 @@ class res E error_; variant which_; public: - res( T const & value ) noexcept: + test_res( T const & value ) noexcept: value_(value), error_(), which_(variant::value) { } - res( E const & error ) noexcept: + test_res( E const & error ) noexcept: value_(), error_(error), which_(variant::error) @@ -54,7 +54,7 @@ namespace boost { namespace leaf { struct is_result_type; template - struct is_result_type>: std::true_type + struct is_result_type>: std::true_type { }; diff --git a/test/error_code_test.cpp b/test/error_code_test.cpp index 66f5c74..fd30fcc 100644 --- a/test/error_code_test.cpp +++ b/test/error_code_test.cpp @@ -106,6 +106,6 @@ void test() int main() { test>(); - test>(); + test>(); return boost::report_errors(); } diff --git a/test/handle_all_other_result_test.cpp b/test/handle_all_other_result_test.cpp index a5b9238..76d52ce 100644 --- a/test/handle_all_other_result_test.cpp +++ b/test/handle_all_other_result_test.cpp @@ -71,9 +71,9 @@ void test() int main() { - test>(); - test>(); - test const>(); - test const>(); + test>(); + test>(); + test const>(); + test const>(); return boost::report_errors(); } diff --git a/test/handle_some_other_result_test.cpp b/test/handle_some_other_result_test.cpp index b02557c..1d1b7c6 100644 --- a/test/handle_some_other_result_test.cpp +++ b/test/handle_some_other_result_test.cpp @@ -67,9 +67,9 @@ void test() int main() { - test>(); - test>(); - test const>(); - test const>(); + test>(); + test>(); + test const>(); + test const>(); return boost::report_errors(); }