diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-11-17 19:05:50 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-11-17 19:05:50 +0000 |
commit | 278ddec22c8b95d9849fb74450b7f9f18c80421c (patch) | |
tree | d2855d30aae168dc8a74a93208a541e0c461182a /libcxx/test/utilities/memory | |
parent | 6e0566c6d9a8e4d385e55af31072f192fa6826d4 (diff) | |
download | bcm5719-llvm-278ddec22c8b95d9849fb74450b7f9f18c80421c.tar.gz bcm5719-llvm-278ddec22c8b95d9849fb74450b7f9f18c80421c.zip |
Implement LWG2400 - 'shared_ptr's get_deleter() should use addressof()', and add tests. Mark LWG2400 and LWG2404 as complete
llvm-svn: 222161
Diffstat (limited to 'libcxx/test/utilities/memory')
-rw-r--r-- | libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h index 7af7468807e..0263061b3a8 100644 --- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h +++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h @@ -19,6 +19,12 @@ #include <type_traits> #include <cassert> +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION { assert(false); } +#endif + struct test_deleter_base { static int count; @@ -46,6 +52,8 @@ public: void set_state(int i) {state_ = i;} void operator()(T* p) {assert(state_ >= 0); ++dealloc_count; delete p;} + + test_deleter* operator&() const DELETE_FUNCTION; }; template <class T> |