Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-01-07 14:08:01


"Dan W." <danw_at_[hidden]> wrote in message
news:btgrc2$rfs$1_at_sea.gmane.org...
> [...]
> how about...
>
> #define _( expr ) ::boost::spirit::compile_to_cpp( \" expr \" )
>
> _( s = 2 m/s. );
>
> ..and then train spirit to tell 'm' the unit, from 'm the variable, or
> whatever, from the context :) ?

Because now you're adding a lot of runtime parsing that doesn't
exist with other designs, not to mention how insanely hard it could
be to write the parser (which would either have to be passed all
the potential variable addresses, or would have to perhaps scan
the source files itself).

Dave

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003

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