From 8ce8b9ee4394c323e6a22d4d7c04f7823274192d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 18 Dec 2025 11:25:32 +0100 Subject: [PATCH] Add nodiscard to memory resource --- include/boost/container/pmr/memory_resource.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/container/pmr/memory_resource.hpp b/include/boost/container/pmr/memory_resource.hpp index 4acf05e..3eabc3e 100644 --- a/include/boost/container/pmr/memory_resource.hpp +++ b/include/boost/container/pmr/memory_resource.hpp @@ -41,7 +41,7 @@ class BOOST_CONTAINER_NOVTABLE memory_resource //! Effects: Equivalent to //! `return do_allocate(bytes, alignment);` - void* allocate(std::size_t bytes, std::size_t alignment = max_align) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD void* allocate(std::size_t bytes, std::size_t alignment = max_align) { //Obtain a pointer to enough storage and initialize the lifetime //of an array object of the given size in the address