PR72792 PR72793 relax requirements on rebind members
commitee35af1bf5766ccf442e94b086a71bc5096a1f3f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jan 2017 02:36:16 +0000 (20 02:36 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jan 2017 02:36:16 +0000 (20 02:36 +0000)
treea8129bd7cd698ffbc306fef0a1ba2f58053e5eab
parent478f6e4f6c9be66fdda3254cf7142aeb62327d9d
PR72792 PR72793 relax requirements on rebind members

PR libstdc++/72792
PR libstdc++/72793
* include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
Replace with class template using void_t.
(__alloc_rebind): Define in terms of
__allocator_traits_base::__rebind.
(allocator_traits): Remove unconditional static_assert for
rebind_alloc.
* include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
(pointer_traits::__rebind): Replace with class template using void_t.
(pointer_traits::rebind): Define in terms of __rebind.
(pointer_traits): Remove unconditional static_assert for rebind.
* testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
* testsuite/20_util/pointer_traits/rebind.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244680 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/alloc_traits.h
libstdc++-v3/include/bits/ptr_traits.h
libstdc++-v3/testsuite/20_util/allocator_traits/members/rebind_alloc.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/pointer_traits/rebind.cc [new file with mode: 0644]