Update item11.md

勘误
This commit is contained in:
Jllobvemy 2022-04-10 09:45:48 +08:00 committed by Yi Yang
parent 4eef4daa0f
commit 881a1e0030

View File

@ -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;