Boost logo

Boost Users :

From: Arnaldur Gylfason (arnaldur.gylfason_at_[hidden])
Date: 2006-10-20 05:13:29


>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.

Yes I have come to the same conclusion. Thanks for your response.
Some kind of eval would come in handy. Dynamic typing as in Python would
also be a blessing here.
Of course it would be possible to solve this by calling Python but it
would be an expensive function call!

cheers

Arnaldur



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