Skip to content

Commit fc94532

Browse files
burblebeetkoeppe
authored andcommitted
LWG3778 vector<bool> missing exception specifications
1 parent 6b56330 commit fc94532

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

source/containers.tex

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9166,22 +9166,24 @@
91669166
};
91679167

91689168
// construct/copy/destroy
9169-
constexpr vector() : vector(Allocator()) { }
9170-
constexpr explicit vector(const Allocator&);
9169+
constexpr vector() noexcept(noexcept(Allocator())) : vector(Allocator()) { }
9170+
constexpr explicit vector(const Allocator&) noexcept;
91719171
constexpr explicit vector(size_type n, const Allocator& = Allocator());
91729172
constexpr vector(size_type n, const bool& value, const Allocator& = Allocator());
91739173
template<class InputIterator>
91749174
constexpr vector(InputIterator first, InputIterator last, const Allocator& = Allocator());
91759175
template<@\exposconcept{container-compatible-range}@<bool> R>
91769176
constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator());
91779177
constexpr vector(const vector& x);
9178-
constexpr vector(vector&& x);
9178+
constexpr vector(vector&& x) noexcept;
91799179
constexpr vector(const vector&, const type_identity_t<Allocator>&);
91809180
constexpr vector(vector&&, const type_identity_t<Allocator>&);
91819181
constexpr vector(initializer_list<bool>, const Allocator& = Allocator());
91829182
constexpr ~vector();
91839183
constexpr vector& operator=(const vector& x);
9184-
constexpr vector& operator=(vector&& x);
9184+
constexpr vector& operator=(vector&& x)
9185+
noexcept(allocator_traits<Allocator>::propagate_on_container_move_assignment::value ||
9186+
allocator_traits<Allocator>::is_always_equal::value);
91859187
constexpr vector& operator=(initializer_list<bool>);
91869188
template<class InputIterator>
91879189
constexpr void assign(InputIterator first, InputIterator last);
@@ -9243,7 +9245,9 @@
92439245

92449246
constexpr iterator erase(const_iterator position);
92459247
constexpr iterator erase(const_iterator first, const_iterator last);
9246-
constexpr void swap(vector&);
9248+
constexpr void swap(vector&)
9249+
noexcept(allocator_traits<Allocator>::propagate_on_container_swap::value ||
9250+
allocator_traits<Allocator>::is_always_equal::value);
92479251
static constexpr void swap(reference x, reference y) noexcept;
92489252
constexpr void flip() noexcept; // flips all bits
92499253
constexpr void clear() noexcept;

0 commit comments

Comments
 (0)