xref: /llvm-project/libcxx/src/vector.cpp (revision 748023dc3210533df2c1c6efc8af1b5954493701)
1eb8650a7SLouis Dionne //===----------------------------------------------------------------------===//
26af1b7d9SEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66af1b7d9SEric Fiselier //
76af1b7d9SEric Fiselier //===----------------------------------------------------------------------===//
86af1b7d9SEric Fiselier 
9bbb0f2c7SArthur O'Dwyer #include <vector>
106af1b7d9SEric Fiselier 
116af1b7d9SEric Fiselier _LIBCPP_BEGIN_NAMESPACE_STD
126af1b7d9SEric Fiselier 
13b82da8b5SNikolas Klauser #ifndef _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
14b82da8b5SNikolas Klauser 
15b82da8b5SNikolas Klauser template <bool>
16b82da8b5SNikolas Klauser struct __vector_base_common;
17b82da8b5SNikolas Klauser 
18b82da8b5SNikolas Klauser template <>
19b82da8b5SNikolas Klauser struct __vector_base_common<true> {
20*748023dcSNikolas Klauser   [[noreturn]] _LIBCPP_EXPORTED_FROM_ABI void __throw_length_error() const;
21*748023dcSNikolas Klauser   [[noreturn]] _LIBCPP_EXPORTED_FROM_ABI void __throw_out_of_range() const;
22b82da8b5SNikolas Klauser };
23b82da8b5SNikolas Klauser 
249783f28cSLouis Dionne void __vector_base_common<true>::__throw_length_error() const { std::__throw_length_error("vector"); }
2584b0b52bSLouis Dionne 
269783f28cSLouis Dionne void __vector_base_common<true>::__throw_out_of_range() const { std::__throw_out_of_range("vector"); }
276af1b7d9SEric Fiselier 
28b82da8b5SNikolas Klauser #endif // _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
29b82da8b5SNikolas Klauser 
306af1b7d9SEric Fiselier _LIBCPP_END_NAMESPACE_STD
31