test cases/frameworks/1 boost/nomod.cpp
raw| 1 | #include<boost/any.hpp> |
| 2 | #include<iostream> |
| 3 | |
| 4 | boost::any get_any() { |
| 5 | boost::any foobar = 3; |
| 6 | return foobar; |
| 7 | } |
| 8 | |
| 9 | int main(int argc, char **argv) { |
| 10 | boost::any result = get_any(); |
| 11 | if(boost::any_cast<int>(result) == 3) { |
| 12 | std::cout << "Everything is fine in the world.\n"; |
| 13 | return 0; |
| 14 | } else { |
| 15 | std::cout << "Mathematics stopped working.\n"; |
| 16 | return 1; |
| 17 | } |
| 18 | } |