forked from lthn/blockchain
workaround fix for old android sdk with old boost(with missing pfr) v2
This commit is contained in:
parent
fd810d5e29
commit
5387a7711c
2 changed files with 4 additions and 3 deletions
|
|
@ -89,6 +89,7 @@ endif()
|
|||
if(CAKEWALLET)
|
||||
message("NOTICE: Building libraries for CAKEWALLET")
|
||||
add_definitions(-DCAKEWALLET)
|
||||
add_definitions(-DDISABLE_PFR_SERIALIZATION_SELFCHECK)
|
||||
endif()
|
||||
|
||||
set(OPENSSL_USE_STATIC_LIBS TRUE) # link statically
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#pragma once
|
||||
#include <type_traits>
|
||||
#ifndef MOBILE_WALLET
|
||||
#include <boost/pfr.hpp>
|
||||
#ifdef 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.
|
||||
**********************************************************************************************************************************/
|
||||
#ifndef MOBILE_WALLET
|
||||
#ifdef 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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue