1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // const_iterator cbegin() const; // constexpr since C++20
16 #include "test_macros.h"
17 #include "min_allocator.h"
20 TEST_CONSTEXPR_CXX20
void test(const S
& s
) {
21 typename
S::const_iterator cb
= s
.cbegin();
25 assert(cb
== s
.begin());
29 TEST_CONSTEXPR_CXX20
void test_string() {
34 TEST_CONSTEXPR_CXX20
bool test() {
35 test_string
<std::string
>();
36 #if TEST_STD_VER >= 11
37 test_string
<std::basic_string
<char, std::char_traits
<char>, min_allocator
<char> > >();
43 int main(int, char**) {
46 static_assert(test());