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