Title
std::invoke should use std::is_nothrow_callable
Status
c++17
Section
[func.invoke]
Submitter
Great Britain

Created on 2016-11-09.00:00:00 last changed 81 months ago

Messages

Date: 2017-03-03.22:14:37

Proposed resolution:

This wording is relative to N4640.

  1. Change [functional.syn], header <functional> synopsis, as indicated:

    // 20.14.4, invoke
    template <class F, class... Args>
      invoke_result_t<F, Args...>result_of_t<F&&(Args&&...)> invoke(F&& f, Args&&... args) noexcept(is_nothrow_invocable_v<F, Args...>);
    
  2. Change [func.invoke] as indicated:

    template <class F, class... Args>
      invoke_result_t<F, Args...>result_of_t<F&&(Args&&...)> invoke(F&& f, Args&&... args) noexcept(is_nothrow_invocable_v<F, Args...>);
Date: 2017-03-03.22:14:37

[ Kona 2017-03-01 ]

Accepted as Immediate to resolve NB comment.

Date: 2017-02-15.00:00:00

[ 2017-02-28, Daniel comments and provides wording ]

The following wording assumes that D0604R0 would be accepted, therefore uses is_nothrow_invocable_v instead of the suggested current trait is_nothrow_callable_v

Date: 2017-02-02.00:41:18

[ Issues Telecon 16-Dec-2016 ]

Priority 3

Date: 2016-11-11.17:53:34

Addresses GB 53

std::invoke can be made trivially noexcept using the new std::is_nothrow_callable trait:

Proposed change:

Add the exception specifier noexcept(is_nothrow_callable_v<F&&(Args&&...)>) to std::invoke.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-03-05 23:46:08adminsetstatus: immediate -> wp
2017-03-03 22:14:37adminsetmessages: + msg9065
2017-03-03 22:14:37adminsetstatus: new -> immediate
2017-02-28 22:14:43adminsetmessages: + msg9017
2017-02-28 22:14:43adminsetmessages: + msg9016
2016-12-16 20:56:38adminsetmessages: + msg8738
2016-11-09 00:00:00admincreate