• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_iterator cend() const;
13 
14 #include <string>
15 #include <cassert>
16 
17 #include "min_allocator.h"
18 
19 template <class S>
20 void
test(const S & s)21 test(const S& s)
22 {
23     typename S::const_iterator ce = s.cend();
24     assert(ce == s.end());
25 }
26 
main()27 int main()
28 {
29     {
30     typedef std::string S;
31     test(S());
32     test(S("123"));
33     }
34 #if TEST_STD_VER >= 11
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