patch: <bits/localefwd.h> with -fno-exceptions

Ross Smith ross.s@ihug.co.nz
Fri Jan 19 14:24:00 GMT 2001


Mark Mitchell wrote:
> 
> There are other approaches.  For example,
> 
>   #if NO_EXCEPTIONS
>   #define try if (true)
>   #define catch(x) if (false)
>   #endif
> 
> This works because try and catch blocks are always enclosed in
> braces.

Why bother with the "if (true)"? If you simply "#define try" (i.e. try
-> empty string), the try block becomes a plain brace-enclosed block,
which should DTRT.

-- 
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
          "Normally he was insane, but he had lucid moments
          when he was merely stupid."     -- Heinrich Heine


More information about the Libstdc++ mailing list