diff -Naur .build/boost_1_53_0/boost/variant/get.hpp .build/boost_1_53_0_patched/boost/variant/get.hpp
|
old
|
new
|
|
| 17 | 17 | |
| 18 | 18 | #include "boost/config.hpp" |
| 19 | 19 | #include "boost/detail/workaround.hpp" |
| | 20 | #include "boost/throw_exception.hpp" |
| 20 | 21 | #include "boost/utility/addressof.hpp" |
| 21 | 22 | #include "boost/variant/variant_fwd.hpp" |
| 22 | 23 | |
| … |
… |
|
| 177 | 178 | U_ptr result = get<U>(&operand); |
| 178 | 179 | |
| 179 | 180 | if (!result) |
| 180 | | throw bad_get(); |
| | 181 | throw_exception(bad_get()); |
| 181 | 182 | return *result; |
| 182 | 183 | } |
| 183 | 184 | |
| … |
… |
|
| 193 | 194 | U_ptr result = get<const U>(&operand); |
| 194 | 195 | |
| 195 | 196 | if (!result) |
| 196 | | throw bad_get(); |
| | 197 | throw_exception(bad_get()); |
| 197 | 198 | return *result; |
| 198 | 199 | } |
| 199 | 200 | |
diff -Naur .build/boost_1_53_0/boost/variant/variant.hpp .build/boost_1_53_0_patched/boost/variant/variant.hpp
|
old
|
new
|
|
| 38 | 38 | #include "boost/variant/detail/has_nothrow_move.hpp" |
| 39 | 39 | #include "boost/variant/detail/move.hpp" |
| 40 | 40 | |
| | 41 | #include "boost/detail/no_exceptions_support.hpp" |
| 41 | 42 | #include "boost/detail/reference_content.hpp" |
| 42 | 43 | #include "boost/aligned_storage.hpp" |
| 43 | 44 | #include "boost/blank.hpp" |
| … |
… |
|
| 770 | 771 | // ...destroy lhs content... |
| 771 | 772 | lhs_content.~LhsT(); // nothrow |
| 772 | 773 | |
| 773 | | try |
| | 774 | BOOST_TRY |
| 774 | 775 | { |
| 775 | 776 | // ...and attempt to copy rhs content into lhs storage: |
| 776 | 777 | copy_rhs_content_(lhs_.storage_.address(), rhs_content_); |
| 777 | 778 | } |
| 778 | | catch (...) |
| | 779 | BOOST_CATCH (...) |
| 779 | 780 | { |
| 780 | 781 | // In case of failure, restore backup content to lhs storage... |
| 781 | 782 | new(lhs_.storage_.address()) |
| … |
… |
|
| 784 | 785 | ); // nothrow |
| 785 | 786 | |
| 786 | 787 | // ...and rethrow: |
| 787 | | throw; |
| | 788 | BOOST_RETHROW |
| 788 | 789 | } |
| | 790 | BOOST_CATCH_END |
| 789 | 791 | |
| 790 | 792 | // In case of success, indicate new content type: |
| 791 | 793 | lhs_.indicate_which(rhs_which_); // nothrow |
| … |
… |
|
| 803 | 805 | // ...destroy lhs content... |
| 804 | 806 | lhs_content.~LhsT(); // nothrow |
| 805 | 807 | |
| 806 | | try |
| | 808 | BOOST_TRY |
| 807 | 809 | { |
| 808 | 810 | // ...and attempt to copy rhs content into lhs storage: |
| 809 | 811 | copy_rhs_content_(lhs_.storage_.address(), rhs_content_); |
| 810 | 812 | } |
| 811 | | catch (...) |
| | 813 | BOOST_CATCH (...) |
| 812 | 814 | { |
| 813 | 815 | // In case of failure, copy backup pointer to lhs storage... |
| 814 | 816 | new(lhs_.storage_.address()) |
| … |
… |
|
| 818 | 820 | lhs_.indicate_backup_which( lhs_.which() ); // nothrow |
| 819 | 821 | |
| 820 | 822 | // ...and rethrow: |
| 821 | | throw; |
| | 823 | BOOST_RETHROW |
| 822 | 824 | } |
| | 825 | BOOST_CATCH_END |
| 823 | 826 | |
| 824 | 827 | // In case of success, indicate new content type... |
| 825 | 828 | lhs_.indicate_which(rhs_which_); // nothrow |
| … |
… |
|
| 1860 | 1863 | // Destroy lhs's content... |
| 1861 | 1864 | lhs_.destroy_content(); // nothrow |
| 1862 | 1865 | |
| 1863 | | try |
| | 1866 | BOOST_TRY |
| 1864 | 1867 | { |
| 1865 | 1868 | // ...and attempt to copy rhs's content into lhs's storage: |
| 1866 | 1869 | new(lhs_.storage_.address()) |
| 1867 | 1870 | RhsT( rhs_content ); |
| 1868 | 1871 | } |
| 1869 | | catch (...) |
| | 1872 | BOOST_CATCH (...) |
| 1870 | 1873 | { |
| 1871 | 1874 | // In case of failure, default-construct fallback type in lhs's storage... |
| 1872 | 1875 | new (lhs_.storage_.address()) |
| … |
… |
|
| 1878 | 1881 | ); // nothrow |
| 1879 | 1882 | |
| 1880 | 1883 | // ...and rethrow: |
| 1881 | | throw; |
| | 1884 | BOOST_RETHROW |
| 1882 | 1885 | } |
| | 1886 | BOOST_CATCH_END |
| 1883 | 1887 | |
| 1884 | 1888 | // In the event of success, indicate new content type: |
| 1885 | 1889 | lhs_.indicate_which(rhs_which_); // nothrow |
| … |
… |
|
| 2004 | 2008 | // Destroy lhs's content... |
| 2005 | 2009 | lhs_.destroy_content(); // nothrow |
| 2006 | 2010 | |
| 2007 | | try |
| | 2011 | BOOST_TRY |
| 2008 | 2012 | { |
| 2009 | 2013 | // ...and attempt to copy rhs's content into lhs's storage: |
| 2010 | 2014 | new(lhs_.storage_.address()) |
| 2011 | 2015 | RhsT( detail::variant::move(rhs_content) ); |
| 2012 | 2016 | } |
| 2013 | | catch (...) |
| | 2017 | BOOST_CATCH (...) |
| 2014 | 2018 | { |
| 2015 | 2019 | // In case of failure, default-construct fallback type in lhs's storage... |
| 2016 | 2020 | new (lhs_.storage_.address()) |
| … |
… |
|
| 2022 | 2026 | ); // nothrow |
| 2023 | 2027 | |
| 2024 | 2028 | // ...and rethrow: |
| 2025 | | throw; |
| | 2029 | BOOST_RETHROW |
| 2026 | 2030 | } |
| | 2031 | BOOST_CATCH_END |
| 2027 | 2032 | |
| 2028 | 2033 | // In the event of success, indicate new content type: |
| 2029 | 2034 | lhs_.indicate_which(rhs_which_); // nothrow |
diff -Naur .build/boost_1_53_0/boost/variant/visitor_ptr.hpp .build/boost_1_53_0_patched/boost/variant/visitor_ptr.hpp
|
old
|
new
|
|
| 18 | 18 | |
| 19 | 19 | #include "boost/mpl/eval_if.hpp" |
| 20 | 20 | #include "boost/mpl/identity.hpp" |
| | 21 | #include "boost/throw_exception.hpp" |
| 21 | 22 | #include "boost/type_traits/add_reference.hpp" |
| 22 | 23 | #include "boost/type_traits/is_reference.hpp" |
| 23 | 24 | #include "boost/type_traits/is_void.hpp" |
| … |
… |
|
| 64 | 65 | template <typename U> |
| 65 | 66 | result_type operator()(const U&) const |
| 66 | 67 | { |
| 67 | | throw bad_visit(); |
| | 68 | throw_exception(bad_visit()); |
| 68 | 69 | } |
| 69 | 70 | |
| 70 | 71 | #if !defined(BOOST_NO_VOID_RETURNS) |