public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ramya dot chandar at wipro dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/18306] New: seems not possible to specialize a template member function Date: Fri, 05 Nov 2004 04:13:00 -0000 [thread overview] Message-ID: <20041105041308.18306.ramya.chandar@wipro.com> (raw) Environment : i686-pc-linux-gnu Compiler Version: GCC 3.3.2 Kernel Version : 2.4.7-10 It seems, not possible to specialize a template member functions const. I got a file(.impl) which got the following template functions( generalized and specialized template functions ) and i got the corresponding header file ( where this .impl file is getting included ). IOCM::Status IOCM_SequenceTempl<IOCM::Char>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<IOCM::Octet>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<IOCM::Short>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<IOCM::UShort>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<IOCM::Long>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<IOCM::ULong>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<IOCM::Float>::_skip(IOCM::MessageBox& msgBox); IOCM::Status IOCM_SequenceTempl<T>::_skip(IOCM::MessageBox& msgBox); But, the build is getting failed, with the following error( for all the template functions ). /cm4/objects/gant-c/ghostr/cm4/fsn/app/asam/eqptDomain/eqptMgntCore/common/AppliqueSensorListener.o(.text+0x0): In function `IOCM_SequenceTempl<char>::_size() const': /cm4/fsn/include/iocm/Sequence.impl:293: multiple definition of `IOCM_SequenceTempl<char>::_size() const' /cm4/objects/gant-c/ghostr/cm4/fsn/app/asam/eqptDomain/eqptMgntCore/common/AppliqueHandler.o(.text+0x0):/cm4/fsn/include/iocm/Sequence.impl:293: first defined here /cm4/objects/gant-c/ghostr/cm4/fsn/app/asam/eqptDomain/eqptMgntCore/common/AppliqueSensorListener.o(.text+0x18): In function `IOCM_SequenceTempl<char>::_pack(IOCM_MessageBox&) const': /cm4/fsn/include/iocm/Sequence.impl:305: multiple definition of `IOCM_SequenceTempl<char>::_pack(IOCM_MessageBox&) const' /cm4/objects/gant-c/ghostr/cm4/fsn/app/asam/eqptDomain/eqptMgntCore/common/AppliqueHandler.o(.text+0x18):/cm4/fsn/include/iocm/Sequence.impl:305: first defined here There is no problem with 2.95.3 But, when i remove the .impl file( which got the template function definitions ) from the corresponding header file, compilation went through, but its failing during linking stage for the same reason giving the following error message for all the template functions. Linking fails with the following error( for all the template functions ). /cm4/fsn/app/asam/atm2/nt/../export/idl/AtmApplication_ifc.cc:344: undefined reference to `IOCM_SequenceTempl<Eqpt::LogicalIfIndex>::_size(void) const' /cm4/fsn/app/asam/atm2/nt/../export/idl/AtmApplication_ifc.cc:349: undefined reference to `IOCM_SequenceTempl<Eqpt::LogicalIfIndex>::_pack(IOCM_MessageBox &) const' -- Summary: seems not possible to specialize a template member function Product: gcc Version: 3.2.2 Status: UNCONFIRMED Severity: critical Priority: P1 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ramya dot chandar at wipro dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18306
next reply other threads:[~2004-11-05 4:13 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-05 4:13 ramya dot chandar at wipro dot com [this message] 2004-11-05 4:19 ` [Bug c++/18306] " ramya dot chandar at wipro dot com 2004-11-05 4:21 ` ramya dot chandar at wipro dot com 2004-11-05 4:28 ` pinskia at gcc dot gnu dot org 2004-11-05 5:03 ` pinskia at gcc dot gnu dot org 2004-11-05 19:27 ` bangerth at dealii dot org 2004-11-05 19:29 ` bangerth at dealii dot org 2004-11-23 12:31 ` ramya dot chandar at wipro dot com 2004-11-24 6:55 ` ramya dot chandar at wipro dot com 2004-11-24 19:11 ` pinskia at gcc dot gnu dot org 2005-03-08 9:44 ` ramya dot chandar at wipro dot com
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=20041105041308.18306.ramya.chandar@wipro.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).