Skip to content

Fix: 2 typos in variant section#33

Open
YukunJ wants to merge 1 commit into
Awesome-Embedded-Learning-Studio:mainfrom
YukunJ:fix-bug
Open

Fix: 2 typos in variant section#33
YukunJ wants to merge 1 commit into
Awesome-Embedded-Learning-Studio:mainfrom
YukunJ:fix-bug

Conversation

@YukunJ
Copy link
Copy Markdown
Contributor

@YukunJ YukunJ commented Jun 5, 2026

Brief: Fix 2 typos in std::variant section.

  1. int type usually takes 4 bytes on 64 bit architectures.
  2. std::variant<int, std::string> would take 8 (sizeof(size_t)) + 32 (max(sizeof(int), sizeof(std::string)) storage space then.

Please refer to this for reproduction: https://godbolt.org/z/sbvEMW56G

@Charliechen114514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant