On 10/14/2022 1:07 AM, Andrey Tarasevich wrote:
> On 10/13/2022 8:45 PM, Lynn McGuire wrote:
>> On 10/13/2022 10:11 PM, Chris M. Thomasson wrote:
>>> On 10/13/2022 7:56 PM, Lynn McGuire wrote:
>>>> On 10/12/2022 9:59 PM, Ben Bacarisse wrote:
>>>>> Lynn McGuire <
lynnmc...@gmail.com> writes:
>>>>>
>>>>>> So, I created a new local variable after a goto:
>>>>>>
>>>>>> if (crashed)
>>>>>> goto L99999;
>>>>>>
>>>>>> std::string msg;
>>>>>>
>>>>>> Visual C++ 2015 then informed me that "initialization of 'msg' is
>>>>>> skipped by 'goto L99999'".
>>>>>>
>>>>>> Is this a real thing, no variable with a constructor can be created
>>>>>> after a goto ?
>>>>>
>>>>> You can't have a goto and a matching label that might skip over an
>>>>> initialisation. The same applies to non-constructed POD types too.
>>>>
>>>> Thanks !
>>>>
>>>> What is a POD type ?
>>>
>>>
>>> Plain Old Data. Iirc, there is a way to test for it:
>>>
>>>
https://en.cppreference.com/w/cpp/types/is_pod
>>
>> Thanks !
>>
>> And that method is deprecated already.
>>
>
> It is deprecated because there's no such thing as "POD" in C++ anymore.