• 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 // <memory>
11 
12 // pointer_safety get_pointer_safety();
13 
14 // UNSUPPORTED: c++98, c++03
15 
16 #include <memory>
17 #include <cassert>
18 
19 
test_pr26961()20 void test_pr26961() {
21   std::pointer_safety d;
22   d = std::get_pointer_safety();
23   assert(d == std::get_pointer_safety());
24 }
25 
main()26 int main()
27 {
28   {
29     std::pointer_safety r = std::get_pointer_safety();
30     assert(r == std::pointer_safety::relaxed ||
31            r == std::pointer_safety::preferred ||
32            r == std::pointer_safety::strict);
33   }
34   {
35     test_pr26961();
36   }
37 }
38