Ticket #6760: boost_pp_ticket_6760.cpp
| File boost_pp_ticket_6760.cpp, 474 bytes (added by , 11 years ago) |
|---|
| Line | |
|---|---|
| 1 | #include <boost/preprocessor/array/push_back.hpp> |
| 2 | #include <boost/preprocessor/stringize.hpp> |
| 3 | #include <boost/preprocessor/tuple/rem.hpp> |
| 4 | #include <iostream> |
| 5 | |
| 6 | #define ARRAY (3, (a, b, c)) |
| 7 | #define EMPTY_ARRAY (0, ()) |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | std::cout << BOOST_PP_STRINGIZE(BOOST_PP_ARRAY_PUSH_BACK(ARRAY, d)) << std::endl; // expands to (4, (a, b, c, d)) |
| 12 | std::cout << BOOST_PP_STRINGIZE(BOOST_PP_ARRAY_PUSH_BACK(EMPTY_ARRAY, d)) << std::endl; // expands to (4, (a, b, c, d)) |
| 13 | } |
