`ref T` should be a type!!

Atila Neves atila.neves at gmail.com
Tue Apr 2 01:03:10 UTC 2019


On Tuesday, 2 April 2019 at 00:00:34 UTC, Rubn wrote:
> On Monday, 1 April 2019 at 20:51:44 UTC, Walter Bright wrote:
>> On 4/1/2019 1:00 PM, Rubn wrote:
>>> Arrays in C++ are just pointers.
>>
>> No, they're not.
>
> Yes they are. The only time an array exists in C++ is (oddly) 
> only when you pass it by reference :). Otherwise every 
> operation you do on array, any time you pass an array to a 
> function that isn't a reference it is just a pointer. This is 
> why buffer overflows exist in C++, because an is literally just 
> a pointer -- it doesn't even know it's own size! How can you 
> call that an array?

Every word in this paragraph is wrong, including "the", "yes", 
and "it".


More information about the Digitalmars-d mailing list