PStack  2.0
Stack trace printer for MSVC and GCC binaries
memory.hpp
Go to the documentation of this file.
1 // ===-- include/psystem/framework/memory.hpp ------------- -*- C++ -*- --=== //
2 // Copyright (c) 2014 Matt Bisson. All rights reserved.
3 
19 #pragma once
20 #ifndef PSYSTEM_FRAMEWORK_MEMORY_HPP
21 #define PSYSTEM_FRAMEWORK_MEMORY_HPP
22 
23 #include "platform.hpp"
24 #include <memory>
25 
26 // Visual C++ already has this function, despite its strange absence from C++11.
27 #ifndef _MSC_VER
28 # if (__cplusplus <= 201103L)
29 
32 namespace std {
33 
73 template<typename T, typename... Types>
74 unique_ptr<T>
75 make_unique(Types&&... args)
76 {
77  return unique_ptr<T>(new T(forward<Types>(args)...));
78 }
79 
80 } // namespace std
81 
82 # endif // __cplusplus <= 201103L
83 #endif // _MSC_VER
84 #endif // PSYSTEM_FRAMEWORK_MEMORY_HPP
Master header file for Platform-wide declarations.
Definition: shared_handle.hpp:782