[omniORB] list<A::B_ptr> theList; theList.insert( aBObject ) NOPE! but why?

ERIKSSON,TOBIAS (A-Sweden,ex1) tobias_eriksson@agilent.com
Fri, 15 Dec 2000 08:56:19 +0100


Hi 
 I'm struggling with the following

class C
...
void add( A::B_ptr aBObject );
...
private:
 list<A::B_ptr> theList;
...
};


void C::add( A::B_ptr aBObject )
{
  theList.insert( aBObject );
}


But, this does not work, it complains and says that the list<A::B_ptr> does
not have a method with that argument. Below is the compiler error, what am I
doing wrong here?

 Regards
   Tobias

g++ -c -g -I. -I/home/tobias/CORBA/omni/include -D__OMNIORB3__
-D_REENTRANT -I. -D__x86__ -D__linux__ -D__OSVERSION__=2
InterestedParties.cc -o InterestedParties.o
InterestedParties.cc: In method `void
InterestedParties::attach(Monitor::_objref_MonitorClient *)':
InterestedParties.cc:32: no matching function for call to
`list<Monitor::_objref_MonitorClient
*,allocator<Monitor::_objref_MonitorClient *> >::insert
(Monitor::_objref_MonitorClient *&)'
/usr/lib/gcc-lib/i386-linux/2.95.2/../../../../include/g++-3/stl_list.h:343:
candidates are: struct _List_iterator<Monitor::_objref_MonitorClient
*,Monitor::_objref_MonitorClient *&,Monitor::_objref_MonitorClient **>
list<Monitor::_objref_MonitorClient
*,allocator<Monitor::_objref_MonitorClient *>
>::insert(_List_iterator<Monitor::_objref_MonitorClient
*,Monitor::_objref_MonitorClient *&,Monitor::_objref_MonitorClient **>,
Monitor::_objref_MonitorClient *const &)
/usr/lib/gcc-lib/i386-linux/2.95.2/../../../../include/g++-3/stl_list.h:351:
struct _List_iterator<Monitor::_objref_MonitorClient
*,Monitor::_objref_MonitorClient *&,Monitor::_objref_MonitorClient **>
list<Monitor::_objref_MonitorClient
*,allocator<Monitor::_objref_MonitorClient *>
>::insert(_List_iterator<Monitor::_objref_MonitorClient
*,Monitor::_objref_MonitorClient *&,Monitor::_objref_MonitorClient **>)
/usr/lib/gcc-lib/i386-linux/2.95.2/../../../../include/g++-3/stl_list.h:587:
void list<Monitor::_objref_MonitorClient
*,allocator<Monitor::_objref_MonitorClient *>
>::insert(_List_iterator<Monitor::_objref_MonitorClient
*,Monitor::_objref_MonitorClient *&,Monitor::_objref_MonitorClient **>,
unsigned int, Monitor::_objref_MonitorClient *const &)
make: *** [InterestedParties.o] Error 1