Browse Source

memory: make to_address [[nodiscard]]

Michele Caini 4 years ago
parent
commit
98f785d199
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/core/memory.hpp

+ 1 - 1
src/entt/core/memory.hpp

@@ -18,7 +18,7 @@ namespace entt {
  * @return A raw pointer that represents the address of the original pointer.
  */
 template<typename Type>
-constexpr auto to_address(Type &&ptr) ENTT_NOEXCEPT {
+[[nodiscard]] constexpr auto to_address(Type &&ptr) ENTT_NOEXCEPT {
     if constexpr(std::is_pointer_v<std::remove_const_t<std::remove_reference_t<Type>>>) {
         return ptr;
     } else {