accumulator_base.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // accumulator_base.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_FRAMEWORK_ACCUMULATORS_BASE_HPP_EAN_28_10_2005
  8. #define BOOST_ACCUMULATORS_FRAMEWORK_ACCUMULATORS_BASE_HPP_EAN_28_10_2005
  9. #include <boost/mpl/placeholders.hpp>
  10. #include <boost/mpl/joint_view.hpp>
  11. #include <boost/mpl/single_view.hpp>
  12. #include <boost/mpl/fold.hpp>
  13. #include <boost/mpl/contains.hpp>
  14. #include <boost/mpl/empty_sequence.hpp>
  15. #include <boost/accumulators/framework/accumulator_concept.hpp>
  16. namespace boost { namespace accumulators
  17. {
  18. namespace detail
  19. {
  20. typedef void void_;
  21. }
  22. ///////////////////////////////////////////////////////////////////////////////
  23. // dont_care
  24. //
  25. struct dont_care
  26. {
  27. template<typename Args>
  28. dont_care(Args const &)
  29. {
  30. }
  31. };
  32. ///////////////////////////////////////////////////////////////////////////////
  33. // accumulator_base
  34. //
  35. struct accumulator_base
  36. {
  37. // hidden if defined in derived classes
  38. detail::void_ operator ()(dont_care)
  39. {
  40. }
  41. typedef mpl::false_ is_droppable;
  42. detail::void_ add_ref(dont_care)
  43. {
  44. }
  45. detail::void_ drop(dont_care)
  46. {
  47. }
  48. detail::void_ on_drop(dont_care)
  49. {
  50. }
  51. };
  52. }} // namespace boost::accumulators
  53. #endif