public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Template instantiation & inheritance - fixed, but can I scrap the   warning I get to do it?
@ 2010-02-27 22:43 John Graham
       [not found] ` <5b7094581002270824v669fa771y3d5f017c0aefa11c@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: John Graham @ 2010-02-27 22:43 UTC (permalink / raw)
  To: gcc-help

Okay, I seem to have gone and answered my own question!

For some reason I couldn't do:


template class ost::TRTPSessionBase<ost::RTPBaseUDPIPv4Socket,
ost::RTPBaseUDPIPv4Socket, ost::AVPQueue>;


Because I'd get a few of the following back:


ccrtp/rtp.h: In member function 'ost::IPV4Host
ost::TRTPSessionBase<RTPDataChannel, RTCPChannel,
ServiceQueue>::getDataSender(ost::tpport_t*) const [with
RTPDataChannel = ost::RTPBaseUDPIPv4Socket, RTCPChannel =
ost::RTPBaseUDPIPv4Socket, ServiceQueue = ost::AVPQueue]':
rtpaudioport.cpp:24:   instantiated from here
ccrtp/rtp.h:205: error: no matching function for call to
'ost::RTPBaseUDPIPv4Socket::getSender(ost::tpport_t*&)'
ccrtp/channel.h:114: note: candidates are: ost::IPV4Host
ost::RTPBaseUDPIPv4Socket::getSender(ost::tpport_t&) const


But I can do:


inline template class ost::TRTPSessionBase<ost::RTPBaseUDPIPv4Socket,
ost::RTPBaseUDPIPv4Socket, ost::AVPQueue>;


And that seems to generate the necessary class information.

Still seems like a bit of a mystery that this has to be specifically
generated though... is there a reason for that?

Also, I have to turn off -pedantic-errors to compile that, as it's a
non-standard extension. Is there any way I can specify an
-fno-<something> option to turn this error off:

error: ISO C++ forbids the use of 'inline' on explicit instantiations


Thanks again,

John G

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-03-06 21:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-27 22:43 Template instantiation & inheritance - fixed, but can I scrap the warning I get to do it? John Graham
     [not found] ` <5b7094581002270824v669fa771y3d5f017c0aefa11c@mail.gmail.com>
2010-02-28  2:28   ` John Graham
2010-03-01 17:44     ` Brian Budge
2010-03-06 12:00       ` John Graham
2010-03-06 17:14         ` Brian Budge
2010-03-06 21:16           ` John Graham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).