result_of0.hpp 919 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright David Abrahams 2005. Distributed under the Boost
  2. // Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP
  5. # define BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP
  6. # include <boost/utility/result_of.hpp>
  7. // A metafunction returning the result of invoking a nullary function
  8. // object of the given type.
  9. #ifndef BOOST_NO_RESULT_OF
  10. # include <boost/utility/result_of.hpp>
  11. namespace boost { namespace parameter { namespace aux {
  12. template <class F>
  13. struct result_of0 : result_of<F()>
  14. {};
  15. }}} // namespace boost::parameter::aux_
  16. #else
  17. namespace boost { namespace parameter { namespace aux {
  18. template <class F>
  19. struct result_of0
  20. {
  21. typedef typename F::result_type type;
  22. };
  23. }}} // namespace boost::parameter::aux_
  24. #endif
  25. #endif // BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP