| Home | Libraries | People | FAQ | More

## Function template save

boost::property_tree::save

## Synopsis

    // In header: <boost/property_tree/ptree_serialization.hpp>

    template<typename Archive, typename K, typename D, typename C>
      void save(Archive & ar, const basic_ptree< K, D, C > & t,
                const unsigned int file_version);

## Description

Serialize the property tree to the given archive.

Parameters: |
`ar` | The archive to which to save the serialized property tree. This archive should conform to the concept laid out by the Boost.Serialization library.
`file_version` | file_version for the archive.
`t` | The property tree to serialize.
Postconditions: | `ar` will contain the serialized form of `t`.
Notes: | In addition to serializing to regular archives, this supports serializing to archives requiring name-value pairs, e.g. XML archives. However, the output format in the XML archive is not guaranteed to be the same as that when using the Boost.PropertyTree library's `boost::property_tree::xml_parser::write_xml`.