diff -r 510d5bd079ad boost/variant/get.hpp
|
a
|
b
|
|
| 177 | 177 | U_ptr result = get<U>(&operand); |
| 178 | 178 | |
| 179 | 179 | if (!result) |
| 180 | | throw bad_get(); |
| | 180 | boost::throw_exception(bad_get()); |
| 181 | 181 | return *result; |
| 182 | 182 | } |
| 183 | 183 | |
| … |
… |
|
| 193 | 193 | U_ptr result = get<const U>(&operand); |
| 194 | 194 | |
| 195 | 195 | if (!result) |
| 196 | | throw bad_get(); |
| | 196 | boost::throw_exception(bad_get()); |
| 197 | 197 | return *result; |
| 198 | 198 | } |
| 199 | 199 | |
diff -r 510d5bd079ad boost/variant/variant.hpp
|
a
|
b
|
|
| 613 | 613 | // ...and attempt to copy rhs content into lhs storage: |
| 614 | 614 | new(lhs_.storage_.address()) RhsT(rhs_content_); |
| 615 | 615 | } |
| | 616 | #ifndef BOOST_NO_EXCEPTIONS |
| 616 | 617 | catch (...) |
| 617 | 618 | { |
| 618 | 619 | // In case of failure, copy backup pointer to lhs storage... |
| … |
… |
|
| 625 | 626 | // ...and rethrow: |
| 626 | 627 | throw; |
| 627 | 628 | } |
| | 629 | #endif |
| 628 | 630 | |
| 629 | 631 | // In case of success, indicate new content type... |
| 630 | 632 | lhs_.indicate_which(rhs_which_); // nothrow |