visit_each.hpp 719 B

123456789101112131415161718192021222324252627282930
  1. // Boost.Signals library
  2. // Copyright Douglas Gregor 2001-2003. Use, modification and
  3. // distribution is subject to the Boost Software License, Version
  4. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. // For more information, see http://www.boost.org/libs/signals
  7. #ifndef BOOST_VISIT_EACH_HPP
  8. #define BOOST_VISIT_EACH_HPP
  9. #include <boost/config.hpp>
  10. namespace boost {
  11. template<typename Visitor, typename T>
  12. inline void visit_each(Visitor& visitor, const T& t, long)
  13. {
  14. visitor(t);
  15. }
  16. template<typename Visitor, typename T>
  17. inline void visit_each(Visitor& visitor, const T& t)
  18. {
  19. visit_each(visitor, t, 0);
  20. }
  21. }
  22. #endif // BOOST_VISIT_EACH_HPP