mirror of
https://github.com/CnTransGroup/EffectiveModernCppChinese.git
synced 2024-12-27 13:21:07 +08:00
Update item11.md
勘误
This commit is contained in:
parent
4eef4daa0f
commit
881a1e0030
@ -83,7 +83,7 @@ void processPointer<void>(void*) = delete;
|
|||||||
template<>
|
template<>
|
||||||
void processPointer<char>(char*) = delete;
|
void processPointer<char>(char*) = delete;
|
||||||
```
|
```
|
||||||
现在如果使用`void*`和`char*`调用`processPointer`就是无效的,按常理说`const void*`和`const void*`也应该无效,所以这些实例也应该标注`delete`:
|
现在如果使用`void*`和`char*`调用`processPointer`就是无效的,按常理说`const void*`和`const char*`也应该无效,所以这些实例也应该标注`delete`:
|
||||||
```cpp
|
```cpp
|
||||||
template<>
|
template<>
|
||||||
void processPointer<const void>(const void*) = delete;
|
void processPointer<const void>(const void*) = delete;
|
||||||
|
Loading…
Reference in New Issue
Block a user