Boost logo

Boost :

From: Robert Kawulak (kawulak_at_[hidden])
Date: 2007-08-30 22:11:45

> From: Neal Becker
> I want to use this like logging - where I can
> switch it off at compile time and make the overhead negligible.

I wrote a simple test function:

        int test()
            bounded_int<int, -3, 7>::type b(5);
            b -= 1;
            return b;

I compiled it with gcc 4.01, optimisations turned on. I had to add explicit
'inline' to several functions, and then the assembler output was as follows:

                pushl %ebp
                movl $5, %eax
                movl %esp, %ebp
                popl %ebp

I dare to say it couldn't be optimised more now... ;-)

Best regards,

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