Template syntax in Stroustrup's Tour

Chapter 5 in Stroustrup's "Tour of C++" introduces templates. In chapter 8, however, he uses some template syntax that I don't recall having been previously explained:

1
2
3
4
5
6
template<typename Target =string, typename Source =string>
Target to(Source arg)       // convert Source to Target
{
  stringstream interpreter;
  Target result;
  ....


In the first line of code above, what does =string mean?

Thank you.
Hmm. The discussion in the subsequent text implies that the template function arguments will each default to string if omitted by the caller.

That makes this a "bad question", but whatever. Deleting it now would be rude if someone has begin composing a reply.
Topic archived. No new replies allowed.