diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-08-30 08:19:15 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-08-30 08:19:15 +0000 |
commit | 8286ca176ac79a0eb5a3c78ae41f2d0b0b703302 (patch) | |
tree | cc76f0fd4d3fa9f347b86ecd4d3e0740be1fc3ad /test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp | |
parent | b1dfda2098975a86d7999972133bc513c09aa5fc (diff) |
Merging r340823:
------------------------------------------------------------------------
r340823 | marshall | 2018-08-28 15:29:30 +0200 (Tue, 28 Aug 2018) | 1 line
Use addressof instead of operator& in make_shared. Fixes PR38729. As a drive-by, make the same change in raw_storage_iterator (twice).
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_70@341034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp')
-rw-r--r-- | test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp index f8f73f771..88e691952 100644 --- a/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp +++ b/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp @@ -19,6 +19,12 @@ #include "test_macros.h" #include "count_new.hpp" +#if TEST_STD_VER >= 11 +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION +#endif + struct A { static int count; @@ -31,6 +37,9 @@ struct A int get_int() const {return int_;} char get_char() const {return char_;} + + A* operator& () DELETE_FUNCTION; + private: int int_; char char_; |