2

Context: I'm hitting this assertion while compiling an existing (big) code:

/usr/include/cereal/cereal.hpp:833:9: error: static assertion failed: cereal found more than one compatible input serialization function for the provided type and archive combination.

Types must either have a serialize function, load/save pair, or load_minimal/save_minimal pair (you may not mix these).
Use specialization (see access.hpp) if you need to disambiguate between serialize vs load/save functions.
Note that serialization functions can be inherited which may lead to the aforementioned ambiguities.
In addition, you may not mix versioned with non-versioned serialization functions.

           static_assert(traits::detail::count_input_serializers<T, ArchiveType>::value < 2,
           ^~~~~~~~~~~~~

After reading the documentation, I grep'ed for load/save functions, but only found serialize functions, so it looks like this is not a case of mixing load/save with serialize functions.

Is there any way to list all the functions that made that assertion trigger (or any other method that may help me find the issue)?


Community
  • 1
  • 1
Vitor
  • 2,734
  • 29
  • 40
  • Try commenting out the static assertion - the code should still fail to compile but you'll get the raw compiler error instead of the assertion. – Azoth Oct 21 '19 at 06:02

0 Answers0