You can wrap them too. There’s no harm to allow no wrapping when there isn’t ambiguity so the few builtin types allows this. In general your type may want a different behavior so that’s not there by default. No one stops you from implementing it for your type though if that’s the only way your type should be written.
yuyichao
6
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Write struct into binary file and read it back | 15 | 688 | July 17, 2025 | |
| Write method for object | 8 | 645 | June 15, 2021 | |
| Overload write? | 1 | 384 | August 14, 2019 | |
| Reading/Writing struct instance to file as binary | 7 | 2702 | July 2, 2021 | |
| Importing a binary file to a struct | 3 | 1045 | November 5, 2020 |