Skip to content

Commit d551a43

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#91 from Paul-Dempsey/patch-6
Add missing 'cpp' for C++ code blocks
2 parents b5e3ca1 + ae51fcb commit d551a43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/cpp/explicit-specialization-of-function-templates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ translation.priority.ht:
3939
# Explicit Specialization of Function Templates
4040
With a function template, you can define special behavior for a specific type by providing an explicit specialization (override) of the function template for that type. For example:
4141

42-
```
42+
```cpp
4343
template<> void MySwap(double a, double b);
4444
```
4545
4646
This declaration enables you to define a different function for **double** variables. Like non-template functions, standard type conversions (such as promoting a variable of type **float** to **double**) are applied.
4747
4848
## Example
4949
50-
```
50+
```cpp
5151
// explicit_specialization.cpp
5252
template<class T> void f(T t)
5353
{
@@ -72,4 +72,4 @@ int main()
7272
```
7373

7474
## See Also
75-
[Function Templates](../cpp/function-templates.md)
75+
[Function Templates](../cpp/function-templates.md)

0 commit comments

Comments
 (0)