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