File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,32 +41,28 @@ The following sample works as specified in the standard:
4141// compile with: /EHsc
4242#include < iostream>
4343
44- template <class T > void f (T)
45- {
46- printf_s("Less specialized function called\n");
44+ template <class T > void f (T) {
45+ printf_s("Less specialized function called\n");
4746}
4847
49- template <class T > void f(T* )
50- {
51- printf_s("More specialized function called\n");
48+ template <class T > void f(T* ) {
49+ printf_s("More specialized function called\n");
5250}
5351
54- template <class T > void f(const T* )
55- {
56- printf_s("Even more specialized function for const T* \n");
52+ template <class T > void f(const T* ) {
53+ printf_s("Even more specialized function for const T* \n");
5754}
5855
59- int main()
60- {
61- int i =0;
62- const int j = 0;
63- int * pi = &i;
64- const int * cpi = &j;
65-
66- f(i); // Calls less specialized function.
67- f(pi); // Calls more specialized function.
68- f(cpi); // Calls even more specialized function.
69- // Without partial ordering, these calls would be ambiguous.
56+ int main() {
57+ int i =0;
58+ const int j = 0;
59+ int * pi = &i;
60+ const int * cpi = &j;
61+
62+ f(i); // Calls less specialized function.
63+ f(pi); // Calls more specialized function.
64+ f(cpi); // Calls even more specialized function.
65+ // Without partial ordering, these calls would be ambiguous.
7066}
7167```
7268
You can’t perform that action at this time.
0 commit comments