foreach_fwd.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // foreach.hpp header file
  3. //
  4. // Copyright 2010 Eric Niebler.
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. // See http://www.boost.org/libs/foreach for documentation
  9. //
  10. // Credits:
  11. // Kazutoshi Satoda: for suggesting the need for a _fwd header for foreach's
  12. // customization points.
  13. #ifndef BOOST_FOREACH_FWD_HPP
  14. #define BOOST_FOREACH_FWD_HPP
  15. // This must be at global scope, hence the uglified name
  16. enum boost_foreach_argument_dependent_lookup_hack
  17. {
  18. boost_foreach_argument_dependent_lookup_hack_value
  19. };
  20. namespace boost
  21. {
  22. namespace foreach
  23. {
  24. ///////////////////////////////////////////////////////////////////////////////
  25. // boost::foreach::tag
  26. //
  27. typedef boost_foreach_argument_dependent_lookup_hack tag;
  28. ///////////////////////////////////////////////////////////////////////////////
  29. // boost::foreach::is_lightweight_proxy
  30. // Specialize this for user-defined collection types if they are inexpensive to copy.
  31. // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff.
  32. template<typename T>
  33. struct is_lightweight_proxy;
  34. ///////////////////////////////////////////////////////////////////////////////
  35. // boost::foreach::is_noncopyable
  36. // Specialize this for user-defined collection types if they cannot be copied.
  37. // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff.
  38. template<typename T>
  39. struct is_noncopyable;
  40. } // namespace foreach
  41. } // namespace boost
  42. #endif