stl: refine memory.hpp
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#ifndef ENTT_STL_MEMORY_HPP
|
||||
#define ENTT_STL_MEMORY_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace entt::stl {
|
||||
|
||||
/*! @cond TURN_OFF_DOXYGEN */
|
||||
@@ -22,16 +26,16 @@ template<typename Type>
|
||||
# include <version>
|
||||
#
|
||||
# if defined(__cpp_lib_to_address)
|
||||
# include <memory>
|
||||
using std::to_address;
|
||||
# else
|
||||
using stl::internal::to_address;
|
||||
# define ENTT_STL_TO_ADDRESS std::to_address
|
||||
# endif
|
||||
#
|
||||
#else
|
||||
using stl::internal;
|
||||
#endif
|
||||
|
||||
#ifndef ENTT_STL_TO_ADDRESS
|
||||
# define ENTT_STL_TO_ADDRESS internal::to_address
|
||||
#endif
|
||||
|
||||
using ENTT_STL_TO_ADDRESS;
|
||||
|
||||
} // namespace entt::stl
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user