[Boost-bugs] [Boost C++ Libraries] #10525: json_parser_write.hpp Value Conversion Issue

Subject: [Boost-bugs] [Boost C++ Libraries] #10525: json_parser_write.hpp Value Conversion Issue
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-23 01:38:58


#10525: json_parser_write.hpp Value Conversion Issue
------------------------------+---------------------------
 Reporter: anonymous | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost 1.56.0 | Severity: Problem
 Keywords: json parser |
------------------------------+---------------------------
 In the following snippet in json_parser_write.hpp, Xcode complains
 /boost/property_tree/detail/json_parser_write.hpp: Implicit conversion
 loses integer precision: 'unsigned long' to 'int'.

 line 52 ~ 55
     std::basic_string<Ch> create_escapes(const std::basic_string<Ch> &s)
     {
     ...
                 int d1 = u / 4096; u -= d1 * 4096;
                 int d2 = u / 256; u -= d2 * 256;
                 int d3 = u / 16; u -= d3 * 16;
                 int d4 = u;
     ...
     }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10525>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC