|
Boost : |
From: Goran Mitrovic (gmit_at_[hidden])
Date: 2004-08-24 15:51:42
Daniel Wallin <dalwan01 <at> student.umu.se> writes:
> Goran Mitrovic wrote:
> > I've got a question.
> >
> > Is a compile-time variables concept known?
>
> Yes, but AFAIK it can't be done in standard C++. I guess you mean
> something along the lines of this hack, which takes advantage of a
> common compiler bug which will incorrectly find the check() and value()
> overloads.. Works on gcc and maybe something else, but it's not
> portable.
...
Unfortunatelly, yes - my implementation is much, much nicer, but a similar
concept is used. :(
However, I've just tried with latest Comeau compiler (maybe I shouldn't
believe them it's 100% standard compliant), with strict compiling mode turned
on - and mine implementation works there!
What's the problem with overloading (one imaginable would be that compiler
finds the best possible match, while the standard (maybe; I don't have it)
says that a first available should be used)?
Thanks and sorry if I'm boring or vastly offtopic.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk