Skip to content

Commit

Permalink
Remove undefined behavior, see USCiLab#390
Browse files Browse the repository at this point in the history
  • Loading branch information
AzothAmmo authored and JerryRyan committed Jan 5, 2020
1 parent 038e034 commit 145206f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cereal/details/static_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ namespace cereal
{
private:
//! Forces instantiation at pre-execution time
static void instantiate( T const & ) {}
static void instantiate( T const * ) {}

static T & create()
{
static T t;
instantiate(instance);
instantiate(&instance);
return t;
}

Expand Down

0 comments on commit 145206f

Please sign in to comment.