PR72792 PR72793 relax requirements on rebind members
authorJonathan Wakely <jwakely@redhat.com>
Fri, 20 Jan 2017 02:36:16 +0000 (02:36 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 20 Jan 2017 02:36:16 +0000 (02:36 +0000)
commita3a1620bb840d62dbde06ce0290e8e5cfcbbf18b
treea8129bd7cd698ffbc306fef0a1ba2f58053e5eab
parent198766b6488cf0b50b3cff97099fb1c0482a9f3a
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.

From-SVN: r244680
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]