Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Templates+friends+operator overloading

Name: Anonymous 2010-11-11 18:11

Trying to overload << operator in templated class...this describes what happens and the solution along with explanation:
http://www.parashift.com/c++-faq-lite/templates.html#faq-35.16

Now what I don't understand is this :

"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?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List