Remove undefined behavior, see #390

This commit is contained in:
Shane Grant
2017-04-10 11:22:38 -07:00
parent 8b8f5814e2
commit 68f56eed92
+2 -2
View File
@@ -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;
}