More mac fixups.

This commit is contained in:
Ben Vanik
2014-07-29 20:29:50 -07:00
parent 0c5110ac3e
commit d56ae60460
18 changed files with 165 additions and 70 deletions

View File

@@ -10,6 +10,8 @@
#ifndef POLY_CXX_COMPAT_H_
#define POLY_CXX_COMPAT_H_
#include <memory>
#include <poly/config.h>
// C++11 thread local storage.
@@ -30,6 +32,16 @@
#define alignas(N) __declspec(align(N))
#endif // 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.
namespace std {
template <typename T, typename... Args>
unique_ptr<T> make_unique(Args&&... args) {
return unique_ptr<T>(new T(forward<Args>(args)...));
}
} // namespace std
namespace poly {} // namespace poly
#endif // POLY_CXX_COMPAT_H_