From 4eef4daa0fe3c916a7bfc816bbacf962f65afeef Mon Sep 17 00:00:00 2001 From: sunyuhan19981208 <50269851+sunyuhan19981208@users.noreply.github.com> Date: Thu, 24 Mar 2022 10:25:25 +0800 Subject: [PATCH] fix: spell error: is_instegral -> is_integral (#115) --- 5.RRefMovSemPerfForw/item27.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/5.RRefMovSemPerfForw/item27.md b/5.RRefMovSemPerfForw/item27.md index 26bffce..7c6c287 100644 --- a/5.RRefMovSemPerfForw/item27.md +++ b/5.RRefMovSemPerfForw/item27.md @@ -80,14 +80,14 @@ void logAndAdd(T&& name) { logAndAddImpl( std::forward(name), - std::is_instegral::type>() + std::is_integral::type>() ); } ``` 这个代码很巧妙。(在C++14中,你可以通过`std::remove_reference_t`来简化写法,参看[Item9](https://github.com/kelthuzadx/EffectiveModernCppChinese/blob/master/3.MovingToModernCpp/item9.md)) -处理完之后,我们可以将注意力转移到名为`logAndAddImpl`的函数上了。有两个重载函数,第一个仅用于非整型类型(即`std::is_instegral::type>`是false): +处理完之后,我们可以将注意力转移到名为`logAndAddImpl`的函数上了。有两个重载函数,第一个仅用于非整型类型(即`std::is_integral::type>`是false): ```cpp template //非整型实参:添加到全局数据结构中