Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ struct UnaryExpr {
```cpp
std::cout << "sizeof(variant<int, double, string>): "
<< sizeof(std::variant<int, double, std::string>) << "\n";
// 典型输出:32(64 位平台上,string 占 32 字节,int double 8 字节)
// 典型输出:40(64 位平台上,string 占 32 字节,int 占 4 字节, double 8 字节)
std::cout << "sizeof(string): " << sizeof(std::string) << "\n";
// 典型输出:32
```
Expand Down
Loading