123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #ifndef BOOST_DETAIL_FUNCTION1_DWA200655_HPP
- # define BOOST_DETAIL_FUNCTION1_DWA200655_HPP
- # include <boost/concept_check.hpp>
- # include <boost/type_traits/remove_reference.hpp>
- # include <boost/type_traits/add_const.hpp>
- # include <boost/mpl/apply.hpp>
- namespace boost { namespace detail {
- template<typename F>
- struct function1
- {
- template<typename Signature>
- struct result
- {};
- template<typename This, typename A0>
- struct result<This(A0)>
- {
-
-
-
-
-
-
-
-
- typedef typename remove_reference<
- typename add_const< A0 >::type
- >::type arg0;
- typedef typename mpl::apply1<F, arg0>::type impl;
- typedef typename impl::result_type type;
- };
-
- template<typename A0>
- typename result<function1(A0 &)>::type
- operator ()(A0 &a0) const
- {
- typedef typename result<function1(A0 &)>::impl impl;
- typedef typename result<function1(A0 &)>::type type;
- typedef A0 &arg0;
- BOOST_CONCEPT_ASSERT((UnaryFunction<impl, type, arg0>));
-
- return impl()(a0);
- }
-
- template<typename A0>
- typename result<function1(A0 const &)>::type
- operator ()(A0 const &a0) const
- {
- typedef typename result<function1(A0 const &)>::impl impl;
- typedef typename result<function1(A0 const &)>::type type;
- typedef A0 const &arg0;
- BOOST_CONCEPT_ASSERT((UnaryFunction<impl, type, arg0>));
-
- return impl()(a0);
- }
- };
- }}
- #endif
|