Chris Donnan : Programming – Brooklyn Style
software, trading, family, fun
Some truly wacky looking C++ code (Boost 1.47.0)
Posted C++, coding, programming on Wednesday, July 13th, 2011.
Posted C++, coding, programming on Wednesday, July 13th, 2011.
I had to look at it a few times. Cool, sorta wacky.
try_
[
f(arg1)
]
.catch_<runtime_error>()
[
cout << val("caught runtime error or derived\n"),
throw_()
]
.catch_<exception>()
[
cout << val("caught exception or derived\n"),
throw_()
]
.catch_all
[
cout << val("caught some other type of exception\n"),
throw_(runtime_error("translated exception"))
]
Responses are currently closed, but you can trackback from your own site.
