summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp
blob: 51c132b65fc970e14e0e81c71628afa75d62f14c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <memory>

// void declare_no_pointers(char* p, size_t n);
// void undeclare_no_pointers(char* p, size_t n);

#include <memory>

int main()
{
    char* p = new char[10];
    std::declare_no_pointers(p, 10);
    std::undeclare_no_pointers(p, 10);
    delete [] p;
}
OpenPOWER on IntegriCloud