Skip to content

Commit 2aa0b45

Browse files
authored
Update docs/index.md
1 parent 3b0c0af commit 2aa0b45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void try_call_foo(T &) {
160160
}
161161
```
162162

163-
如果回到 C++98,那又要罪加一等!`enable_if``declval` 是 C++11 引入的 `<type_traits>` 头文件的帮手类,在 C++98 中,我们需要自己实现 `enable_if`…… `declval` 也是 C++11 引入的 `<utility>` 头文件中的帮手函数……假设你自己好不容易实现出来了 `enable_if``declval`,还没完:因为 constexpr 在 C++98 中也不存在了!你无法定义 value 成员变量为编译期常量,我们只好又用一个抽象的枚举小技巧来实现定义类成员常量的效果。
163+
如果回到 C++98,那又要罪加一等!`enable_if``declval` 是 C++11 引入的 `<type_traits>` 头文件的帮手类和帮手函数,在 C++98 中,我们需要自己实现 `enable_if`…… `declval` 也是 C++11 引入的 `<utility>` 头文件中的帮手函数……假设你自己好不容易实现出来了 `enable_if``declval`,还没完:因为 constexpr 在 C++98 中也不存在了!你无法定义 value 成员变量为编译期常量,我们只好又用一个抽象的枚举小技巧来实现定义类成员常量的效果。
164164

165165
```cpp
166166
template <class T, class = void>

0 commit comments

Comments
 (0)