diff --git a/README.md b/README.md index 3595974..1dd0eca 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- -**[Try it out on wandbox!](https://wandbox.org/permlink/akDd3tAEwxZtdB2B)** +**[Try it out on wandbox!](https://wandbox.org/permlink/L8MwjzSSC3fXXrMd)** ## Summary diff --git a/include/date/date.h b/include/date/date.h index 6665411..f3cd7de 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -1080,7 +1080,12 @@ class save_ostream public: ~save_ostream() { - if ((this->flags_ & std::ios::unitbuf) && !std::uncaught_exception() && + if ((this->flags_ & std::ios::unitbuf) && +#if __cplusplus >= 201703 + std::uncaught_exceptions() == 0 && +#else + !std::uncaught_exception() && +#endif this->is_.good()) this->is_.rdbuf()->pubsync(); }