diff --git a/README.md b/README.md index 9c2678ea2242d05b71baf787368fe069bbcd6974..3e230c2bac718a21cec3bb5428811ace83ed20e4 100644 --- a/README.md +++ b/README.md @@ -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 a6(a1); // 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(a1); // OK :static_cast 进行直接初始化 diff --git a/README_en.md b/README_en.md index 90fc50878797826352e6a5a299638ef38018c288..2b333a624036b378ad7129b406ebb495f4af9537 100644 --- a/README_en.md +++ b/README_en.md @@ -500,7 +500,7 @@ int main() A a5 = (A)1; // OK:Allow explicit conversion of static_cast doA(1); // OK:Allow implicit conversion from int to A if (a1); // 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 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(a1); // OK: static_cast for direct initialization