Merge pull request #74 from ZzoxAA/master

代码中混入了中文括号
This commit is contained in:
huihut 2021-01-20 12:04:51 +08:00 committed by GitHub
commit 826d3a5a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -496,7 +496,7 @@ int main()
A a5 = (A)1; // OK允许 static_cast 的显式转换
doA(1); // OK允许从 int 到 A 的隐式转换
if (a1); // OK使用转换函数 A::operator bool() 的从 A 到 bool 的隐式转换
bool a6a1; // OK使用转换函数 A::operator bool() 的从 A 到 bool 的隐式转换
bool a6(a1); // OK使用转换函数 A::operator bool() 的从 A 到 bool 的隐式转换
bool a7 = a1; // OK使用转换函数 A::operator bool() 的从 A 到 bool 的隐式转换
bool a8 = static_cast<bool>(a1); // OK static_cast 进行直接初始化

View File

@ -500,7 +500,7 @@ int main()
A a5 = (A)1; // OKAllow explicit conversion of static_cast
doA(1); // OKAllow implicit conversion from int to A
if (a1); // OK: implicit conversion from A to bool using conversion function A ::operator bool()
bool a6a1; // OK: implicit conversion from A to bool using conversion function A::operator bool()
bool a6(a1); // OK: implicit conversion from A to bool using conversion function A::operator bool()
bool a7 = a1; // OK: implicit conversion from A to bool using conversion function A::operator bool()
bool a8 = static_cast<bool>(a1); // OK: static_cast for direct initialization