修改示例中的错误

原书中的变量名是“i”而不是"x"
This commit is contained in:
cellspace 2020-08-25 17:14:56 +08:00 committed by GitHub
parent 029c342e0d
commit 43ba93f45a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
我们将从一个简单的情况开始没有任何令人惊讶的情况。相比模板类型推导和auto类型推导decltype只是简单的返回名字或者表达式的类型
````cpp
const int x=0; //decltype(i)是const int
const int i=0; //decltype(i)是const int
bool f(const Widget& w); //decltype(w)是const Widget&
//decltype(f)是bool(const Widget&)