VC++ has std::make_unique.

This commit is contained in:
Ben Vanik 2014-08-01 20:28:52 -07:00
parent 4beaacb622
commit 12f734d7a0
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#define alignas(N) __declspec(align(N))
#endif // XE_COMPILER_MSVC
#if !XE_COMPILER_MSVC
// C++1y make_unique.
// http://herbsutter.com/2013/05/29/gotw-89-solution-smart-pointers/
// This is present in clang with -std=c++1y, but not otherwise.
@ -41,6 +42,7 @@ unique_ptr<T> make_unique(Args&&... args) {
return unique_ptr<T>(new T(forward<Args>(args)...));
}
} // namespace std
#endif // !XE_COMPILER_MSVC
namespace poly {} // namespace poly