xref: /freebsd/contrib/llvm-project/libcxx/src/vector.cpp (revision d56accc7c3dcc897489b6a07834763a03b9f3d68)
1349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "vector"
100b57cec5SDimitry Andric 
110b57cec5SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
120b57cec5SDimitry Andric 
13*d56accc7SDimitry Andric #ifndef _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
14*d56accc7SDimitry Andric 
15*d56accc7SDimitry Andric template <bool>
16*d56accc7SDimitry Andric struct __vector_base_common;
17*d56accc7SDimitry Andric 
18*d56accc7SDimitry Andric template <>
19*d56accc7SDimitry Andric struct __vector_base_common<true> {
20*d56accc7SDimitry Andric   _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_length_error() const;
21*d56accc7SDimitry Andric   _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_out_of_range() const;
22*d56accc7SDimitry Andric };
23*d56accc7SDimitry Andric 
24349cc55cSDimitry Andric void __vector_base_common<true>::__throw_length_error() const {
25349cc55cSDimitry Andric   _VSTD::__throw_length_error("vector");
26349cc55cSDimitry Andric }
27349cc55cSDimitry Andric 
28349cc55cSDimitry Andric void __vector_base_common<true>::__throw_out_of_range() const {
29349cc55cSDimitry Andric   _VSTD::__throw_out_of_range("vector");
30349cc55cSDimitry Andric }
310b57cec5SDimitry Andric 
32*d56accc7SDimitry Andric #endif // _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
33*d56accc7SDimitry Andric 
340b57cec5SDimitry Andric _LIBCPP_END_NAMESPACE_STD
35