1
0
Fork 0
forked from lthn/blockchain

workaround fix for old android sdk with old boost(with missing pfr) v3 (shame on me)

This commit is contained in:
cryptozoidberg 2024-10-23 15:05:46 +04:00
parent 5387a7711c
commit a8a188b754
No known key found for this signature in database
GPG key ID: 2E10CC61CAC8F36D

View file

@ -4,7 +4,7 @@
#pragma once
#include <type_traits>
#ifdef DISABLE_PFR_SERIALIZATION_SELFCHECK
#ifndef DISABLE_PFR_SERIALIZATION_SELFCHECK
#include <boost/pfr.hpp>
#endif
#define BEGIN_BOOST_SERIALIZATION() template <class t_archive> void serialize(t_archive &_arch, const unsigned int ver) {
@ -38,7 +38,7 @@ template<size_t A, size_t B> struct TAssertEquality {
fields to the structure but forgets to update the serialization map, the compilation will fail. Any update to "num_fields" must
be accompanied by a thorough review of the serialization map to ensure no fields are omitted.
**********************************************************************************************************************************/
#ifdef DISABLE_PFR_SERIALIZATION_SELFCHECK
#ifndef DISABLE_PFR_SERIALIZATION_SELFCHECK
#define END_BOOST_SERIALIZATION_TOTAL_FIELDS(num_fields) static_assert(num_fields == boost::pfr::tuple_size<std::remove_reference<decltype(*this)>::type>::value, "Unexpected number of fields!"); }
#else
#define END_BOOST_SERIALIZATION_TOTAL_FIELDS(num_fields) END_BOOST_SERIALIZATION()