Namespaces
Variants
Views
Actions

Talk:cpp/utility/move if noexcept

From cppreference.com

[edit] Simplifying of declarations

I think that the current declaration is overly complex for documentation purposes. Maybe we could replace the conditional in the declaration with a short,meaningful comment and place full declaration somewhere in the description below? The same could be done in all pages containing declarations with very long typenames. --P12 19:03, 26 August 2013 (PDT)

We could do what the standard does in several places, replace the type with /* see below */ and explain in the text. --Cubbi 19:24, 26 August 2013 (PDT)

[edit] noexcept used for throwing constructor

Constructors with std::cout are marked as noexcept while std::basic_ostream::operator<< can throw an exception: If an exception was thrown while extracting, sets failbit and, if failbit is set in exceptions(), rethrows the exception [1].

Should I add try-catch to the example? --Chulup (talk) 17:01, 4 August 2016 (PDT)

std::cout.exceptions() aren't set in the example. But even if they were, it wouldn't change what it's demonstrating. --Cubbi (talk) 17:47, 4 August 2016 (PDT)

[edit] Readability of note

The note shows the use of move_if_noexcept in implementing vector; will I add a short example to explain this more readably?--LittleFlower (talk) 17:33, 27 January 2018 (PST)