mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Refactored the operator >> and Node::Read default functions, as well as the conversion functions, to more easily read new types as keys (this uncovered an error, in example 2.11 of the spec)
This commit is contained in:
@@ -49,8 +49,7 @@ namespace
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
template <>
|
||||
bool Converter<bool>::Convert(const std::string& input, bool& b)
|
||||
bool Convert(const std::string& input, bool& b)
|
||||
{
|
||||
// we can't use iostream bool extraction operators as they don't
|
||||
// recognize all possible values in the table below (taken from
|
||||
@@ -82,8 +81,7 @@ namespace YAML
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool Converter<_Null>::Convert(const std::string& input, _Null& /*output*/)
|
||||
bool Convert(const std::string& input, _Null& /*output*/)
|
||||
{
|
||||
return input.empty() || input == "~" || input == "null" || input == "Null" || input == "NULL";
|
||||
}
|
||||
|
Reference in New Issue
Block a user