imported/implemented boost/serialization/variant now contains code for serialization of boost::variant, boost::variant2 and std::variant. Care has been taken to depend only on the public interfaces of these types. Hence, it is reasonable to hope that the archives are compatible in that one type could be saved and subsequently loaded into a compatible type. Hopefully this will be useful in some way. At a minimum it minimizes code duplication.
Initializing a base class in the initializer list with a member function in the derived is invalid in gcc as the object isn't fully-formed
We instead just inline the body of `get_key()` which avoids the issue.
The destructor of the xml_oarchive_impl winds up calling `this->windup()` which in turn invokes `this->This()->...` which essentially static_cast's to a Archive, which by this point in time is long-since destructed.
By simply inlining the implementation of windup(), we avoid the UB and minimize the required code changes
There's no inheritance so static_cast'ing to a base is incorrect, instead we use reinterpret_cast with the common initial sequence to avoid ubsan failures
This avoids an extraneous warning when running Serialization code through ubsan which flags increments to a nullptr
The relevant condtional check (`++m_bnext < m_bend`) still passes with this change
In file included from magadm/CmdGetInfoHTHSession.cpp:24:
In file included from /remote/users/mlamesch/CloneFromPlatinum/SI_Pack23-2/common/include/si/common/HTHSegmentationCacheInfoSerialization.h:19:
In file included from /data/mwrep/res/osp/Boost/23-0-0-0/include/boost/archive/text_iarchive.hpp:24:
In file included from /data/mwrep/res/osp/Boost/23-0-0-0/include/boost/archive/basic_text_iarchive.hpp:30:
In file included from /data/mwrep/res/osp/Boost/23-0-0-0/include/boost/archive/detail/common_iarchive.hpp:21:
In file included from /data/mwrep/res/osp/Boost/23-0-0-0/include/boost/archive/detail/basic_iarchive.hpp:28:
/data/mwrep/res/osp/Boost/23-0-0-0/include/boost/archive/detail/helper_collection.hpp:58:44: error: definition of implicit copy constructor for 'predicate' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
BOOST_DELETED_FUNCTION(predicate & operator=(const predicate & rhs))
^
/opt/1A/toolchain/x86_64-v23.0.2/lib64/gcc/x86_64-1a-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/predefined_ops.h:325:37: note: in implicit copy constructor for 'boost::archive::detail::helper_collection::predicate' first required here
{ return _Iter_pred<_Predicate>(_GLIBCXX_MOVE(__pred)); }
^
/opt/1A/toolchain/x86_64-v23.0.2/lib64/gcc/x86_64-1a-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/move.h:167:30: note: expanded from macro '_GLIBCXX_MOVE'
^
/opt/1A/toolchain/x86_64-v23.0.2/lib64/gcc/x86_64-1a-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/stl_algo.h:3923:26: note: in instantiation of function template specialization '__gnu_cxx::__ops::__pred_iter<boost::archive::detail::helper_collection::predicate>' requested here
__gnu_cxx::__ops::__pred_iter(__pred));
^
/data/mwrep/res/osp/Boost/23-0-0-0/include/boost/archive/detail/helper_collection.hpp:75:18: note: in instantiation of function template specialization 'std::find_if<__gnu_cxx::__normal_iterator<std::pair<const void *, boost::shared_ptr<void>> *, std::vector<std::pair<const void *, boost::shared_ptr<void>>>>, boost::archive::detail::helper_collection::predicate>' requested here
std::find_if(
^
boost/serialization/throw_exception.hpp does not include the header which defines boost::throw_exception leading to compiler errors unless that header just happens to be #included elsewhere. See this message thread: https://lists.boost.org/boost-users/2022/01/91144.php
Likewise the std lib header <exception> is *not* required since we use nothing from that here.
* master:
squash merge all changes in develop into master
squash merge into next boost release
merge into next boost release
changes made in the hope of eliminated “stable” error for functions previously defined in the header. Moved those function to codecvt_null.cpp
Squash-merge develop
# Conflicts:
# test/testfile2