with_error.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // with_error.hpp
  3. //
  4. // Copyright 2005 Eric Niebler. Distributed under the Boost
  5. // Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. #ifndef BOOST_ACCUMULATORS_STATISTICS_WITH_ERROR_HPP_EAN_01_11_2005
  8. #define BOOST_ACCUMULATORS_STATISTICS_WITH_ERROR_HPP_EAN_01_11_2005
  9. #include <boost/preprocessor/repetition/enum_params.hpp>
  10. #include <boost/mpl/vector.hpp>
  11. #include <boost/mpl/transform_view.hpp>
  12. #include <boost/mpl/placeholders.hpp>
  13. #include <boost/accumulators/statistics_fwd.hpp>
  14. #include <boost/accumulators/statistics/error_of.hpp>
  15. namespace boost { namespace accumulators
  16. {
  17. namespace detail
  18. {
  19. template<typename Feature>
  20. struct error_of_tag
  21. {
  22. typedef tag::error_of<Feature> type;
  23. };
  24. }
  25. ///////////////////////////////////////////////////////////////////////////////
  26. // with_error
  27. //
  28. template<BOOST_PP_ENUM_PARAMS(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature)>
  29. struct with_error
  30. : mpl::transform_view<
  31. mpl::vector<BOOST_PP_ENUM_PARAMS(BOOST_ACCUMULATORS_MAX_FEATURES, Feature)>
  32. , detail::error_of_tag<mpl::_1>
  33. >
  34. {
  35. };
  36. }} // namespace boost::accumulators
  37. #endif