We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exercise 16.49 Explain what happens in each of the following calls:
template void f(T); //1 template void f(const T*); //2 template void g(T); //3 template void g(T*); //4 int i = 42, *p = &i; const int ci = 0, *p2 = &ci; g(42); g(p); g(ci); g(p2); f(42); f(p); f(ci); f(p2);
the answer of
g(ci); // type: const int call template 3 T: const int instantiation: void g(const int) f(ci); // type: const int call template 1 T: const int instantiation: void f(const int)
should be changed to
g(ci); // type: const int call template 3 T: const int instantiation: void g(int) f(ci); // type: const int call template 1 T: const int instantiation: void f(int)
becase top-level const is ignored when instantiated.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Exercise information
Exercise 16.49
Explain what happens in each of the following calls:
Question or Bug
the answer of
should be changed to
becase top-level const is ignored when instantiated.
Your enviroment information
N/A
N/A
The text was updated successfully, but these errors were encountered: