This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

[egcs-2.92.11 19980921] Problem with STL list persists.


The following code still fails to compile with the current snapshot.

//------------------------- h.cc ---------------------------//
#include <list>

class a
{
	int x, y;
public:
	a(int x, int y) : x(x), y(y) { }
};

int main()
{
	list<a> b;

	b.push_back(a(1,2));
}
//----------------------------------------------------------//

Here are the error messages, for the command 'gcc h.cc':

#------------------------------------------------------------#
/egcs/include/g++-2/stl_construct.h: In function `void construct<a>(class a *)':
/egcs/include/g++-2/stl_list.h:303:   instantiated from `list<a,allocator<a> >::_M_create_node()'
/egcs/include/g++-2/stl_list.h:344:   instantiated from `list<a,allocator<a> >::insert(_List_iterator<a,a &,a *>, const a &)'
/egcs/include/g++-2/stl_list.h:381:   instantiated from `list<a,allocator<a> >::push_back(const a &)'
h.cc:14:   instantiated from here
/egcs/include/g++-2/stl_construct.h:53: no matching function for call to `a::a ()'
h.cc:8: candidates are: a::a(const a &)
h.cc:7:                 a::a(int, int)
#------------------------------------------------------------#


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