Add deduction guides for C++17 (P0433R2, partial)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Mar 2017 15:58:35 +0000 (15:58 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 22 Mar 2017 15:58:35 +0000 (15:58 +0000)
commitaf181c91a9f33ecf355065bcfbfce66c9fb1e111
treef68fdc2fff16e5983b80b5ad47b59ae9f3639c9c
parent918b6c9ec22543ced2487fd8780049f595a94b38
Add deduction guides for C++17 (P0433R2, partial)

* include/bits/shared_ptr.h (shared_ptr, weak_ptr): Add deduction
guides for C++17.
* include/bits/std_function.h (function): Likewise.
* include/bits/stl_pair.h (pair): Likewise.
* include/debug/array (__gnu_debug::array): Likewise.
* include/std/array (array): Likewise.
* include/std/functional (make_default_searcher)
(make_boyer_moore_searcher, make_boyer_moore_horspool_searcher):
Remove generator functions.
* include/std/tuple (tuple): Add deduction guides.
* include/std/valarray (valarray): Likewise.
* testsuite/20_util/function_objects/searchers.cc: Adjust to use
class template argument deduction instead of generator functions.
* testsuite/20_util/function/cons/deduction.cc: New test.
* testsuite/20_util/optional/cons/deduction_guide.cc: Rename to ...
* testsuite/20_util/optional/cons/deduction.cc: ... here.
* testsuite/20_util/pair/cons/deduction.cc: New test.
* testsuite/20_util/shared_ptr/cons/deduction.cc: New test.
* testsuite/20_util/tuple/cons/deduction.cc: New test.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust dg-error.
* testsuite/20_util/unique_ptr/cons/deduction_neg.cc: New test.
* testsuite/20_util/weak_ptr/cons/deduction.cc: New test.
* testsuite/23_containers/array/cons/deduction.cc: New test.
* testsuite/23_containers/array/cons/deduction_neg.cc: New test.
* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
Adjust dg-error.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
Likewise.
* testsuite/26_numerics/valarray/deduction.cc: New test.
* testsuite/30_threads/lock_guard/cons/deduction.cc: New test.
* testsuite/30_threads/scoped_lock/cons/deduction.cc: New test.
* testsuite/30_threads/unique_lock/cons/deduction.cc: New test.

From-SVN: r246389
28 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr.h
libstdc++-v3/include/bits/std_function.h
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/include/debug/array
libstdc++-v3/include/std/array
libstdc++-v3/include/std/functional
libstdc++-v3/include/std/tuple
libstdc++-v3/include/std/valarray
libstdc++-v3/testsuite/20_util/function/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/searchers.cc
libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/optional/cons/deduction_guide.cc [deleted file]
libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/shared_ptr/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/tuple/element_access/get_neg.cc
libstdc++-v3/testsuite/20_util/unique_ptr/cons/deduction_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/weak_ptr/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/array/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/array/cons/deduction_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_debug_neg.cc
libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
libstdc++-v3/testsuite/26_numerics/valarray/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/lock_guard/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/scoped_lock/cons/deduction.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/unique_lock/cons/deduction.cc [new file with mode: 0644]