mirror of
https://github.com/CnTransGroup/EffectiveModernCppChinese.git
synced 2025-01-27 12:21:01 +08:00
Update item34.md
This commit is contained in:
parent
4763ba5c76
commit
5ccd9d013c
@ -80,7 +80,7 @@ auto setSoundB = //“B”代表“bind”
|
|||||||
```c++
|
```c++
|
||||||
auto setSoundB =
|
auto setSoundB =
|
||||||
std::bind(setAlarm,
|
std::bind(setAlarm,
|
||||||
std::bind(std::plus<>(), steady_clock::now(), 1h),
|
std::bind(std::plus<>(), std::bind(steady_clock::now), 1h),
|
||||||
_1,
|
_1,
|
||||||
30s);
|
30s);
|
||||||
```
|
```
|
||||||
@ -93,7 +93,7 @@ using namespace std::placeholders;
|
|||||||
auto setSoundB =
|
auto setSoundB =
|
||||||
std::bind(setAlarm,
|
std::bind(setAlarm,
|
||||||
std::bind(std::plus<steady_clock::time_point>(),
|
std::bind(std::plus<steady_clock::time_point>(),
|
||||||
steady_clock::now(),
|
std::bind(steady_clock::now),
|
||||||
hours(1)),
|
hours(1)),
|
||||||
_1,
|
_1,
|
||||||
seconds(30));
|
seconds(30));
|
||||||
|
Loading…
Reference in New Issue
Block a user