This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Explicit instantiation failing in 3.5 (boost)


It should be impossible that this gives an error about allocators.
That added to the fact that the allocator code was recently
heavily changed in this regard - I am fairly sure that this is
a bug in libstdc++.

Would you be so kind to report it to http://gcc.gnu.org/bugzilla/  ?

Thanks,
Carlo Wood

On Sat, Jul 31, 2004 at 04:03:07AM +0200, Lars Gullik Bjønnes wrote:
> 
> This is adapted from code in connection.hpp in boost.
> 
> Should it work or is the code in fact wrong, and makes assumptions
> that the standard does not provide?
> 
> ------
> #include <list>
> 
> struct bound_object {
>         bool operator==(const bound_object& other) const;
>         bool operator<(const bound_object& other) const;
> };
> 
> template class std::list<bound_object>;
> --------
> 
> g++ (GCC) 3.5.0 20040731 (experimental)
> 
> g++ -c -o alloc.o alloc.C
> /opt/gcc-head/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_list.h: In member function `std::_List_node<_Tp>* std::list<_Tp, _Alloc>::_M_create_node() [with _Tp = bound_object, _Alloc = std::allocator<bound_object>]':
> alloc.C:8:   instantiated from here
> /opt/gcc-head/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_list.h:460: error: no matching function for call to `std::allocator<bound_object>::construct(bound_object*)'
> /opt/gcc-head/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../include/c++/3.5.0/ext/mt_allocator.h:106: note: candidates are: void __gnu_cxx::__mt_alloc<_Tp>::construct(_Tp*, const _Tp&) [with _Tp = bound_object]
> 
> 
> -- 
> 	Lgb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]