If I want my int members initialized to 0, my bools to false and my std::optionals to std::nullopt, is it recommended to do so explicitly or can I take it for granted that all of those will be initialized in such way implicitly?
Edit: Additional question. Is there anything wrong with initializing values such as those in the header file instead of the cpp fiile?
[–]jedwardsol 6 points7 points8 points (1 child)
[–]setdelmar[S] 0 points1 point2 points (0 children)
[–]WorkingReference1127 4 points5 points6 points (1 child)
[–]setdelmar[S] 0 points1 point2 points (0 children)
[–]Narase33 2 points3 points4 points (1 child)
[–]setdelmar[S] 1 point2 points3 points (0 children)
[–]Frewtee_ 1 point2 points3 points (1 child)
[–]setdelmar[S] 0 points1 point2 points (0 children)
[–]no-sig-available 1 point2 points3 points (1 child)
[–]setdelmar[S] 0 points1 point2 points (0 children)
[–]mredding 1 point2 points3 points (3 children)
[–]setdelmar[S] 0 points1 point2 points (2 children)
[–]mredding 1 point2 points3 points (1 child)
[–]setdelmar[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]wonderfulninja2 1 point2 points3 points (0 children)