Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-13 09:42:25

Mat Marcus <mmarcus_at_[hidden]> writes:

> With the Metrowerks Macintosh CFM targeted compilers call-by-const&
> can sometimes result in worse code. The issue involves passing actaul
> constants to a function by value versus by const&. If, say, an integer
> constant is passed by value the compiler generates reasonable code
> (see line 0000000C: in the CallByVal disassembly below). But in the
> pass by const& case the compiler decides that it has to add an entry
> to for the constant kNumbeOner the TOC (think of it as global data
> area). So we pay for at least an extra TOC entry (space +
> initialization code). Perhaps the compiler is trying to be "friendly"
> to folks who might cast-away-const? In any case, we actually had to
> clean up a bunch of code that suffered from this bloat recently.

Can you say "boost::call_traits"?

right-tool-for-the-job-ly y'rs,

           David Abrahams * Boost Consulting
dave_at_[hidden] *

Boost list run by bdawes at, gregod at, cpdaniel at, john at