@@ -188,11 +188,11 @@ const Out& AsBase(const In& x)
188188 */
189189#define FORMATTER_METHODS (cls, obj ) \
190190 template <typename Stream> \
191- static void Ser (Stream& s, const cls& obj) { SerializationOps (obj, s, CSerActionSerialize () ); } \
191+ static void Ser (Stream& s, const cls& obj) { SerializationOps (obj, s, ActionSerialize{} ); } \
192192 template <typename Stream> \
193- static void Unser (Stream& s, cls& obj) { SerializationOps (obj, s, CSerActionUnserialize () ); } \
193+ static void Unser (Stream& s, cls& obj) { SerializationOps (obj, s, ActionUnserialize{} ); } \
194194 template <typename Stream, typename Type, typename Operation> \
195- static inline void SerializationOps (Type& obj, Stream& s, Operation ser_action) \
195+ static void SerializationOps (Type& obj, Stream& s, Operation ser_action)
196196
197197/* *
198198 * Implement the Serialize and Unserialize methods by delegating to a single templated
@@ -953,26 +953,17 @@ void Unserialize(Stream& is, std::shared_ptr<const T>& p)
953953}
954954
955955
956-
957956/* *
958- * Support for SERIALIZE_METHODS and READWRITE macro .
957+ * Support for all macros providing or using the ser_action parameter of the SerializationOps method .
959958 */
960- struct CSerActionSerialize
961- {
959+ struct ActionSerialize {
962960 constexpr bool ForRead () const { return false ; }
963961};
964- struct CSerActionUnserialize
965- {
962+ struct ActionUnserialize {
966963 constexpr bool ForRead () const { return true ; }
967964};
968965
969966
970-
971-
972-
973-
974-
975-
976967/* ::GetSerializeSize implementations
977968 *
978969 * Computing the serialized size of objects is done through a special stream
@@ -1031,36 +1022,36 @@ inline void UnserializeMany(Stream& s, Args&&... args)
10311022}
10321023
10331024template <typename Stream, typename ... Args>
1034- inline void SerReadWriteMany (Stream& s, CSerActionSerialize ser_action, const Args&... args)
1025+ inline void SerReadWriteMany (Stream& s, ActionSerialize ser_action, const Args&... args)
10351026{
10361027 ::SerializeMany (s, args...);
10371028}
10381029
10391030template <typename Stream, typename ... Args>
1040- inline void SerReadWriteMany (Stream& s, CSerActionUnserialize ser_action, Args&&... args)
1031+ inline void SerReadWriteMany (Stream& s, ActionUnserialize ser_action, Args&&... args)
10411032{
10421033 ::UnserializeMany (s, args...);
10431034}
10441035
10451036template <typename Stream, typename Type, typename Fn>
1046- inline void SerRead (Stream& s, CSerActionSerialize ser_action, Type&&, Fn&&)
1037+ inline void SerRead (Stream& s, ActionSerialize ser_action, Type&&, Fn&&)
10471038{
10481039}
10491040
10501041template <typename Stream, typename Type, typename Fn>
1051- inline void SerRead (Stream& s, CSerActionUnserialize ser_action, Type&& obj, Fn&& fn)
1042+ inline void SerRead (Stream& s, ActionUnserialize ser_action, Type&& obj, Fn&& fn)
10521043{
10531044 fn (s, std::forward<Type>(obj));
10541045}
10551046
10561047template <typename Stream, typename Type, typename Fn>
1057- inline void SerWrite (Stream& s, CSerActionSerialize ser_action, Type&& obj, Fn&& fn)
1048+ inline void SerWrite (Stream& s, ActionSerialize ser_action, Type&& obj, Fn&& fn)
10581049{
10591050 fn (s, std::forward<Type>(obj));
10601051}
10611052
10621053template <typename Stream, typename Type, typename Fn>
1063- inline void SerWrite (Stream& s, CSerActionUnserialize ser_action, Type&&, Fn&&)
1054+ inline void SerWrite (Stream& s, ActionUnserialize ser_action, Type&&, Fn&&)
10641055{
10651056}
10661057
0 commit comments