From bc5cc30582511aea209a233d3bf1aa87fbff8ce8 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sun, 11 Jan 2026 23:35:56 -0500 Subject: [PATCH] Hook to implement serialization --- include/boost/exception/exception.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index 4ec18d7..8d60724 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -175,6 +175,7 @@ boost { class error_info_base; struct type_info_; + class writer; struct error_info_container @@ -185,6 +186,7 @@ boost virtual void add_ref() const = 0; virtual bool release() const = 0; virtual refcount_ptr clone() const = 0; + virtual void write_to( writer & ) const { } protected: @@ -227,6 +229,9 @@ boost void copy_boost_exception( exception *, exception const * ); + template + void write_diagnostic_information_to_impl_( exception const *, std::exception const *, Writer & ); + template E const & set_info( E const &, error_info const & ); @@ -321,6 +326,7 @@ boost friend struct exception_detail::set_info_rv; friend struct exception_detail::set_info_rv; friend void exception_detail::copy_boost_exception( exception *, exception const * ); + template friend void exception_detail::write_diagnostic_information_to_impl_( exception const *, std::exception const *, Writer & ); #endif mutable exception_detail::refcount_ptr data_; mutable char const * throw_function_;