// (C) Copyright Jonathan Turkanis 2004. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt. // Disclaimer: Not a Boost library. #include #include #include #include #include #include struct Thing { }; int main() { using namespace std; using namespace boost::assign; using namespace boost::io; map< string, string > cities; istringstream in("{ (London:England), (Paris:France), (Moscow:Russia) }"); in >> punctuate< map<_,_> >("{ ", ", ", " }") >> punctuate< pair<_,_> >("(", ":", ")") >> cities; cout << punctuate< map<_,_> >("{ ", ", ", " }") << punctuate< pair<_,_> >("(", ":", ")") << cities << "\n"; return 0; }