diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-10-27 03:27:05 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-10-27 03:27:05 +0000 |
commit | 10b68e6b5e7d12c7af51b960191e1be9eb788d2e (patch) | |
tree | ccc6375726b9acaf53b1bb67bec81747b0bde223 /src/unitsuite.h | |
parent | 68b8b5136677435a84da7d277e78470ac4a41a64 (diff) | |
download | libbu++-10b68e6b5e7d12c7af51b960191e1be9eb788d2e.tar.gz libbu++-10b68e6b5e7d12c7af51b960191e1be9eb788d2e.tar.bz2 libbu++-10b68e6b5e7d12c7af51b960191e1be9eb788d2e.tar.xz libbu++-10b68e6b5e7d12c7af51b960191e1be9eb788d2e.zip |
Interesting tweak to the variant and optparser classes. In the Variant, it
would always fail if a const char * was passed in, it now converts these
silently to Bu::FStrings, good to know...
Also, the OptParser now uses a Variant for overrides, meaning it doesn't have
to do extra parsing, and the amount of code you have to write may be
significantly reduced. Pretty sweet, overall. There is one downside. For the
moment if you use a non-standard type or object as the target of a parameter
it always needs to have a formatter >> operator defined, even if you override
and the formatter >> operator is never called. Hopefully we can get around
this in the future.
Also, it looks like it should be relatively trivial to create conversion
functions for the variant, they'll just be global template functions that
take two parameters, source type and target type. Should be good times.
Diffstat (limited to 'src/unitsuite.h')
0 files changed, 0 insertions, 0 deletions