summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Globals.h')
-rw-r--r--src/Globals.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Globals.h b/src/Globals.h
index bc868b637..0a5607c2f 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -293,6 +293,12 @@ namespace cpp20
{
return std::unique_ptr<T>(new std::remove_extent_t<T>[a_Size]);
}
+
+ template <class T>
+ std::enable_if_t<!std::is_array_v<T>, std::unique_ptr<T>> make_unique_for_overwrite()
+ {
+ return std::unique_ptr<T>(new T);
+ }
}