"When you call the operator+ or operator<< functions, this assumption causes the compiler to generate a call to the non-template functions, but the linker will give you an "undefined external" error because you never actually defined those non-template functions."
Isn't this true for other functions as well? Like member functions? Why don't they generate a linker error?
>>1
The C++ Faq isn't the best place to search for answers. Try to consult your C++ Book, or the C++ FQA instead.
Name:
Anonymous2010-11-11 18:49
I have c++ primer and it does not answer the question.
Name:
Anonymous2010-11-11 18:51
no idea why it does it but you just have to do another template decleration right above the function using a different letter from what you used for your class
<n00p> Zhivago: Because the stakeholders come up with requests and requirements. The stakeholder's requests are used to determine features
<Zhivago> n00p: Who were these stakeholders when they were inventing C?
<n00p> Zhivago: I don't actually know the answer to that question. Programmers for Unix?
<Zhivago> n00p: At some point some guy sat down and snorted a whole bunch of cocaine and came up with C's type syntax.
<Zhivago> n00p: What stakeholder issue drove that?
This except substitute ``C++templates'' for ``C type syntax''.
Name:
Anonymous2011-07-24 22:02
n00p is an annoying little turd who wishes he knew his lips from Zhivago's asshole
Name:
Anonymous2011-10-23 17:01
Zhivago is the most informative person ever. There is nothing Zhivago cannot explain.
o
O /`-.__
/ \.'^|
o T l *
_|-..-|_
O (^ '----' `) I HELP THE MENTALLY RETARDED PEOPLE
`\-....-/^ BECOME LESS STUPID WITH ZHIVAGO!
O o ) "/ " ( /
_( (-) )_
O /\ ) ( /\
/ \( ) | \
o o \) ( / \
/ |( )| \
/ o \ \( / \
__.--' O \_ / .._ \
//|)\ , (_) /(((\^)'\
| | O ) ` |
| / o___ / /
/ _.-''^^__O_^^''-._ /
.' / -''^^ ^^''- \--'^
.' .`. `'''----'''^ .`. \
.' / `'--..____..--'^ \ \
/ _.-/ \ \
.::'_/^ | | `.
.-'| | `-.
_.--'` \ / `-.
/ \ / `-._
`'---..__ `. .`_.._ __ \
``'''`. .'##C `'^ `''---'^
`-..______..-'