Explorar el Código

memory: make to_address [[nodiscard]]

Michele Caini hace 5 años
padre
commit
98f785d199
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 {