|
Boost : |
From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-06-11 07:42:34
"Peder Holt" <peder.holt_at_[hidden]> wrote
> As a user of typeof, I would certainly find this very useful. It
> allows the programmer to take evasive action if the typeof operation
> fails, by finding a suitable type in another way.
Well, as the discussion about result_of shows, it might make sense.
Although, I think, for 99% of uses one just wants the compiler to show which
types need to be registered.
> #1 would not help me here.
> #2, on the other hand, allows me check if the type 'returned' by
> typeof is not_registered. If it is, one can programatically work
> around it.
>
> my suggestion would yield #2
OK, agreed.
> Another useful feature, would be to detect if an expression is too
complex.
> If an expression has a complexity>BOOST_TYPEOF_LIMIT_SIZE, typeof
> should 'return' boost::type_of::type_too_complex or similar.
>
> This can be achieved in a similar way to what I suggested earlier.
Right.
Let's just say it can be done if there is a specific request for this. I
would not like to add any features that are not going to be used.
Regards,
Arkadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk