Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constructing Node from NaN and Inf emits "nan" and "inf" respectively, breaking the core schema regexes. #507

Closed
leni536 opened this issue Jul 2, 2017 · 3 comments · May be fixed by #509

Comments

@leni536
Copy link

leni536 commented Jul 2, 2017

#include <iostream>
#include <limits>

#include <yaml-cpp/yaml.h>

int main() {
	auto yaml_node = YAML::Node( std::numeric_limits<double>::infinity() );
	std::cout << yaml_node << std::endl;
	return 0;
}

Output: *inf"
Expected output: ".inf", "+.inf", ".Inf" ... see YAML 1.2 Core schema tag resolution.

Notable that yaml-cpp correctly throws YAML::TypedBadConversion if one tries to parse "inf" as double.

@jkhoogland
Copy link
Contributor

is it possible to make the pull request pass the tests and merge it ?

@leni536
Copy link
Author

leni536 commented Oct 23, 2019

I think this specific issue is fixed in e0e01d5.

@leni536 leni536 closed this as completed Oct 23, 2019
@jkhoogland
Copy link
Contributor

ah, great! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants