diff --git a/src/common/serialization/boost_std_variant.hpp b/src/common/serialization/boost_std_variant.hpp index b00f827b1..813ba1aaf 100644 --- a/src/common/serialization/boost_std_variant.hpp +++ b/src/common/serialization/boost_std_variant.hpp @@ -3,7 +3,7 @@ // MS compatible compilers support #pragma once #if defined(_MSC_VER) -# pragma once +#pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 @@ -26,50 +26,40 @@ #include -#include -#include #include +#include +#include namespace boost { namespace serialization { -template -struct std_variant_save_visitor -{ - std_variant_save_visitor(Archive& ar) : - m_ar(ar) - {} - template - void operator()(T const & value) const - { +template +struct std_variant_save_visitor { + std_variant_save_visitor(Archive& ar) : m_ar(ar) {} + template + void operator()(T const& value) const { m_ar << BOOST_SERIALIZATION_NVP(value); } + private: - Archive & m_ar; + Archive& m_ar; }; - -template -struct std_variant_load_visitor -{ - std_variant_load_visitor(Archive& ar) : - m_ar(ar) - {} - template - void operator()(T & value) const - { +template +struct std_variant_load_visitor { + std_variant_load_visitor(Archive& ar) : m_ar(ar) {} + template + void operator()(T& value) const { m_ar >> BOOST_SERIALIZATION_NVP(value); } + private: - Archive & m_ar; + Archive& m_ar; }; -template -void save( - Archive & ar, - std::variant const & v, - unsigned int /*version*/ -){ +template +void save(Archive& ar, std::variant const& v, unsigned int /*version*/ +) { const std::size_t which = v.index(); ar << BOOST_SERIALIZATION_NVP(which); std_variant_save_visitor visitor(ar); @@ -78,45 +68,39 @@ void save( // Minimalist metaprogramming for handling parameter pack namespace mp { - namespace detail { - template - struct front_impl; +namespace detail { +template +struct front_impl; - template