#pragma once #include #include // Custom make_unique so that C++14 support will not be necessary for compilation template::value, int>::type = 0> std::unique_ptr make_unique(Args&&... args) { return std::unique_ptr(new T(std::forward(args)...)); } template::value && std::extent::value == 0, int>::type = 0> std::unique_ptr make_unique(std::size_t size) { return std::unique_ptr(new typename std::remove_extent::type[size]()); } template::value != 0, int>::type = 0> void make_unique(Args&&... args) = delete; template::value, int>::type = 0> std::unique_ptr make_unique_default_init() { return std::unique_ptr(new T); } template::value && std::extent::value == 0, int>::type = 0> std::unique_ptr make_unique_default_init(std::size_t size) { return std::unique_ptr(new typename std::remove_extent::type[size]); } template::value != 0, int>::type = 0> void make_unique_default_init(Args&&... args) = delete;