[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: g++ Compile Problems Using Multiple Overloaded Operators in a Matrix
From: |
Ulrich Eckhardt |
Subject: |
Re: g++ Compile Problems Using Multiple Overloaded Operators in a Matrix Class |
Date: |
Sat, 15 Jan 2005 19:40:52 +0100 |
User-agent: |
KNode/0.8.1 |
Larry I Smith wrote:
> 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[].
>
> Wow, I didn't mean to offend anyone.
I wasn't offended, just curious. And I wouldn't have pointed out such
things here, but whatever... *shrugs*
> 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).
Of those, I only know MSVC 6 really good, and that one doesn't require the
check (in turn its 'new' returns null in case of OOM, but that's a
different case...).
Uli
--
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/