| //===----------------------------------------------------------------------===// |
| // 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 charT* c_str() const; |
| #include "min_allocator.h" |
| typedef typename S::traits_type T; |
| const typename S::value_type* str = s.c_str(); |
| assert(T::compare(str, &s[0], s.size()) == 0); |
| assert(T::eq(str[s.size()], typename S::value_type())); |
| assert(T::eq(str[0], typename S::value_type())); |
| test(S("abcdefghijklmnopqrst")); |
| typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S; |
| test(S("abcdefghijklmnopqrst")); |