Make SettingChange and StreamCharSourcemove constructors and assignment operators noexcept (#808)

The explicitly defaulted or implemented move constructors and assignment
operators are made "noexcept".

Bugfix:
* src/stream.cpp Stream::Stream() char_traits::int_type intro[4] is
  now aggregate-initialized (to zero) to avoid UB.

Minor changes:
* Using std::isinf() and std::signbit() instead of comparing for
  equality with infinity.
* src/streamcharsource.h: Added #include "stream.h".
* src/stream.h: Forward declaring "class StreamCharSource".
* Some implicit casting changed into static_cast's.

Signed-off-by: Ted Lyngmo <ted@lyncon.se>
This commit is contained in:
Ted Lyngmo
2020-02-04 23:58:00 +01:00
committed by GitHub
parent 1928bca4a4
commit 9ab22ef493
6 changed files with 42 additions and 37 deletions

View File

@@ -16,6 +16,9 @@
#include <string>
namespace YAML {
class StreamCharSource;
class Stream {
public:
friend class StreamCharSource;