mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-15 22:21:20 +08:00
Add nodiscard to std::vector<bool>::empty()
We already added it to the std::vector primary template. * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard attribute. From-SVN: r270648
This commit is contained in:
parent
82b6276fb3
commit
ad1f468736
@ -1,5 +1,8 @@
|
||||
2019-04-29 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
|
||||
attribute.
|
||||
|
||||
* include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
|
||||
class template and partial specialization.
|
||||
|
||||
|
@ -878,7 +878,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||
{ return size_type(const_iterator(this->_M_impl._M_end_addr(), 0)
|
||||
- begin()); }
|
||||
|
||||
bool
|
||||
_GLIBCXX_NODISCARD bool
|
||||
empty() const _GLIBCXX_NOEXCEPT
|
||||
{ return begin() == end(); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user