Skip to content

Commit ce4459d

Browse files
authored
Add links in "Function Objects in the C++ Standard Library" article
1 parent ef934d9 commit ce4459d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/standard-library/function-objects-in-the-stl.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The last line of the `main` function shows how you call the function object. Thi
3838

3939
## Function Objects and Containers
4040

41-
The C++ Standard Library contains several function objects in the [`<functional>`](functional.md) header file. One use of these function objects is as a sorting criterion for containers. For example, the `set` container is declared as follows:
41+
The C++ Standard Library contains several function objects in the [`<functional>`](functional.md) header file. One use of these function objects is as a sorting criterion for containers. For example, the [`set`](set-class.md) container is declared as follows:
4242

4343
```cpp
4444
template <class Key,
@@ -47,11 +47,11 @@ template <class Key,
4747
class set
4848
```
4949
50-
The second template argument is the function object `less`. This function object returns **`true`** if the first parameter is less than the second parameter. Since some containers sort their elements, the container needs a way of comparing two elements. The comparison is done by using the function object. You can define your own sorting criteria for containers by creating a function object and specifying it in the template list for the container.
50+
The second template argument is the function object [`less`](less-struct.md). This function object returns **`true`** if the first parameter is less than the second parameter. Since some containers sort their elements, the container needs a way of comparing two elements. The comparison is done by using the function object. You can define your own sorting criteria for containers by creating a function object and specifying it in the template list for the container.
5151
5252
## Function Objects and Algorithms
5353
54-
Another use of function objects is in algorithms. For example, the `remove_if` algorithm is declared as follows:
54+
Another use of function objects is in algorithms. For example, the [`remove_if`](algorithm-functions.md#remove_if) algorithm is declared as follows:
5555
5656
```cpp
5757
template <class ForwardIterator, class Predicate>

0 commit comments

Comments
 (0)