Prevent __uses_alloc from holding dangling references
authorJonathan Wakely <jwakely@redhat.com>
Thu, 6 Jul 2017 11:54:10 +0000 (12:54 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 6 Jul 2017 11:54:10 +0000 (12:54 +0100)
commit318c48e30402eadaeee86dee9486733678c5fef4
treee5525d528a0fa911bbca4a5b836c9fd1a0a559c1
parent68d872d728caced187cfef59c8a5a04af34b2c64
Prevent __uses_alloc from holding dangling references

* include/bits/uses_allocator.h (__use_alloc(const _Alloc&&)): Add
deleted overload to prevent dangling references to rvalues.
* include/experimental/memory_resource
(polymorphic_allocator::construct): Do not call __use_alloc with
rvalue arguments.

From-SVN: r250019
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/uses_allocator.h
libstdc++-v3/include/experimental/memory_resource