Ticket #12249: invoke-boost-failure.cpp
| File invoke-boost-failure.cpp, 388 bytes (added by , 6 years ago) |
|---|
| Line | |
|---|---|
| 1 | #include <boost/range/adaptor/indexed.hpp> |
| 2 | #include <boost/range/adaptor/indirected.hpp> |
| 3 | #include <boost/range/adaptor/replaced.hpp> |
| 4 | #include <vector> |
| 5 | |
| 6 | struct Base |
| 7 | { |
| 8 | virtual ~Base() = 0; |
| 9 | }; |
| 10 | |
| 11 | void invoke_failure() |
| 12 | { |
| 13 | std::vector<Base*> bs; |
| 14 | |
| 15 | auto refs = bs | boost::adaptors::indirected; |
| 16 | |
| 17 | for (const auto& b : refs | boost::adaptors::indexed()) |
| 18 | { |
| 19 | (void)b; |
| 20 | } |
| 21 | } |
