diff options
Diffstat (limited to 'src/compat/memory.hpp')
-rw-r--r-- | src/compat/memory.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/compat/memory.hpp b/src/compat/memory.hpp index 2c0f742..566cc8b 100644 --- a/src/compat/memory.hpp +++ b/src/compat/memory.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_COMPAT_MEMORY_HPP -#define TMWA_COMPAT_MEMORY_HPP +#pragma once // memory.hpp - I forget ... // // Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com> @@ -19,11 +18,14 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. -# include "../sanity.hpp" +#include "fwd.hpp" -# include <memory> +#include <memory> +#include <type_traits> +namespace tmwa +{ template<class T> struct is_array_of_unknown_bound : std::is_same<T, typename std::remove_extent<T>::type[]> @@ -41,5 +43,4 @@ typename std::enable_if<is_array_of_unknown_bound<T>::value, std::unique_ptr<T, typedef typename std::remove_extent<T>::type E; return std::unique_ptr<E[], D>(new E[sz]()); } - -#endif // TMWA_COMPAT_MEMORY_HPP +} // namespace tmwa |