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 // class match_results<BidirectionalIterator, Allocator>
13 // const_iterator cbegin() const;
14 // const_iterator cend() const;
19 #include "test_macros.h"
24 std::match_results
<const char*> m
;
25 const char s
[] = "abcdefghijk";
26 assert(std::regex_search(s
, m
, std::regex("cd((e)fg)hi")));
28 std::match_results
<const char*>::const_iterator i
= m
.cbegin();
29 std::match_results
<const char*>::const_iterator e
= m
.cend();
31 assert(static_cast<std::size_t>(e
- i
) == m
.size());
32 for (int j
= 0; i
!= e
; ++i
, ++j
)