CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #4
    Join Date
    Aug 2008
    Posts
    902

    Re: Heterogeneous container

    Actually, that may not be necessary.

    There is Boost.PropertyTree that has basically that exact interface, and furthermore, it already works with the serializer!

    Code:
    boost::property_tree::ptree pt;
    pt.put<std::string>("name", "Chris");
    pt.put("age", 23);
    std::ofstream ofs("out.xml");
    boost::archive::xml_oarchive xml(ofs);
    xml << BOOST_SERIALIZATION_NVP(pt);
    Last edited by Chris_F; October 26th, 2011 at 06:03 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured