Skip to content

Commit 8ce8b9e

Browse files
committed
Add nodiscard to memory resource
1 parent 1a0bbe0 commit 8ce8b9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/container/pmr/memory_resource.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class BOOST_CONTAINER_NOVTABLE memory_resource
4141

4242
//! <b>Effects</b>: Equivalent to
4343
//! `return do_allocate(bytes, alignment);`
44-
void* allocate(std::size_t bytes, std::size_t alignment = max_align)
44+
BOOST_CONTAINER_ATTRIBUTE_NODISCARD void* allocate(std::size_t bytes, std::size_t alignment = max_align)
4545
{
4646
//Obtain a pointer to enough storage and initialize the lifetime
4747
//of an array object of the given size in the address

0 commit comments

Comments
 (0)