From: John Graham <johngavingraham@googlemail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: Template instantiation & inheritance - fixed, but can I scrap the warning I get to do it?
Date: Sat, 27 Feb 2010 22:43:00 -0000 [thread overview]
Message-ID: <94cf76f1002270519m445ec76cyb231955b19e279ff@mail.gmail.com> (raw)
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
next reply other threads:[~2010-02-27 13:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-27 22:43 John Graham [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94cf76f1002270519m445ec76cyb231955b19e279ff@mail.gmail.com \
--to=johngavingraham@googlemail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).