|
||||
File indexing completed on 2025-01-18 09:29:46
0001 /* 0002 @file remove_noexcept 0003 0004 @Copyright Barrett Adair 2015-2017 0005 Distributed under the Boost Software License, Version 1.0. 0006 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) 0007 0008 */ 0009 0010 #ifndef BOOST_CLBL_TRTS_REMOVE_NOEXCEPT_HPP 0011 #define BOOST_CLBL_TRTS_REMOVE_NOEXCEPT_HPP 0012 0013 #include <boost/callable_traits/detail/core.hpp> 0014 0015 namespace boost { namespace callable_traits { 0016 0017 BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(remove_noexcept) 0018 BOOST_CLBL_TRTS_SFINAE_MSG(remove_noexcept, cannot_remove_noexcept_from_this_type) 0019 0020 //[ remove_noexcept_hpp 0021 /*` 0022 [section:ref_remove_noexcept remove_noexcept] 0023 [heading Header] 0024 ``#include <boost/callable_traits/remove_noexcept.hpp>`` 0025 [heading Definition] 0026 */ 0027 0028 template<typename T> 0029 using remove_noexcept_t = //see below 0030 //<- 0031 detail::try_but_fail_if_invalid< 0032 typename detail::traits<T>::remove_noexcept, 0033 cannot_remove_noexcept_from_this_type>; 0034 0035 namespace detail { 0036 0037 template<typename T, typename = std::false_type> 0038 struct remove_noexcept_impl {}; 0039 0040 template<typename T> 0041 struct remove_noexcept_impl <T, typename std::is_same< 0042 remove_noexcept_t<T>, detail::dummy>::type> 0043 { 0044 using type = remove_noexcept_t<T>; 0045 }; 0046 } 0047 0048 //-> 0049 0050 template<typename T> 0051 struct remove_noexcept : detail::remove_noexcept_impl<T> {}; 0052 0053 //<- 0054 }} // namespace boost::callable_traits 0055 //-> 0056 0057 /*` 0058 0059 [heading Constraints] 0060 * `T` must be one of the following: 0061 * function type 0062 * function pointer type 0063 * function reference type 0064 * member function pointer type 0065 * If `T` is a pointer, it may not be cv/ref qualified 0066 0067 [heading Behavior] 0068 * A substitution failure occurs if the constraints are violated. 0069 * Removes the `noexcept` specifier from `T`, if present. 0070 0071 [heading Input/Output Examples] 0072 [table 0073 [[`T`] [`remove_noexcept_t<T>`]] 0074 [[`int() const noexcept`] [`int() const`]] 0075 [[`int(*)() noexcept`] [`int(*)()`]] 0076 [[`int(&)() noexcept`] [`int(&)()`]] 0077 [[`int(foo::*)() noexcept`] [`int(foo::*)()`]] 0078 [[`int() const`] [`int() const`]] 0079 [[`int(*)()`] [`int(*)()`]] 0080 [[`int(&)()`] [`int(&)()`]] 0081 [[`int`] [(substitution failure)]] 0082 [[`int foo::*`] [(substitution failure)]] 0083 [[`int (foo::* const)()`] [(substitution failure)]] 0084 ] 0085 0086 [heading Example Program] 0087 [import ../example/remove_noexcept.cpp] 0088 [remove_noexcept] 0089 [endsect] 0090 */ 0091 //] 0092 0093 #endif // #ifndef BOOST_CLBL_TRTS_REMOVE_NOEXCEPT_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |