私はC++ 17がint
を返す、std::uncaught_exceptions()
と、bool
を返す、std::uncaught_exception()
を置換することなぜstd :: uncaught_exceptionをstd :: uncaught_exceptionsに変更するのですか?
http://en.cppreference.com/w/cpp/error/uncaught_exception
にオーバー気づきました。
これを記述する標準のほかはここにある:それは理論的根拠を提供していない
http://isocpp.org/files/papers/n4259.pdf
それは
と言っています[注:uncaught_exceptions()> 0、例外をスローすると はstd :: terminate()(15.5.1)の呼び出しになります。 - 最後のノート]
これはあいまいです。
この変更の理由は何ですか? C++ 17または将来のバージョンの標準で複数のアクティブな例外が可能ですか?
複数のアクティブな例外がすべてのバージョンのC++に存在する可能性があります。 'struct foo {〜foo(){try {新しいintをスローします; }キャッチ(...){}}}; int main(){{foo f;新しいダブルを投げる; } catch(...){}} 'は' f'を破壊するときに2つのアクティブな例外を持ちます。 – Yakk
も参照[このCppCon 2015トーク](https://github.com/CppCon/CppCon2015/blob/master/Presentations/Declarative%20Control%20Flow/Declarative%20Control%20Flow%20-%20Andrei%20Alexandrescu%20-% 20CppCon%202015.pdf)のAndrei Alexandrescu氏による「ScopeGuard」とN4259の情報です。 – Adversus