[Boost-bugs] [Boost C++ Libraries] #4140: Unable to compile code calling equal_range () members

Subject: [Boost-bugs] [Boost C++ Libraries] #4140: Unable to compile code calling equal_range () members
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-04-22 17:37:58


#4140: Unable to compile code calling equal_range () members
-------------------------------------+--------------------------------------
 Reporter: anonymous | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost Development Trunk | Severity: Problem
 Keywords: equal_range ptree |
-------------------------------------+--------------------------------------
 The following code

 {{{
 #include <boost/property_tree/ptree.hpp>

 int main (int, char * [])
 {
         boost::property_tree::ptree pt;

         pt.equal_range ("");
 }
 }}}

 generates the following error message using gcc-4.4.3 on 64-bit Snow
 Leopard:

 {{{
 In file included from ../boost/boost/property_tree/ptree.hpp:515,
                  from equal_range.cpp:2:
 ../boost/boost/property_tree/detail/ptree_implementation.hpp: In member
 function 'std::pair<typename boost::property_tree::basic_ptree<Key, Data,
 KeyCompare>::assoc_iterator, typename
 boost::property_tree::basic_ptree<Key, Data, KeyCompare>::assoc_iterator>
 boost::property_tree::basic_ptree<Key, Data,
 KeyCompare>::equal_range(const Key&) [with Key = std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >, Data =
 std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
 KeyCompare = std::less<std::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >]':
 equal_range.cpp:8: instantiated from here
 ../boost/boost/property_tree/detail/ptree_implementation.hpp:473: error:
 no matching function for call to
 'std::pair<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> > > >::assoc_iterator,
 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> > >
>::assoc_iterator>::pair(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> > > > > > > > >&,
 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> > > > > > > > >&)'
 /opt/local/include/gcc44/c++/bits/stl_pair.h:83: note: candidates are:
 std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 =
 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> > > >::assoc_iterator, _T2 =
 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> > > >::assoc_iterator]
 /opt/local/include/gcc44/c++/bits/stl_pair.h:79: note:
 std::pair<_T1, _T2>::pair() [with _T1 =
 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> > > >::assoc_iterator, _T2 =
 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> > > >::assoc_iterator]
 /opt/local/include/gcc44/c++/bits/stl_pair.h:68: note:
 std::pair<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> > > >::assoc_iterator,
 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> > > >::assoc_iterator>::pair(const
 std::pair<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> > > >::assoc_iterator,
 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> > > >::assoc_iterator>&)

 }}}

 I see similar error messages using gcc-4.0, 4.2, and 4.3 on Snow[[BR]]
 Leopard, Fedora Core 12, and RHEL 4 with Boost 1.41, 1.42, and trunk from
 SVN.[[BR]]

 Changing the argument to equal_range () to std::string("") or [[BR]]
 boost::property_tree::ptree::key_type ("") generates similar error
 messages.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4140>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC