Explorar el Código

Use universal initialization when constructing user types

Ole hace 10 años
padre
commit
5d3a95a857
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/luwra/usertypes.hpp

+ 1 - 1
lib/luwra/usertypes.hpp

@@ -282,7 +282,7 @@ struct Value<U&> {
 		}
 
 		// Construct
-		new (mem) T(std::forward<A>(args)...);
+		new (mem) T {std::forward<A>(args)...};
 
 		// Apply metatable for unqualified type T
 		internal::apply_user_type_meta_table<T>(state);