Re: [Boost-bugs] [Boost C++ Libraries] #4786: custom property_tree

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4786: custom property_tree
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-26 10:52:14


#4786: custom property_tree
-------------------------------+--------------------------------------------
  Reporter: anonymous | Owner: cornedbee
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: property_tree
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords: property_tree
-------------------------------+--------------------------------------------

Comment (by saleyn):

 Upon checking my last submission, I noticed that I uploaded a stale
 version which still didn't work without patching the tree.
 variant_tree_boost_1_49_0.tgz solves that problem. The work-around was to
 apply a "post-conversion" transform after reading data from the info file
 to convert strings to corresponding variant types.

 Concerning the last comment, the variant_translator has the following code
 that makes sure that std::string is one of the types it handles
 (variant::valid_types type includes std::string):

 {{{
         template<typename T>
         typename boost::disable_if<
             boost::is_same<
                 boost::mpl::end<valid_types>::type,
                 boost::mpl::find<variant::valid_types, T>
>,
             internal_type>::type
         put_value(T value) const {
             return variant(value);
         }

 }}}

 Since variant_tree::put_value(value) uses default translator, it should be
 able to handle std::string conversion. If you don't believe it does,
 please include a test case in the test_variant.cpp that illustrates a
 failing case.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4786#comment:14>
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:09 UTC