| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| // const_reference at(size_type pos) const; |
| // reference at(size_type pos); |
| #include "min_allocator.h" |
| test(S s, typename S::size_type pos) |
| assert(s.at(pos) == s[pos]); |
| assert(cs.at(pos) == cs[pos]); |
| #ifndef TEST_HAS_NO_EXCEPTIONS |
| TEST_IGNORE_NODISCARD s.at(pos); |
| catch (std::out_of_range&) |
| TEST_IGNORE_NODISCARD cs.at(pos); |
| catch (std::out_of_range&) |
| typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S; |