Topic: explicit tpl instantition
Author: Marc Girod <girod@stybba.ntc.nokia.com>
Date: 1998/11/29 Raw View
Hello!
I reformulate a question to which I got no answer on Nov 5th.
What does the standard promise me as I explicitly instantiate a
template member?
The case I contest my compiler behaviour is:
-foo.C--------------------------
#include <list>
struct AA {};
list<AA*> alist;
void rem() { alist.erase(alist.begin()); }
template list<AA*,allocator>::iterator list<AA*,allocator>::erase(
list<AA*,allocator>::iterator,list<AA*,allocator>::iterator);
template void list<AA*,allocator>::deallocate_buffers();
--------------------------------
Compiling this with an option disabling any implicit instantiation, my
compiler does not provide me the two symbols.
My vendor things this behaviour is expectable, and enjoins me to use
other options.
Please, just tell me --and him-- he is wrong :-)
Best Regards!
Marc
--
Marc Girod Hiomo 5/1 Voice: +358-9-511 23746
Nokia Telecommunications P.O. Box 320 Mobile: +358-40-569 7954
NWS/NMS/NMS for Data 00045 NOKIA Group Fax: +358-9-511 23580
Finland marc.girod@ntc.nokia.com
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: James Kuyper <kuyper@wizard.net>
Date: 1998/11/30 Raw View
Marc Girod wrote:
> Hello!
> I reformulate a question to which I got no answer on Nov 5th.
> What does the standard promise me as I explicitly instantiate a
> template member?
> The case I contest my compiler behaviour is:
> -foo.C--------------------------
> #include <list>
> struct AA {};
> list<AA*> alist;
> void rem() { alist.erase(alist.begin()); }
> template list<AA*,allocator>::iterator list<AA*,allocator>::erase(
> list<AA*,allocator>::iterator,list<AA*,allocator>::iterator);
> template void list<AA*,allocator>::deallocate_buffers();
> --------------------------------
> Compiling this with an option disabling any implicit instantiation, my
> compiler does not provide me the two symbols.
Which two symbols? In general, the standard doesn't say anything about
which symbols are created. You need to convert your problem into a
program that doesn't compile, or which executes incorrectly; the
standard says a great deal about such issues.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]