1 // Vector implementation (out of line) -*- C++ -*-
3 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 // 2011 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // Under Section 7 of GPL version 3, you are granted additional
18 // permissions described in the GCC Runtime Library Exception, version
19 // 3.1, as published by the Free Software Foundation.
21 // You should have received a copy of the GNU General Public License and
22 // a copy of the GCC Runtime Library Exception along with this program;
23 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 // <http://www.gnu.org/licenses/>.
29 * Hewlett-Packard Company
31 * Permission to use, copy, modify, distribute and sell this software
32 * and its documentation for any purpose is hereby granted without fee,
33 * provided that the above copyright notice appear in all copies and
34 * that both that copyright notice and this permission notice appear
35 * in supporting documentation. Hewlett-Packard Company makes no
36 * representations about the suitability of this software for any
37 * purpose. It is provided "as is" without express or implied warranty.
41 * Silicon Graphics Computer Systems, Inc.
43 * Permission to use, copy, modify, distribute and sell this software
44 * and its documentation for any purpose is hereby granted without fee,
45 * provided that the above copyright notice appear in all copies and
46 * that both that copyright notice and this permission notice appear
47 * in supporting documentation. Silicon Graphics makes no
48 * representations about the suitability of this software for any
49 * purpose. It is provided "as is" without express or implied warranty.
52 /** @file bits/vector.tcc
53 * This is an internal header file, included by other library headers.
54 * Do not attempt to use it directly. @headername{vector}
60 namespace std _GLIBCXX_VISIBILITY(default)
62 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
64 template<typename _Tp, typename _Alloc>
67 reserve(size_type __n)
69 if (__n > this->max_size())
70 __throw_length_error(__N("vector::reserve"));
71 if (this->capacity() < __n)
73 const size_type __old_size = size();
74 pointer __tmp = _M_allocate_and_copy(__n,
75 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start),
76 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish));
77 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
78 _M_get_Tp_allocator());
79 _M_deallocate(this->_M_impl._M_start,
80 this->_M_impl._M_end_of_storage
81 - this->_M_impl._M_start);
82 this->_M_impl._M_start = __tmp;
83 this->_M_impl._M_finish = __tmp + __old_size;
84 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
88 #ifdef __GXX_EXPERIMENTAL_CXX0X__
89 template<typename _Tp, typename _Alloc>
90 template<typename... _Args>
93 emplace_back(_Args&&... __args)
95 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
97 this->_M_impl.construct(this->_M_impl._M_finish,
98 std::forward<_Args>(__args)...);
99 ++this->_M_impl._M_finish;
102 _M_insert_aux(end(), std::forward<_Args>(__args)...);
106 template<typename _Tp, typename _Alloc>
107 typename vector<_Tp, _Alloc>::iterator
108 vector<_Tp, _Alloc>::
109 insert(iterator __position, const value_type& __x)
111 const size_type __n = __position - begin();
112 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
113 && __position == end())
115 this->_M_impl.construct(this->_M_impl._M_finish, __x);
116 ++this->_M_impl._M_finish;
120 #ifdef __GXX_EXPERIMENTAL_CXX0X__
121 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
124 _M_insert_aux(__position, std::move(__x_copy));
128 _M_insert_aux(__position, __x);
130 return iterator(this->_M_impl._M_start + __n);
133 template<typename _Tp, typename _Alloc>
134 typename vector<_Tp, _Alloc>::iterator
135 vector<_Tp, _Alloc>::
136 erase(iterator __position)
138 if (__position + 1 != end())
139 _GLIBCXX_MOVE3(__position + 1, end(), __position);
140 --this->_M_impl._M_finish;
141 this->_M_impl.destroy(this->_M_impl._M_finish);
145 template<typename _Tp, typename _Alloc>
146 typename vector<_Tp, _Alloc>::iterator
147 vector<_Tp, _Alloc>::
148 erase(iterator __first, iterator __last)
151 _GLIBCXX_MOVE3(__last, end(), __first);
152 _M_erase_at_end(__first.base() + (end() - __last));
156 template<typename _Tp, typename _Alloc>
158 vector<_Tp, _Alloc>::
159 operator=(const vector<_Tp, _Alloc>& __x)
163 const size_type __xlen = __x.size();
164 if (__xlen > capacity())
166 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
168 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
169 _M_get_Tp_allocator());
170 _M_deallocate(this->_M_impl._M_start,
171 this->_M_impl._M_end_of_storage
172 - this->_M_impl._M_start);
173 this->_M_impl._M_start = __tmp;
174 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
176 else if (size() >= __xlen)
178 std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
179 end(), _M_get_Tp_allocator());
183 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
184 this->_M_impl._M_start);
185 std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
186 __x._M_impl._M_finish,
187 this->_M_impl._M_finish,
188 _M_get_Tp_allocator());
190 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
195 template<typename _Tp, typename _Alloc>
197 vector<_Tp, _Alloc>::
198 _M_fill_assign(size_t __n, const value_type& __val)
200 if (__n > capacity())
202 vector __tmp(__n, __val, _M_get_Tp_allocator());
205 else if (__n > size())
207 std::fill(begin(), end(), __val);
208 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
210 _M_get_Tp_allocator());
211 this->_M_impl._M_finish += __n - size();
214 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
217 template<typename _Tp, typename _Alloc>
218 template<typename _InputIterator>
220 vector<_Tp, _Alloc>::
221 _M_assign_aux(_InputIterator __first, _InputIterator __last,
222 std::input_iterator_tag)
224 pointer __cur(this->_M_impl._M_start);
225 for (; __first != __last && __cur != this->_M_impl._M_finish;
228 if (__first == __last)
229 _M_erase_at_end(__cur);
231 insert(end(), __first, __last);
234 template<typename _Tp, typename _Alloc>
235 template<typename _ForwardIterator>
237 vector<_Tp, _Alloc>::
238 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
239 std::forward_iterator_tag)
241 const size_type __len = std::distance(__first, __last);
243 if (__len > capacity())
245 pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
246 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
247 _M_get_Tp_allocator());
248 _M_deallocate(this->_M_impl._M_start,
249 this->_M_impl._M_end_of_storage
250 - this->_M_impl._M_start);
251 this->_M_impl._M_start = __tmp;
252 this->_M_impl._M_finish = this->_M_impl._M_start + __len;
253 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
255 else if (size() >= __len)
256 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
259 _ForwardIterator __mid = __first;
260 std::advance(__mid, size());
261 std::copy(__first, __mid, this->_M_impl._M_start);
262 this->_M_impl._M_finish =
263 std::__uninitialized_copy_a(__mid, __last,
264 this->_M_impl._M_finish,
265 _M_get_Tp_allocator());
269 #ifdef __GXX_EXPERIMENTAL_CXX0X__
270 template<typename _Tp, typename _Alloc>
271 template<typename... _Args>
272 typename vector<_Tp, _Alloc>::iterator
273 vector<_Tp, _Alloc>::
274 emplace(iterator __position, _Args&&... __args)
276 const size_type __n = __position - begin();
277 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
278 && __position == end())
280 this->_M_impl.construct(this->_M_impl._M_finish,
281 std::forward<_Args>(__args)...);
282 ++this->_M_impl._M_finish;
285 _M_insert_aux(__position, std::forward<_Args>(__args)...);
286 return iterator(this->_M_impl._M_start + __n);
289 template<typename _Tp, typename _Alloc>
290 template<typename... _Args>
292 vector<_Tp, _Alloc>::
293 _M_insert_aux(iterator __position, _Args&&... __args)
295 template<typename _Tp, typename _Alloc>
297 vector<_Tp, _Alloc>::
298 _M_insert_aux(iterator __position, const _Tp& __x)
301 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
303 this->_M_impl.construct(this->_M_impl._M_finish,
304 _GLIBCXX_MOVE(*(this->_M_impl._M_finish
306 ++this->_M_impl._M_finish;
307 #ifndef __GXX_EXPERIMENTAL_CXX0X__
310 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
311 this->_M_impl._M_finish - 2,
312 this->_M_impl._M_finish - 1);
313 #ifndef __GXX_EXPERIMENTAL_CXX0X__
314 *__position = __x_copy;
316 *__position = _Tp(std::forward<_Args>(__args)...);
321 const size_type __len =
322 _M_check_len(size_type(1), "vector::_M_insert_aux");
323 const size_type __elems_before = __position - begin();
324 pointer __new_start(this->_M_allocate(__len));
325 pointer __new_finish(__new_start);
328 // The order of the three operations is dictated by the C++0x
329 // case, where the moves could alter a new element belonging
330 // to the existing vector. This is an issue only for callers
331 // taking the element by const lvalue ref (see 23.1/13).
332 this->_M_impl.construct(__new_start + __elems_before,
333 #ifdef __GXX_EXPERIMENTAL_CXX0X__
334 std::forward<_Args>(__args)...);
341 = std::__uninitialized_move_if_noexcept_a
342 (this->_M_impl._M_start, __position.base(),
343 __new_start, _M_get_Tp_allocator());
348 = std::__uninitialized_move_if_noexcept_a
349 (__position.base(), this->_M_impl._M_finish,
350 __new_finish, _M_get_Tp_allocator());
355 this->_M_impl.destroy(__new_start + __elems_before);
357 std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
358 _M_deallocate(__new_start, __len);
359 __throw_exception_again;
361 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
362 _M_get_Tp_allocator());
363 _M_deallocate(this->_M_impl._M_start,
364 this->_M_impl._M_end_of_storage
365 - this->_M_impl._M_start);
366 this->_M_impl._M_start = __new_start;
367 this->_M_impl._M_finish = __new_finish;
368 this->_M_impl._M_end_of_storage = __new_start + __len;
372 template<typename _Tp, typename _Alloc>
374 vector<_Tp, _Alloc>::
375 _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
379 if (size_type(this->_M_impl._M_end_of_storage
380 - this->_M_impl._M_finish) >= __n)
382 value_type __x_copy = __x;
383 const size_type __elems_after = end() - __position;
384 pointer __old_finish(this->_M_impl._M_finish);
385 if (__elems_after > __n)
387 std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
388 this->_M_impl._M_finish,
389 this->_M_impl._M_finish,
390 _M_get_Tp_allocator());
391 this->_M_impl._M_finish += __n;
392 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
393 __old_finish - __n, __old_finish);
394 std::fill(__position.base(), __position.base() + __n,
399 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
402 _M_get_Tp_allocator());
403 this->_M_impl._M_finish += __n - __elems_after;
404 std::__uninitialized_move_a(__position.base(), __old_finish,
405 this->_M_impl._M_finish,
406 _M_get_Tp_allocator());
407 this->_M_impl._M_finish += __elems_after;
408 std::fill(__position.base(), __old_finish, __x_copy);
413 const size_type __len =
414 _M_check_len(__n, "vector::_M_fill_insert");
415 const size_type __elems_before = __position - begin();
416 pointer __new_start(this->_M_allocate(__len));
417 pointer __new_finish(__new_start);
420 // See _M_insert_aux above.
421 std::__uninitialized_fill_n_a(__new_start + __elems_before,
423 _M_get_Tp_allocator());
427 = std::__uninitialized_move_if_noexcept_a
428 (this->_M_impl._M_start, __position.base(),
429 __new_start, _M_get_Tp_allocator());
434 = std::__uninitialized_move_if_noexcept_a
435 (__position.base(), this->_M_impl._M_finish,
436 __new_finish, _M_get_Tp_allocator());
441 std::_Destroy(__new_start + __elems_before,
442 __new_start + __elems_before + __n,
443 _M_get_Tp_allocator());
445 std::_Destroy(__new_start, __new_finish,
446 _M_get_Tp_allocator());
447 _M_deallocate(__new_start, __len);
448 __throw_exception_again;
450 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
451 _M_get_Tp_allocator());
452 _M_deallocate(this->_M_impl._M_start,
453 this->_M_impl._M_end_of_storage
454 - this->_M_impl._M_start);
455 this->_M_impl._M_start = __new_start;
456 this->_M_impl._M_finish = __new_finish;
457 this->_M_impl._M_end_of_storage = __new_start + __len;
462 #ifdef __GXX_EXPERIMENTAL_CXX0X__
463 template<typename _Tp, typename _Alloc>
465 vector<_Tp, _Alloc>::
466 _M_default_append(size_type __n)
470 if (size_type(this->_M_impl._M_end_of_storage
471 - this->_M_impl._M_finish) >= __n)
473 std::__uninitialized_default_n_a(this->_M_impl._M_finish,
474 __n, _M_get_Tp_allocator());
475 this->_M_impl._M_finish += __n;
479 const size_type __len =
480 _M_check_len(__n, "vector::_M_default_append");
481 const size_type __old_size = this->size();
482 pointer __new_start(this->_M_allocate(__len));
483 pointer __new_finish(__new_start);
487 = std::__uninitialized_move_if_noexcept_a
488 (this->_M_impl._M_start, this->_M_impl._M_finish,
489 __new_start, _M_get_Tp_allocator());
490 std::__uninitialized_default_n_a(__new_finish, __n,
491 _M_get_Tp_allocator());
496 std::_Destroy(__new_start, __new_finish,
497 _M_get_Tp_allocator());
498 _M_deallocate(__new_start, __len);
499 __throw_exception_again;
501 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
502 _M_get_Tp_allocator());
503 _M_deallocate(this->_M_impl._M_start,
504 this->_M_impl._M_end_of_storage
505 - this->_M_impl._M_start);
506 this->_M_impl._M_start = __new_start;
507 this->_M_impl._M_finish = __new_finish;
508 this->_M_impl._M_end_of_storage = __new_start + __len;
513 template<typename _Tp, typename _Alloc>
515 vector<_Tp, _Alloc>::
518 if (capacity() == size())
520 return std::__shrink_to_fit_aux<vector>::_S_do_it(*this);
524 template<typename _Tp, typename _Alloc>
525 template<typename _InputIterator>
527 vector<_Tp, _Alloc>::
528 _M_range_insert(iterator __pos, _InputIterator __first,
529 _InputIterator __last, std::input_iterator_tag)
531 for (; __first != __last; ++__first)
533 __pos = insert(__pos, *__first);
538 template<typename _Tp, typename _Alloc>
539 template<typename _ForwardIterator>
541 vector<_Tp, _Alloc>::
542 _M_range_insert(iterator __position, _ForwardIterator __first,
543 _ForwardIterator __last, std::forward_iterator_tag)
545 if (__first != __last)
547 const size_type __n = std::distance(__first, __last);
548 if (size_type(this->_M_impl._M_end_of_storage
549 - this->_M_impl._M_finish) >= __n)
551 const size_type __elems_after = end() - __position;
552 pointer __old_finish(this->_M_impl._M_finish);
553 if (__elems_after > __n)
555 std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
556 this->_M_impl._M_finish,
557 this->_M_impl._M_finish,
558 _M_get_Tp_allocator());
559 this->_M_impl._M_finish += __n;
560 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
561 __old_finish - __n, __old_finish);
562 std::copy(__first, __last, __position);
566 _ForwardIterator __mid = __first;
567 std::advance(__mid, __elems_after);
568 std::__uninitialized_copy_a(__mid, __last,
569 this->_M_impl._M_finish,
570 _M_get_Tp_allocator());
571 this->_M_impl._M_finish += __n - __elems_after;
572 std::__uninitialized_move_a(__position.base(),
574 this->_M_impl._M_finish,
575 _M_get_Tp_allocator());
576 this->_M_impl._M_finish += __elems_after;
577 std::copy(__first, __mid, __position);
582 const size_type __len =
583 _M_check_len(__n, "vector::_M_range_insert");
584 pointer __new_start(this->_M_allocate(__len));
585 pointer __new_finish(__new_start);
589 = std::__uninitialized_move_if_noexcept_a
590 (this->_M_impl._M_start, __position.base(),
591 __new_start, _M_get_Tp_allocator());
593 = std::__uninitialized_copy_a(__first, __last,
595 _M_get_Tp_allocator());
597 = std::__uninitialized_move_if_noexcept_a
598 (__position.base(), this->_M_impl._M_finish,
599 __new_finish, _M_get_Tp_allocator());
603 std::_Destroy(__new_start, __new_finish,
604 _M_get_Tp_allocator());
605 _M_deallocate(__new_start, __len);
606 __throw_exception_again;
608 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
609 _M_get_Tp_allocator());
610 _M_deallocate(this->_M_impl._M_start,
611 this->_M_impl._M_end_of_storage
612 - this->_M_impl._M_start);
613 this->_M_impl._M_start = __new_start;
614 this->_M_impl._M_finish = __new_finish;
615 this->_M_impl._M_end_of_storage = __new_start + __len;
622 template<typename _Alloc>
624 vector<bool, _Alloc>::
625 _M_reallocate(size_type __n)
627 _Bit_type* __q = this->_M_allocate(__n);
628 this->_M_impl._M_finish = _M_copy_aligned(begin(), end(),
630 this->_M_deallocate();
631 this->_M_impl._M_start = iterator(__q, 0);
632 this->_M_impl._M_end_of_storage = __q + _S_nword(__n);
635 template<typename _Alloc>
637 vector<bool, _Alloc>::
638 _M_fill_insert(iterator __position, size_type __n, bool __x)
642 if (capacity() - size() >= __n)
644 std::copy_backward(__position, end(),
645 this->_M_impl._M_finish + difference_type(__n));
646 std::fill(__position, __position + difference_type(__n), __x);
647 this->_M_impl._M_finish += difference_type(__n);
651 const size_type __len =
652 _M_check_len(__n, "vector<bool>::_M_fill_insert");
653 _Bit_type * __q = this->_M_allocate(__len);
654 iterator __i = _M_copy_aligned(begin(), __position,
656 std::fill(__i, __i + difference_type(__n), __x);
657 this->_M_impl._M_finish = std::copy(__position, end(),
658 __i + difference_type(__n));
659 this->_M_deallocate();
660 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
661 this->_M_impl._M_start = iterator(__q, 0);
665 template<typename _Alloc>
666 template<typename _ForwardIterator>
668 vector<bool, _Alloc>::
669 _M_insert_range(iterator __position, _ForwardIterator __first,
670 _ForwardIterator __last, std::forward_iterator_tag)
672 if (__first != __last)
674 size_type __n = std::distance(__first, __last);
675 if (capacity() - size() >= __n)
677 std::copy_backward(__position, end(),
678 this->_M_impl._M_finish
679 + difference_type(__n));
680 std::copy(__first, __last, __position);
681 this->_M_impl._M_finish += difference_type(__n);
685 const size_type __len =
686 _M_check_len(__n, "vector<bool>::_M_insert_range");
687 _Bit_type * __q = this->_M_allocate(__len);
688 iterator __i = _M_copy_aligned(begin(), __position,
690 __i = std::copy(__first, __last, __i);
691 this->_M_impl._M_finish = std::copy(__position, end(), __i);
692 this->_M_deallocate();
693 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
694 this->_M_impl._M_start = iterator(__q, 0);
699 template<typename _Alloc>
701 vector<bool, _Alloc>::
702 _M_insert_aux(iterator __position, bool __x)
704 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
706 std::copy_backward(__position, this->_M_impl._M_finish,
707 this->_M_impl._M_finish + 1);
709 ++this->_M_impl._M_finish;
713 const size_type __len =
714 _M_check_len(size_type(1), "vector<bool>::_M_insert_aux");
715 _Bit_type * __q = this->_M_allocate(__len);
716 iterator __i = _M_copy_aligned(begin(), __position,
719 this->_M_impl._M_finish = std::copy(__position, end(), __i);
720 this->_M_deallocate();
721 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
722 this->_M_impl._M_start = iterator(__q, 0);
726 #ifdef __GXX_EXPERIMENTAL_CXX0X__
727 template<typename _Alloc>
729 vector<bool, _Alloc>::
732 if (capacity() - size() < int(_S_word_bit))
736 _M_reallocate(size());
744 _GLIBCXX_END_NAMESPACE_CONTAINER
747 #ifdef __GXX_EXPERIMENTAL_CXX0X__
749 namespace std _GLIBCXX_VISIBILITY(default)
751 _GLIBCXX_BEGIN_NAMESPACE_VERSION
753 template<typename _Alloc>
755 hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>::
756 operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const
759 using _GLIBCXX_STD_C::_S_word_bit;
760 using _GLIBCXX_STD_C::_Bit_type;
762 const size_t __words = __b.size() / _S_word_bit;
765 const size_t __clength = __words * sizeof(_Bit_type);
766 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength);
769 const size_t __extrabits = __b.size() % _S_word_bit;
772 _Bit_type __hiword = *__b._M_impl._M_finish._M_p;
773 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits);
775 const size_t __clength
776 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__;
778 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash);
780 __hash = std::_Hash_impl::hash(&__hiword, __clength);
786 _GLIBCXX_END_NAMESPACE_VERSION
789 #endif // __GXX_EXPERIMENTAL_CXX0X__
791 #endif /* _VECTOR_TCC */