diff options
| -rw-r--r-- | libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp index 0dc242ac9fd..eda148cf6ca 100644 --- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp +++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp @@ -62,5 +62,16 @@ int main() assert(p->get_int() == 67); assert(p->get_char() == 'e'); } +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES + nc = new_count; + { + char c = 'e'; + std::shared_ptr<A> p = std::make_shared<A>(67, c); + assert(new_count == nc+1); + assert(A::count == 1); + assert(p->get_int() == 67); + assert(p->get_char() == 'e'); + } +#endif assert(A::count == 0); } |

