1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <string>
11 
12 // const_reverse_iterator crend() const;
13 
14 #include <string>
15 #include <cassert>
16 
17 #include "../min_allocator.h"
18 
19 template <class S>
20 void
21 test(const S& s)
22 {
23     typename S::const_reverse_iterator ce = s.crend();
24     assert(ce == s.rend());
25 }
26 
27 int main()
28 {
29     {
30     typedef std::string S;
31     test(S());
32     test(S("123"));
33     }
34 #if __cplusplus >= 201103L
35     {
36     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
37     test(S());
38     test(S("123"));
39     }
40 #endif
41 }
42