summaryrefslogtreecommitdiffstats
path: root/libcxx/include/scoped_allocator
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-11-26 02:55:38 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-11-26 02:55:38 +0000
commit3fddff51ba2b4d713dad95ca97681f004dc822c9 (patch)
tree0e46cf78b8bc8a9c8fb4c94fd2068508aea1e97c /libcxx/include/scoped_allocator
parenta1da5e4ce743352b916c4d0378cb945b76c1d22d (diff)
downloadbcm5719-llvm-3fddff51ba2b4d713dad95ca97681f004dc822c9.tar.gz
bcm5719-llvm-3fddff51ba2b4d713dad95ca97681f004dc822c9.zip
More of P0600; marking allocation routines as [[nodiscard]]
llvm-svn: 318992
Diffstat (limited to 'libcxx/include/scoped_allocator')
-rw-r--r--libcxx/include/scoped_allocator8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator
index d60ae94f14e..4760d946def 100644
--- a/libcxx/include/scoped_allocator
+++ b/libcxx/include/scoped_allocator
@@ -68,8 +68,8 @@ public:
outer_allocator_type& outer_allocator() noexcept;
const outer_allocator_type& outer_allocator() const noexcept;
- pointer allocate(size_type n);
- pointer allocate(size_type n, const_void_pointer hint);
+ pointer allocate(size_type n); // [[nodiscard]] in C++20
+ pointer allocate(size_type n, const_void_pointer hint); // [[nodiscard]] in C++20
void deallocate(pointer p, size_type n) noexcept;
size_type max_size() const;
@@ -477,11 +477,11 @@ public:
const outer_allocator_type& outer_allocator() const _NOEXCEPT
{return base::outer_allocator();}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
pointer allocate(size_type __n)
{return allocator_traits<outer_allocator_type>::
allocate(outer_allocator(), __n);}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
pointer allocate(size_type __n, const_void_pointer __hint)
{return allocator_traits<outer_allocator_type>::
allocate(outer_allocator(), __n, __hint);}
OpenPOWER on IntegriCloud