mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Fixed double -> int conversion (now throws) for old API
This commit is contained in:
@@ -50,9 +50,8 @@ namespace YAML
|
||||
inline bool Convert(const std::string& input, T& output, typename enable_if<is_numeric<T> >::type * = 0) {
|
||||
std::stringstream stream(input);
|
||||
stream.unsetf(std::ios::dec);
|
||||
stream >> output;
|
||||
if(!!stream)
|
||||
return true;
|
||||
if((stream >> output) && (stream >> std::ws).eof())
|
||||
return true;
|
||||
|
||||
if(std::numeric_limits<T>::has_infinity) {
|
||||
if(IsInfinity(input)) {
|
||||
|
Reference in New Issue
Block a user