Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2004-08-25 12:53:01


Ian McCulloch wrote:

> probably "-model ansi" is sufficient, and IMO absolutely necessary.

That's what I intended to do. Add -model ansi to both the compiler and
linker options. And of course update the documentation.

> IIRC correctly, there are issues with class-scope enumerations
> colliding, and in the past I also had a problem with non-type
> template parameters that I can't remember the details of just now.

I wasn't aware of those.

>
> From the cxx man page:
>
> -model [ansi | arm]
>
> [Tru64] Determines the layout of C++ classes, name mangling, and exception
> handling. On Tru64 UNIX, the default is -model arm; on Linux Alpha, the
> default is -model ansi. The -model arm option is not supported on Linux
> Alpha.
>
> The -model arm option is the default and generates objects that are link
> compatible with all Compaq C++ releases prior to Version 6.3, and with all
> objects compiled using the -model arm option in Compaq C++ Version 6.3 or
> later. Specifying this option defines the macro __MODEL_ARM.
>
> The -model ansi option supports the complete ISO/ANSI C++ specification,
> including distinct name mangling for templates. The ANSI model also reduces
> the size of C++ non-POD class objects. Note that this option generates
> objects that are not compatible with prior releases of Compaq C++, or with
> objects compiled using the -model arm option.
>
> If you specify the -model ansi option, you must recompile your entire
> application, including libraries. Specifying this option defines the macro
> __MODEL_ANSI.

In theory we could even provide workarounds depending on which macro is
defined. IIRC, there are some workarounds to that effect in the python
library. I think those should be wrapped in something like #if using
Compaq C++ and __MODEL_ARM is defined ... #endif.

Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk