[property_tree]problem with equal_range

Hello all, I am getting an error while trying to compile the following program: #include "boost/property_tree/ptree.hpp" int main(int argc, char* argv[]) { boost::property_tree::ptree t; t.equal_range("KEY"); return 0; } Compiler output: 1>c:\hibbettlinux\src\boost-1.41.0\boost\property_tree\detail\ptree_impl 1>emen tation.hpp(448) : error C2039: 'base' : is not a member of 'boost::multi_index::detail::bidir_node_iterator<Node>' 1> with 1> [ 1> Node=boost::multi_index::detail::ordered_index_node<boost::multi_index::deta il::index_node_base<std::pair<const std::string,boost::property_tree::basic_ptree<std::string,std::string>>,std: :allocator<std::pair<const std::string,boost::property_tree::basic_ptree<std::string,std::string>>>>> 1> ] 1> c:\hibbettlinux\src\boost-1.41.0\boost\property_tree\detail\ptree_implementa tion.hpp(444) : while compiling class template member function 'std::pair<_Ty1,_Ty2> boost::property_tree::basic_ptree<Key,Data>::equal_range(const std::basic_string<_Elem,_Traits,_Ax> &)' 1> with 1> [ 1> _Ty1=boost::property_tree::basic_ptree<std::string,std::string>::assoc_itera tor, 1> _Ty2=boost::property_tree::basic_ptree<std::string,std::string>::assoc_itera tor, 1> Key=std::string, 1> Data=std::string, 1> _Elem=char, 1> _Traits=std::char_traits<char>, 1> _Ax=std::allocator<char> 1> ] 1> c:\hibbettlinux\src\platform\vc80\test\test.cpp(9) : see 1> reference to class template instantiation 'boost::property_tree::basic_ptree<Key,Data>' being compiled 1> with 1> [ 1> Key=std::string, 1> Data=std::string 1> ] 1>c:\hibbettlinux\src\boost-1.41.0\boost\property_tree\detail\ptree_impl 1>emen tation.hpp(449) : error C2039: 'base' : is not a member of 'boost::multi_index::detail::bidir_node_iterator<Node>' 1> with 1> [ 1> Node=boost::multi_index::detail::ordered_index_node<boost::multi_index::deta il::index_node_base<std::pair<const std::string,boost::property_tree::basic_ptree<std::string,std::string>>,std: :allocator<std::pair<const std::string,boost::property_tree::basic_ptree<std::string,std::string>>>>> 1> ] I am using boost 1.41 with VC 7.1 Any help is appreciated!!!!!! Ken Murphy

Sebastian, It almost works now. To fix the problem, I had to either remove the explicit declaration from the assoc_iterator constructor, or do the following in equal_range: return std::pair<assoc_iterator, assoc_iterator>(assoc_iterator(r.first), assoc_iterator(r.second)); Hope this helps. Ken
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Sebastian Redl Sent: Saturday, January 30, 2010 7:50 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [property_tree]problem with equal_range
Andrey Torba wrote:
i have the same problem Fixed in trunk now.
Sebastian _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Andrey Torba
-
Ken Murphy
-
Sebastian Redl