瀏覽代碼

Use universal initialization when constructing user types

Ole 10 年之前
父節點
當前提交
5d3a95a857
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);