| 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 | |
| 14 | #ifndef BOOST_FOREACH_FWD_HPP |
| 15 | #define BOOST_FOREACH_FWD_HPP |
| 16 | |
| 17 | // This must be at global scope, hence the uglified name |
| 18 | enum boost_foreach_argument_dependent_lookup_hack |
| 19 | { |
| 20 | boost_foreach_argument_dependent_lookup_hack_value |
| 21 | }; |
| 22 | |
| 23 | namespace boost |
| 24 | { |
| 25 | |
| 26 | namespace foreach |
| 27 | { |
| 28 | /////////////////////////////////////////////////////////////////////////////// |
| 29 | // boost::foreach::tag |
| 30 | // |
| 31 | typedef boost_foreach_argument_dependent_lookup_hack tag; |
| 32 | |
| 33 | /////////////////////////////////////////////////////////////////////////////// |
| 34 | // boost::foreach::is_lightweight_proxy |
| 35 | // Specialize this for user-defined collection types if they are inexpensive to copy. |
| 36 | // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff. |
| 37 | template<typename T> |
| 38 | struct is_lightweight_proxy; |
| 39 | |
| 40 | /////////////////////////////////////////////////////////////////////////////// |
| 41 | // boost::foreach::is_noncopyable |
| 42 | // Specialize this for user-defined collection types if they cannot be copied. |
| 43 | // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff. |
| 44 | template<typename T> |
| 45 | struct is_noncopyable; |
| 46 | |
| 47 | } // namespace foreach |
| 48 | |
| 49 | } // namespace boost |
| 50 | |
| 51 | #endif |
| 52 | |