diff --git a/include/yaml-cpp/emitter.h b/include/yaml-cpp/emitter.h index 5bffc25..ef92cc4 100644 --- a/include/yaml-cpp/emitter.h +++ b/include/yaml-cpp/emitter.h @@ -162,12 +162,12 @@ inline Emitter& Emitter::WriteStreamable(T value) { template <> inline void Emitter::SetStreamablePrecision(std::stringstream& stream) { - stream.precision(GetFloatPrecision()); + stream.precision(static_cast(GetFloatPrecision())); } template <> inline void Emitter::SetStreamablePrecision(std::stringstream& stream) { - stream.precision(GetDoublePrecision()); + stream.precision(static_cast(GetDoublePrecision())); } // overloads of insertion diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h index 285fc33..5d44c05 100644 --- a/include/yaml-cpp/exceptions.h +++ b/include/yaml-cpp/exceptions.h @@ -112,7 +112,9 @@ class Exception : public std::runtime_error { public: Exception(const Mark& mark_, const std::string& msg_) : std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {} - virtual ~Exception() throw() {} + virtual ~Exception() noexcept {} + + Exception(const Exception&) = default; Mark mark; std::string msg; @@ -163,7 +165,7 @@ class TypedKeyNotFound : public KeyNotFound { public: TypedKeyNotFound(const Mark& mark_, const T& key_) : KeyNotFound(mark_, key_), key(key_) {} - virtual ~TypedKeyNotFound() throw() {} + virtual ~TypedKeyNotFound() noexcept {} T key; }; diff --git a/include/yaml-cpp/node/node.h b/include/yaml-cpp/node/node.h index 1207f6e..1ded7d2 100644 --- a/include/yaml-cpp/node/node.h +++ b/include/yaml-cpp/node/node.h @@ -58,7 +58,7 @@ class YAML_CPP_API Node { bool IsMap() const { return Type() == NodeType::Map; } // bool conversions - YAML_CPP_OPERATOR_BOOL(); + YAML_CPP_OPERATOR_BOOL() bool operator!() const { return !IsDefined(); } // access