diff options
author | HaoTNN <haotnn@gmail.com> | 2015-05-19 23:22:27 +0200 |
---|---|---|
committer | HaoTNN <haotnn@gmail.com> | 2015-05-19 23:22:27 +0200 |
commit | ac1bfd967153cee45b1ffc93655fbb4833faa531 (patch) | |
tree | 7ca3aef2a46a272ae815912af66dea0afe06e63b /src/Globals.h | |
parent | Fixes lit furnace issue in #2051 (diff) | |
parent | Merge pull request #2076 from mc-server/Cert-disable (diff) | |
download | cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.tar cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.tar.gz cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.tar.bz2 cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.tar.lz cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.tar.xz cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.tar.zst cuberite-ac1bfd967153cee45b1ffc93655fbb4833faa531.zip |
Diffstat (limited to 'src/Globals.h')
-rw-r--r-- | src/Globals.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Globals.h b/src/Globals.h index 1f354ae77..27d944fcc 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -433,10 +433,14 @@ typename std::enable_if<std::is_arithmetic<T>::value, C>::type CeilC(T a_Value) //temporary replacement for std::make_unique until we get c++14 -template <class T, class... Args> -std::unique_ptr<T> make_unique(Args&&... args) + +namespace cpp14 { - return std::unique_ptr<T>(new T(args...)); + template <class T, class... Args> + std::unique_ptr<T> make_unique(Args&&... args) + { + return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); + } } // a tick is 50 ms |