diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-01 11:02:18 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-01 11:02:18 +0000 |
commit | cb554642d487ebda736a0da5d30bcf3879a6c893 (patch) | |
tree | af32cf5747c1598f2af38a6a761b49e9a5533253 /libstdc++-v3/include/std | |
parent | 25b6d1debcd41eb36fc757b05c197faa147bfbfe (diff) | |
download | gcc-cb554642d487ebda736a0da5d30bcf3879a6c893.tar.gz |
* include/std/memory (pointer_safety, declare_reachable,
undeclare_reachable, declare_no_pointers, undeclare_no_pointers,
get_pointer_safety): Define.
* testsuite/20_util/pointer_safety/1.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222674 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/memory | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory index 4257394a0eb..3ed53b83e9e 100644 --- a/libstdc++-v3/include/std/memory +++ b/libstdc++-v3/include/std/memory @@ -126,6 +126,26 @@ align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept } } +// 20.7.4 [util.dynamic.safety], pointer safety + +enum class pointer_safety { relaxed, preferred, strict }; + +inline void +declare_reachable(void*) { } + +template <class T> + inline T* + undeclare_reachable(T* __p) { return __p; } + +inline void +declare_no_pointers(char*, size_t) { } + +inline void +undeclare_no_pointers(char*, size_t) { } + +inline pointer_safety +get_pointer_safety() noexcept { return pointer_safety::relaxed; } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // _GLIBCXX_USE_C99_STDINT_TR1 |