From 1aac69835886dd1d15ce921bb665fd87797b2a65 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 30 Jun 2020 21:39:22 +0300 Subject: [PATCH] Add protect_test2.cpp --- test/Jamfile.v2 | 1 + test/protect_test2.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/protect_test2.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index c944bbd..e2c1b2c 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -75,3 +75,4 @@ run bind_noexcept_mf_test.cpp ; run global_placeholders.cpp ; run mem_fn_noexcept_test.cpp ; run bind_cpp20_test.cpp ; +run protect_test2.cpp ; diff --git a/test/protect_test2.cpp b/test/protect_test2.cpp new file mode 100644 index 0000000..66bec47 --- /dev/null +++ b/test/protect_test2.cpp @@ -0,0 +1,26 @@ +// protect_test2.cpp +// +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +template void test( F ) +{ + BOOST_TEST_TRAIT_TRUE((boost::core::is_same)); +} + +struct X +{ + struct result_type {}; +}; + +int main() +{ + test( boost::protect( X() ) ); + + return boost::report_errors(); +}