Re: return const and assert
From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: Fri, 20 Feb 2004 02:49:30 GMT
"alexhong2001" <email@example.com> wrote...
> When to return a const, from either a member function of a class or
When returning by value, 'const' really isn't of any use. It's
basically like adding 'const' when passing by value: means almost
> Is assert() only executed in debug mode but skipped in release mode?
Using your terminology, yes.
> don't see much usage of "assert()." Am I missing its importance?
Probably. 'assert' is a debugging tool for code where you don't
want to have a run-time check once you cleaned everything up.