Seralization error encountered for unsigned __int128 (using gcc)

20 views
Skip to first unread message

Priyanka Ghosh

unread,
Jun 1, 2020, 9:13:09 PM6/1/20
to cereal serialization library
I am encountering an error while trying to (de)serialize a struct containing data-structure of type  unsigned __int128.

error: static assertion failed: cereal could not find any input serialization functions for the provided type and archive combination.


In the past while using 'uint64_t' my Serialize function had the following signature:

struct MnodeInfo {

uint64_t node;
int prefix_id;

MnodeInfo()=default;

template<class Archive>

void serialize(Archive & archive)
 {

   archive(node, prefix_id);

 }
};



However changing 'uint64_t' to ' unsigned __int128' results in the above compile-time error. Is there a serialize function capable of handling this particular datatype?
Looking for a workaround for this issue. I am familiarizing myself with the load/save or load_minimal/save_minimal alternative, but would appreciate any help in solving this issue.

Thanks!!
Reply all
Reply to author
Forward
0 new messages