Boost logo

Boost Users :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-10-19 19:11:18


"Arnaldur Gylfason" <arnaldur.gylfason_at_[hidden]> wrote

>Let's say I have to parse "(_1 + _2)*_1" and "(_1/_2)*_1". I only get these
>command strings at runtime so I don't know the expressions at compile time.
>I have to parse the strings and gradually build the lambda expression.

I think you are trying to achieve an impossible thing. Compiler is the one
to
create the types. You can control the compiler, so that it creates the
types
based on a non-trivial algorithm, but all of this should be done at compile
time,
and based on compile-time input: types and constants hardcoded into your
program.
By the runtime it's over -- you can't create the types based on the runtime
string value.
The typeof solves the problem because it works at compile time.

Regards,
Arkadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net