Re: assert vs. std::logic_error?
On Nov 24, 9:54 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
On Sat, 24 Nov 2007 10:26:45 -0800 (PST), James Kanze wrote:
And I've never seen NDEBUG defined in the invocation line of the
compiler. Only an idiot would do something that stupid. You
define it only when you absolutely need to.
Visual C++ by default defines NDEBUG (/D "NDEBUG") for Release builds
"in the invocation line".
You mean, no doubt, the IDE. VC++ (the command cl) doesn't
define much of anything by default; you need four or five
options just to get it to understand enough C++ to accept the
standard headers.
Of course, defaults don't mean anything. I've never seen a
compiler do anything useful "by default". (I use some 20 or 30
options with g++ or Sun CC. I suspect that I'd need just as
many if I were to do any serious work with VC++.)
And the Visual C++ is not designed for professional development,
but rather to support the hobby programmer.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34