PR libstdc++/83427 detect weak result type from noexcept functions
commitf07a7cbfc92ff5401a296d4661f4555139ed8eb8
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 17:18:22 +0000 (14 17:18 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 17:18:22 +0000 (14 17:18 +0000)
tree92c8339eeda08ec4c2912c57f9aeb729e4d729e7
parent824a2485e2c232a2416eb850aabce3c1028e05fc
PR libstdc++/83427 detect weak result type from noexcept functions

PR libstdc++/83427
* include/bits/refwrap.h (_Maybe_unary_or_binary_function): Move here
from <bits/std_function.h>.
(_Mem_fn_traits_base, _Mem_fn_traits): Move here, from <functional>.
(_Weak_result_type_impl, _Reference_wrapper_base): Deduce noexcept
for function types. Remove partial specializations for member
functions.
(_Weak_result_type_impl): Remove unused partial specializations for
non-referenceable function types and for references to functions.
(_Weak_result_type_memfun, _Reference_wrapper_base_memfun): New
helpers to handle member functions via _Mem_fn_traits.
(_Weak_result_type, reference_wrapper): Derive from new helpers.
* include/bits/std_function.h (_Maybe_unary_or_binary_function): Move
to <bits/refwrap.h>.
* include/std/functional (_Pack, _AllConvertible, _NotSame): Remove.
(_Mem_fn_traits_base, _Mem_fn_traits): Move to <bits/refwrap.h>.
* testsuite/20_util/bind/83427.cc: New test.
* testsuite/20_util/bind/refqual.cc: Add noexcept to functions and
check for weak result types.
* testsuite/20_util/reference_wrapper/83427.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255651 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/refwrap.h
libstdc++-v3/include/bits/std_function.h
libstdc++-v3/include/std/functional
libstdc++-v3/testsuite/20_util/bind/83427.cc [copied from libstdc++-v3/testsuite/20_util/bind/refqual.cc with 63% similarity]
libstdc++-v3/testsuite/20_util/bind/refqual.cc
libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc [new file with mode: 0644]