50#if !defined (_RWSTD_NO_BOOL) && !defined (_RWSTD_NO_VECTOR_BOOL)
52# if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
60void vector<bool, allocator<bool> >::flip ()
62 _USING (
namespace rel_ops);
64 for (iterator __i = begin(); __i !=
end(); __i++)
69void vector<bool, allocator<bool> >::
70swap (vector<
bool, allocator<bool> >::reference __x,
71 vector<
bool, allocator<bool> >::reference __y)
73 const bool __tmp = __x;
79void vector<bool, allocator<bool> >::
80_C_insert (iterator
pos,
bool __x)
82 if (_C_end._C_p != _C_bufend) {
83 _C_copy_backward(
pos, _C_end - 1, _C_end);
89 size_type __len =
size() ? 2 *
size() : _RWSTD_WORD_BIT;
90 unsigned int* __q = _C_bit_alloc(__len);
91 iterator __i = _C_copy(begin(),
pos, iterator(__q, 0));
93 _C_end = _C_copy(
pos,
end(), __i);
94 _C_value_alloc_type (*this).
95 deallocate(_C_begin._C_p,_C_bufend-_C_begin._C_p);
96 _C_bufend = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;
97 _C_begin = iterator(__q, 0);
102void vector<bool, allocator<bool> >::
103insert (iterator
pos, size_type __n,
const bool& __x)
108 if (capacity() -
size() >= __n) {
109 _C_copy_backward(
pos,
end(), _C_end + __n);
110 _C_fill(
pos,
pos + __n, __x);
115 unsigned int* __q = _C_bit_alloc(__len);
116 iterator __i = _C_copy(begin(),
pos, iterator(__q, 0));
117 _C_fill_n(__i, __n, __x);
118 _C_end = _C_copy(
pos,
end(), __i + __n);
119 _C_value_alloc_type (*this).
120 deallocate(_C_begin._C_p,_C_bufend-_C_begin._C_p);
121 _C_bufend = __q + (__n + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;
122 _C_begin = iterator(__q, 0);
127void vector<bool, allocator<bool> >::
128resize (size_type __new_size,
bool __c)
130 if (__new_size >
size())
131 insert(
end(), __new_size -
size(), __c);
132 else if (__new_size <
size())
133 erase(begin() + __new_size,
end());
#define _RWSTD_NAMESPACE(name)