diff options
author | Geoff Liu <g@geoffliu.me> | 2015-05-04 02:45:31 -0600 |
---|---|---|
committer | Geoff Liu <g@geoffliu.me> | 2015-05-04 02:45:31 -0600 |
commit | 05c2617aaf6d040b1e4372d8f83df11288ff2279 (patch) | |
tree | 44b6e90ec10950b8a0624b7ceac4b70344b8e3c4 | |
parent | c21cf5a1e230dadf81bc4e31e2d2f9133551b365 (diff) |
Minor fix
-rw-r--r-- | c++.html.markdown | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/c++.html.markdown b/c++.html.markdown index 10c39c9c..e50c33fa 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -489,15 +489,16 @@ void barkThreeTimes(const T& input) Dog fluffy; fluffy.setName("Fluffy") -barkThreeTimes(fluffy); Prints "Fluffy barks" three times. +barkThreeTimes(fluffy); // Prints "Fluffy barks" three times. -// Template parameters don't have to be classes, though this is used very rarely: +// Template parameters don't have to be classes: template<int Y> void printMessage() { cout << "Learn C++ in " << Y << " minutes!" << endl; } -// And you can explicitly specialize templates for more efficient code: +// And you can explicitly specialize templates for more efficient code (most +// real-world uses of specialization are not as trivial as this): template<> void printMessage<10>() { cout << "Learn C++ faster in only 10 minutes!" << endl; |