Skip to content

Commit

Permalink
Correctly use export while forcing dynamic init
Browse files Browse the repository at this point in the history
  • Loading branch information
AzothAmmo committed Oct 23, 2019
1 parent f23403d commit ad7ead4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/cereal/types/polymorphic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,18 @@
See CEREAL_REGISTER_DYNAMIC_INIT for detailed explanation
of how this macro should be used. The name used should
match that for CEREAL_REGISTER_DYNAMIC_INIT. */
#define CEREAL_FORCE_DYNAMIC_INIT(LibName) \
namespace cereal { \
namespace detail { \
void dynamic_init_dummy_##LibName(); \
} /* end detail */ \
} /* end cereal */ \
namespace { \
struct dynamic_init_##LibName { \
dynamic_init_##LibName() { \
::cereal::detail::dynamic_init_dummy_##LibName(); \
} \
} dynamic_init_instance_##LibName; \
#define CEREAL_FORCE_DYNAMIC_INIT(LibName) \
namespace cereal { \
namespace detail { \
void CEREAL_DLL_EXPORT dynamic_init_dummy_##LibName(); \
} /* end detail */ \
} /* end cereal */ \
namespace { \
struct dynamic_init_##LibName { \
dynamic_init_##LibName() { \
::cereal::detail::dynamic_init_dummy_##LibName(); \
} \
} dynamic_init_instance_##LibName; \
} /* end anonymous namespace */

namespace cereal
Expand Down

0 comments on commit ad7ead4

Please sign in to comment.