Boost logo

Boost :

From: Matt Hurd (matthurd_at_[hidden])
Date: 2008-03-20 19:20:54


>On 20/03/2008, Tom Brinkman <reportbase_at_[hidden]> wrote:
> >> Why would one bother to do this.
>
> Good question. Maybe just because they say that you cant.
That's almost a good enough reason for me:-)

It was raised with a mpl vector snippet in April 2005:
http://article.gmane.org/gmane.comp.lib.boost.devel/121612

I think it is useful as then you can do all sorts of compile time
string / packet manipulation for parsing, offset calculations and take
a whole bunch of run time calcs out of the equation with some elegance
and ease the maintenance burden. Plenty of first, follows compile
time parsing you can do from a grammar POV. Interesting foo you could
do for a lexical parser, regex or other kinds of state machine
optimisation. Perfect hashing for strings at compile time...

The main problem is you can't do this without a pre-processing stage
elegantly. There is just no way to support a macro or any other
succinct form of compile time string without a pre-processing stage.
It is just clumsy.

$AUD 0.02,

--Matt.
__cts"matthurd_at_[hidden]"


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