visit_each.hpp 690 B

123456789101112131415161718192021222324252627
  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. namespace boost {
  10. template<typename Visitor, typename T>
  11. inline void visit_each(Visitor& visitor, const T& t, long)
  12. {
  13. visitor(t);
  14. }
  15. template<typename Visitor, typename T>
  16. inline void visit_each(Visitor& visitor, const T& t)
  17. {
  18. visit_each(visitor, t, 0);
  19. }
  20. }
  21. #endif // BOOST_VISIT_EACH_HPP