boostorg / boostorg/property_tree

Getting unsigned of value with negative number should throw a ptree_bad_data

Open
#120 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
65
Forks
97
PR merge metrics
No merged PRs in 30d

Description

As of now ptree will not complain about a negative value and will happily cast it to unsigned type. If that's expected then I think it's highly unintuitive.

```cpp
boost::property_tree::ptree pt;
pt.put("foo", "-1");
std::cout << pt.get("foo") << std::endl; // 4294967295
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.