In N3421 - Creating functional operators more <> , a new specialization for std function objects:
template <> struct plus<void> { template <class T, class U> auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) + std::forward<U>(u)); };
instead
template <> struct plus<void> { template <class T, class U> auto operator()(T&& t, U&& u) const noexcept(noexcept(decltype(std::forward<T>(t) + std::forward<U>(u)) (std::move(std::forward<T>(t) + std::forward<U>(u))))) -> decltype(std::forward<T>(t) + std::forward<U>(u)); };
noexcept
Edit: link to a working draft on github .
Edit 2: link to libC ++ plus specialization .
LWG noexcept. , . , , , , noexcept, , , batshit .
, , . -, noexcept , constexpr. (STL), , .
constexpr
-, LWG -, noexcept.
@DeadMG noexcept , :
. ( ) ., , LWG, , noexcept., move-constructor move-assign - ( , noexcept), noexcept. noexcept ., "C" (, ), .
. ( ) .
, , LWG, , noexcept.
, move-constructor move-assign - ( , noexcept), noexcept. noexcept .
, "C" (, ), .
:
- . : , .- , . undefined , . , , , , , .
- . : , .
- , . undefined , . , , , , , .
, noexcept, noexcept.
, , - <functional> , , . , noexcept(true). :
<functional>
noexcept(true)
.
Source: https://habr.com/ru/post/1526728/More articles:Import and display images one by one - c #Updating an Emberjs application on a route other than the index gives error 404 - javascriptExplain length and clear session storage methods in connection session - javascriptParamiko return code on successful login - pythonvba code to retrieve data from a website - excel-vbaQueue Limitation Over Time - rabbitmqLaravel: Redirect to custom class? - phpBest practice for creating a button in an Android app? - android"Error 87, this option is not recognized in this context", using DISM to enable IIS - iisGet the length of the array that contains element 0 when going to the function - c ++All Articles