From 8883e36c6e0345629ab3a704818d7e11d3e81f3b Mon Sep 17 00:00:00 2001 From: dota17 Date: Fri, 22 May 2020 18:50:54 +0800 Subject: [PATCH] update the docs/Breaking-Changes.md --- docs/Breaking-Changes.md | 1 + include/yaml-cpp/node/convert.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Breaking-Changes.md b/docs/Breaking-Changes.md index 3b23127..959adea 100644 --- a/docs/Breaking-Changes.md +++ b/docs/Breaking-Changes.md @@ -5,6 +5,7 @@ ## HEAD ## * Throws an exception when trying to parse a negative number as an unsigned integer. + * Supports the `as`/`as`, which throws an exception when the value exceeds the range of `int8_t`/`uint8_t`. ## 0.6.0 ## diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index 3af1ab5..532d349 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -130,7 +130,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) { } template -typename std::enable_if::value || +typename std::enable_if::value || std::is_same::value), bool>::type ConvertStreamTo(std::stringstream& stream, T& rhs) { if ((stream >> std::noskipws >> rhs) && (stream >> std::ws).eof()) {