This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16844] New: Explicit instantiation failing
- From: "larsbj at lyx dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2004 10:22:27 -0000
- Subject: [Bug libstdc++/16844] New: Explicit instantiation failing
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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]
--
Summary: Explicit instantiation failing
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: larsbj at lyx dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16844