https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83427

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Dec 14 17:18:22 2017
New Revision: 255651

URL: https://gcc.gnu.org/viewcvs?rev=255651&root=gcc&view=rev
Log:
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.

Added:
    trunk/libstdc++-v3/testsuite/20_util/bind/83427.cc
      - copied, changed from r255632,
trunk/libstdc++-v3/testsuite/20_util/bind/refqual.cc
    trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/83427.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/refwrap.h
    trunk/libstdc++-v3/include/bits/std_function.h
    trunk/libstdc++-v3/include/std/functional
    trunk/libstdc++-v3/testsuite/20_util/bind/refqual.cc

Reply via email to