|
|
|
|
|
by OptionOfT
712 days ago
|
|
T::T() = default;
> You’d expect the printed result to be 0, right? You poor thing. Alas—it will be garbage. Some things can never be perfect, it seems. Here’s a relevant excerpt from our description of value-initialization:Link: https://consteval.ca/2024/07/03/initialization/#:~:text=You%... That actually isn't that weird, because it would allow any consumer of your library to change how your library behaves. |
|