Explain why the compiler won’t allow the second call. Give an example of bad things that could happen if it did. Bjarne Stroustrup, the original designer of C++, once described templates as “a clever kind of macro that obeys the scope, naming, and type rules of C++” [Str13, 2nd ed., p. 257]. How close is the similarity? What can templates do that macros can’t? What do macros do that templates don’t?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here