• 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 // UNSUPPORTED: c++98, c++03
11 
12 // <experimental/memory_resource>
13 
14 // memory_resource::do_allocate(size_t, size_t);          /* protected */
15 // memory_resource::do_deallocate(void*, size_t, size_t); /* protected */
16 // memory_resource::do_is_equal(memory_resource const&);  /* protected */
17 
18 #include <experimental/memory_resource>
19 
20 namespace ex = std::experimental::pmr;
21 
main()22 int main() {
23     ex::memory_resource *m = ex::new_delete_resource();
24     m->do_allocate(0, 0); // expected-error{{'do_allocate' is a protected member}}
25     m->do_deallocate(nullptr, 0, 0); // expected-error{{'do_deallocate' is a protected member}}
26     m->do_is_equal(*m); // expected-error{{'do_is_equal' is a protected member}}
27 }
28