1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // class match_results<BidirectionalIterator, Allocator>
14 // const_iterator cbegin() const;
15 // const_iterator cend() const;
20 #include "test_macros.h"
25 std::match_results<const char*> m;
26 const char s[] = "abcdefghijk";
27 assert(std::regex_search(s, m, std::regex("cd((e)fg)hi")));
29 std::match_results<const char*>::const_iterator i = m.cbegin();
30 std::match_results<const char*>::const_iterator e = m.cend();
32 assert(static_cast<std::size_t>(e - i) == m.size());
33 for (int j = 0; i != e; ++i, ++j)