Skip to content

Commit

Permalink
make refs tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
aapolkovsky authored Nov 13, 2016
1 parent 4e787ed commit b179651
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boost.signals2.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[chapter21]: https://theboostcpplibraries.com/boost.optional
# Chapter 67. Boost.Signals2

**Table of Contents**
Expand Down Expand Up @@ -177,7 +178,7 @@ In [Example 67.7](#ex.signals2_07) two lambda functions are associated with the

[Example 67.7](#ex.signals2_07) writes `2` to standard output. Both return values were correctly accepted by **s**, but all except the last one were ignored. By default, only the last return value of all associated functions is returned.

Please note that `s()` does not directly return the result of the last function called. An object of type `boost::optional` is returned, which when de-referenced returns the number 2. Triggering a signal that is not associated with any function does not yield any return value. Thus, in this case, `boost::optional` allows Boost.Signals2 to return an empty object. `boost::optional` is introduced in [Chapter 21](boost.optional.md).
Please note that `s()` does not directly return the result of the last function called. An object of type `boost::optional` is returned, which when de-referenced returns the number 2. Triggering a signal that is not associated with any function does not yield any return value. Thus, in this case, `boost::optional` allows Boost.Signals2 to return an empty object. `boost::optional` is introduced in [Chapter 21][chapter21].

It is possible to customize a signal so that the individual return values are processed accordingly. To do this, a *combiner* must be passed to `boost::signals2::signal` as a second template parameter.

Expand Down

0 comments on commit b179651

Please sign in to comment.