Opened 10 years ago
Closed 8 years ago
#7615 closed Bugs (fixed)
use property_tree::ptree.get<char>() for MSVC
| Reported by: | Owned by: | Sebastian Redl | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | property_tree |
| Version: | Boost 1.52.0 | Severity: | Problem |
| Keywords: | property_tree | Cc: | shirshov, evgeny, <381677383@…> |
Description
error : not exception "ptree_bad_data" compiler MSVC 10.
ptree pt;
pt.put<int>("a",1000000);
try
{
pt.get<unsigned char>("a");
// !!! bug !!!
BOOST_ERROR("No required exception thrown");
}
catch (boost::property_tree::ptree_bad_data &) { }
catch (...)
{
BOOST_ERROR("Wrong exception type thrown");
}
Attachments (2)
Change History (5)
by , 10 years ago
| Attachment: | stream_translator.hpp.patch added |
|---|
comment:1 by , 10 years ago
| Keywords: | property_tree added; property_three removed |
|---|
edit: Changed misspelled keyword (property_three to property_tree) to possibly help visibility.
I just spend a few hours tracking down this problem in a program I'm working on. Would be great to see this fix included in a release soon. As it is, I can't use uint8_t with property_tree.
comment:2 by , 8 years ago
| Cc: | added; removed |
|---|---|
| Status: | new → assigned |
Fixed on develop in commit #bf1e1b1.
comment:3 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Merged to master in commit 3befb8cbe4.
Note:
See TracTickets
for help on using tickets.

patch