This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36175] Definition of list<Class*> not working inside structure
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Dec 2009 00:21:50 -0000
- Subject: [Bug c++/36175] Definition of list<Class*> not working inside structure
- References: <bug-36175-16159@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from redi at gcc dot gnu dot org 2009-12-11 00:21 -------
(In reply to comment #0)
> I tried to include a list <Class*> inside a structure and it does not worked.
> And everytime I compile I get a linker error like that:
> error: no matching function for call to
That's not a linker error.
> Character.cpp:365: error: no matching function for call to
> 'std::list<Character_Data*, std::allocator<Character_Data*>
> >::remove(Character* const)'
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/list.tcc:174: note:
> candidates are: void std::list<_Tp, _Alloc>::remove(const _Tp&) [with _Tp =
> Character_Data*, _Alloc = std::allocator<Character_Data*>]
It looks as though Character* is not convertible to Character_Data*
If you still think there's a bug you need to provide the code that doesn't
compile, ideally reduced to the minimum version that shows the problem.
--
redi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36175