Boost logo

Boost Users :

Subject: [Boost-users] Property Tree problem with equal range.
From: Andrew Maclean (andrew.amaclean_at_[hidden])
Date: 2010-09-14 19:59:59


I am using Boost 1.43 and last line in the following code causes this error:
/usr/local/include/boost/property_tree/detail/ptree_implementation.hpp:471:
error: ‘class boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<std::pair<const
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, boost::property_tree::basic_ptree<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, std::less<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, std::allocator<std::pair<const
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, boost::property_tree::basic_ptree<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, std::less<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > > > > >’ has no member named ‘base’

Here is the code fragment. pt is the property tree.
  std::string key = "program.query";
  std::size_t num = pt->count(key);
  std::cout << "Number = " << num << std::endl;
  typedef boost::property_tree::ptree::assoc_iterator assocIt;
  typedef std::pair< assocIt, assocIt > TRangeItPair;
  TRangeItPair er = pt->equal_range(key);

The only fix I could see was here:
http://lists.boost.org/boost-users/2010/02/55806.php

But I cannot see how to apply it to the above code fragment.

Any help is appreciated.

Regards
   Andrew

-- 
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net