Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Function template read_info



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

template<typename Ptree> 
  void read_info(const std::string & filename, Ptree & pt, 
                 const std::locale & loc = std::locale());


Read INFO from a the given file and translate it to a property tree. The tree's key type must be a string type, i.e. it must have a nested value_type typedef that is a valid parameter for basic_ifstream.

[Note] Note

Replaces the existing contents. Strong exception guarantee.


info_parser_error If the file cannot be read, doesn't contain valid INFO, or a conversion fails.