| 15 | namespace fs = boost::filesystem; |
| 16 | |
| 17 | int main() |
| 18 | { |
| 19 | { |
| 20 | fs::directory_iterator const it; |
| 21 | |
| 22 | BOOST_FOREACH(fs::path const& p, it) |
| 23 | { |
| 24 | p.string(); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | #if !defined(BOOST_NO_CXX11_RANGE_BASED_FOR) |
| 29 | |
| 30 | { |
| 31 | fs::directory_iterator const it; |
| 32 | |
| 33 | for (fs::path const& p : it) |
| 34 | { |
| 35 | p.string(); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | #endif |
| 40 | |
| 41 | { |
| 42 | fs::recursive_directory_iterator it; |
| 43 | |
| 44 | BOOST_FOREACH(fs::path const& p, it) |
| 45 | { |
| 46 | p.string(); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | #if !defined(BOOST_NO_CXX11_RANGE_BASED_FOR) |
| 51 | |
| 52 | { |
| 53 | fs::recursive_directory_iterator const it; |
| 54 | |
| 55 | for (fs::path const& p : it) |
| 56 | { |
| 57 | p.string(); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | #endif |
| 62 | } |