help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ Compile Problems Using Multiple Overloaded Operators in a Matrix


From: Larry I Smith
Subject: Re: g++ Compile Problems Using Multiple Overloaded Operators in a Matrix Class
Date: Sat, 15 Jan 2005 17:08:30 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220

Ulrich Eckhardt wrote:
Larry I Smith wrote:
Ulrich Eckhardt wrote:
Lastly a thing where I differ from Larry: there is no need to check a
pointer before invoking delete[] on it, as he does in the
This is a portability issue.
Sadly, to this day, some compilers/libs on some OS'es will fault
if a NULL value is passed to delete/delete[].

/me looks around and sees GCC.

Could you give examples, so I can avoid them?

thanks

Uli


Wow, I didn't mean to offend anyone.

In my 'day job' we have to deal with code portability across
dozens of platforms (MSVC 4/5/6, various Sun Forte versions,
various HP/UX compilers, various Borland compilers, etc, etc).
The 'NULL check before delete' and 'friend for operator+()'
are just two of many portability issues we have to deal with.
Sorry, these portability constructs are so in-grained in my
training that I just always use them...

Regards,
Larry

--
Anti-spam address, change each 'X' to '.' to reply directly.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]