12345678910111213141516171819 |
- #include<boost/any.hpp>
- #include<iostream>
- boost::any get_any() {
- boost::any foobar = 3;
- return foobar;
- }
- int main(int argc, char **argv) {
- boost::any result = get_any();
- if(boost::any_cast<int>(result) == 3) {
- std::cout << "Everything is fine in the world.\n";
- return 0;
- } else {
- std::cout << "Mathematics stopped working.\n";
- return 1;
- }
- }
|