Subject: [Boost-bugs] [Boost C++ Libraries] #7175: Rev 74766 breaks unordered_map on gcc 3.4
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-25 16:19:40
#7175: Rev 74766 breaks unordered_map on gcc 3.4
-----------------------------------+----------------------------------------
Reporter: luc_j_bourhis@⦠| Owner: danieljames
Type: Bugs | Status: new
Milestone: To Be Determined | Component: unordered
Version: Boost 1.50.0 | Severity: Problem
Keywords: |
-----------------------------------+----------------------------------------
I was initially confronted to that bug with 1.50 and then I pinpointed the
first bad rev using git bisect. Here is how to reproduce the problem:
~> gcc --version
gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
...
~> cat regress_unordered.cpp
#include <boost/unordered_map.hpp>
#include <iostream>
int main() {
boost::unordered_map<std::string, std::size_t> counts;
counts["one"]++;
std::cout << counts["one"] << std::endl;
}
~> g++ -c regress_unordered.cpp -I/path/to/boost
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp: In
instantiation of
`boost::unordered::detail::allocator_traits<std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > > >':
/home/luc/Developer/cctbx/boost/boost/unordered/detail/unique.hpp:155:
instantiated from
`boost::unordered::detail::pick_node<std::allocator<std::pair<const
std::string, size_t> >, std::pair<const std::string, size_t> >'
/home/luc/Developer/cctbx/boost/boost/unordered/detail/unique.hpp:202:
instantiated from
`boost::unordered::detail::map<std::allocator<std::pair<const std::string,
size_t> >, std::string, size_t, boost::hash<std::string>,
std::equal_to<std::string> >'
/home/luc/Developer/cctbx/boost/boost/unordered/unordered_map.hpp:59:
instantiated from `boost::unordered::unordered_map<std::string, size_t,
boost::hash<std::string>, std::equal_to<std::string>,
std::allocator<std::pair<const std::string, size_t> > >'
regress_unordered.cpp:5: instantiated from here
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp:985:
error: `template<class T> static typename boost::disable_if_c<(
boost::unordered::detail::has_construct<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::construct(Alloc&, T*, const
T&) [with T = T, Alloc =
std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > >]' and `template<class T> static typename
boost::enable_if_c<(
boost::unordered::detail::has_construct<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::construct(Alloc&, T*, const
T&) [with T = T, Alloc =
std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > >]' cannot be overloaded
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp:1005:
error: `template<class T> static typename boost::disable_if_c<(
boost::unordered::detail::has_destroy<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::destroy(Alloc&, T*) [with T =
T, Alloc =
std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > >]' and `template<class T> static typename
boost::enable_if_c<( boost::unordered::detail::has_destroy<Alloc,T>::value
&& boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::destroy(Alloc&, T*) [with T =
T, Alloc =
std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > >]' cannot be overloaded
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp: In
instantiation of
`boost::unordered::detail::allocator_traits<std::allocator<boost::unordered::detail::ptr_bucket>
>':
/home/luc/Developer/cctbx/boost/boost/unordered/detail/unique.hpp:155:
instantiated from
`boost::unordered::detail::pick_node<std::allocator<std::pair<const
std::string, size_t> >, std::pair<const std::string, size_t> >'
/home/luc/Developer/cctbx/boost/boost/unordered/detail/unique.hpp:202:
instantiated from
`boost::unordered::detail::map<std::allocator<std::pair<const std::string,
size_t> >, std::string, size_t, boost::hash<std::string>,
std::equal_to<std::string> >'
/home/luc/Developer/cctbx/boost/boost/unordered/unordered_map.hpp:59:
instantiated from `boost::unordered::unordered_map<std::string, size_t,
boost::hash<std::string>, std::equal_to<std::string>,
std::allocator<std::pair<const std::string, size_t> > >'
regress_unordered.cpp:5: instantiated from here
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp:985:
error: `template<class T> static typename boost::disable_if_c<(
boost::unordered::detail::has_construct<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::construct(Alloc&, T*, const
T&) [with T = T, Alloc =
std::allocator<boost::unordered::detail::ptr_bucket>]' and `template<class
T> static typename boost::enable_if_c<(
boost::unordered::detail::has_construct<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::construct(Alloc&, T*, const
T&) [with T = T, Alloc =
std::allocator<boost::unordered::detail::ptr_bucket>]' cannot be
overloaded
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp:1005:
error: `template<class T> static typename boost::disable_if_c<(
boost::unordered::detail::has_destroy<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::destroy(Alloc&, T*) [with T =
T, Alloc = std::allocator<boost::unordered::detail::ptr_bucket>]' and
`template<class T> static typename boost::enable_if_c<(
boost::unordered::detail::has_destroy<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::destroy(Alloc&, T*) [with T =
T, Alloc = std::allocator<boost::unordered::detail::ptr_bucket>]' cannot
be overloaded
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp: In
instantiation of
`boost::unordered::detail::allocator_traits<std::allocator<std::pair<const
std::string, size_t> > >':
/home/luc/Developer/cctbx/boost/boost/unordered/unordered_map.hpp:65:
instantiated from `boost::unordered::unordered_map<std::string, size_t,
boost::hash<std::string>, std::equal_to<std::string>,
std::allocator<std::pair<const std::string, size_t> > >'
regress_unordered.cpp:5: instantiated from here
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp:985:
error: `template<class T> static typename boost::disable_if_c<(
boost::unordered::detail::has_construct<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::construct(Alloc&, T*, const
T&) [with T = T, Alloc = std::allocator<std::pair<const std::string,
size_t> >]' and `template<class T> static typename boost::enable_if_c<(
boost::unordered::detail::has_construct<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::construct(Alloc&, T*, const
T&) [with T = T, Alloc = std::allocator<std::pair<const std::string,
size_t> >]' cannot be overloaded
/home/luc/Developer/cctbx/boost/boost/unordered/detail/allocate.hpp:1005:
error: `template<class T> static typename boost::disable_if_c<(
boost::unordered::detail::has_destroy<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::destroy(Alloc&, T*) [with T =
T, Alloc = std::allocator<std::pair<const std::string, size_t> >]' and
`template<class T> static typename boost::enable_if_c<(
boost::unordered::detail::has_destroy<Alloc,T>::value &&
boost::is_same<T,typename Alloc::value_type>::value), void>::type
boost::unordered::detail::allocator_traits::destroy(Alloc&, T*) [with T =
T, Alloc = std::allocator<std::pair<const std::string, size_t> >]' cannot
be overloaded
/home/luc/Developer/cctbx/boost/boost/unordered/detail/buckets.hpp: In
member function `void boost::unordered::detail::buckets<A, Bucket, Node,
Policy>::create_buckets() [with A = std::allocator<std::pair<const
std::string, size_t> >, Bucket = boost::unordered::detail::ptr_bucket,
Node = boost::unordered::detail::ptr_node<std::pair<const std::string,
size_t> >, Policy = boost::unordered::detail::prime_policy<size_t>]':
/home/luc/Developer/cctbx/boost/boost/unordered/detail/table.hpp:403:
instantiated from `void
boost::unordered::detail::table<Types>::reserve_for_insert(size_t) [with
Types = boost::unordered::detail::map<std::allocator<std::pair<const
std::string, size_t> >, std::string, size_t, boost::hash<std::string>,
std::equal_to<std::string> >]'
/home/luc/Developer/cctbx/boost/boost/unordered/detail/unique.hpp:402:
instantiated from `typename
boost::unordered::detail::table<Types>::value_type&
boost::unordered::detail::table_impl<Types>::operator[](const typename
boost::unordered::detail::table<Types>::key_type&) [with Types =
boost::unordered::detail::map<std::allocator<std::pair<const std::string,
size_t> >, std::string, size_t, boost::hash<std::string>,
std::equal_to<std::string> >]'
/home/luc/Developer/cctbx/boost/boost/unordered/unordered_map.hpp:1195:
instantiated from `typename boost::unordered::unordered_map<K, T, H, P,
A>::mapped_type& boost::unordered::unordered_map<K, T, H, P,
A>::operator[](const K&) [with K = std::string, T = size_t, H =
boost::hash<std::string>, P = std::equal_to<std::string>, A =
std::allocator<std::pair<const std::string, size_t> >]'
regress_unordered.cpp:6: instantiated from here
/home/luc/Developer/cctbx/boost/boost/unordered/detail/buckets.hpp:726:
error: no matching function for call to
`boost::unordered::detail::allocator_traits<std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > >
>::construct(std::allocator<boost::unordered::detail::ptr_node<std::pair<const
std::string, size_t> > >&, boost::unordered::detail::ptr_bucket*,
boost::unordered::detail::ptr_bucket)'
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7175> 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:10 UTC