mirror of
https://github.com/CnTransGroup/EffectiveModernCppChinese.git
synced 2025-01-01 07:50:15 +08:00
deploy: c4295e5ab4
This commit is contained in:
parent
a516926297
commit
098fceafe5
@ -164,7 +164,7 @@ logAndAdd("Patty Dog"); //传递字符串字面值
|
||||
<pre><code class="language-cpp">template<typename T>
|
||||
void logAndAdd(T&& name)
|
||||
{
|
||||
auto now = std::chrono::system_lock::now();
|
||||
auto now = std::chrono::system_clock::now();
|
||||
log(now, "logAndAdd");
|
||||
names.emplace(std::forward<T>(name));
|
||||
}
|
||||
@ -181,7 +181,7 @@ logAndAdd("Patty Dog"); //在multiset直接创建std::
|
||||
|
||||
void logAndAdd(int idx) //新的重载
|
||||
{
|
||||
auto now = std::chrono::system_lock::now();
|
||||
auto now = std::chrono::system_clock::now();
|
||||
log(now, "logAndAdd");
|
||||
names.emplace(nameFromIdx(idx));
|
||||
}
|
||||
|
@ -3685,7 +3685,7 @@ logAndAdd("Patty Dog"); //传递字符串字面值
|
||||
<pre><code class="language-cpp">template<typename T>
|
||||
void logAndAdd(T&& name)
|
||||
{
|
||||
auto now = std::chrono::system_lock::now();
|
||||
auto now = std::chrono::system_clock::now();
|
||||
log(now, "logAndAdd");
|
||||
names.emplace(std::forward<T>(name));
|
||||
}
|
||||
@ -3702,7 +3702,7 @@ logAndAdd("Patty Dog"); //在multiset直接创建std::
|
||||
|
||||
void logAndAdd(int idx) //新的重载
|
||||
{
|
||||
auto now = std::chrono::system_lock::now();
|
||||
auto now = std::chrono::system_clock::now();
|
||||
log(now, "logAndAdd");
|
||||
names.emplace(nameFromIdx(idx));
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user