|
Boost Users : |
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2006-06-17 11:51:36
Andreas,
> OTOH I like your idea to add a on_warning() pp hook
> function (same should be
> added for #error as well). What do you think, what if
> we use the return
> value of the on_warning() pp hook to decide, whether to
> throw the exception?
> This way we could keep the default behaviour (throwing)
> but you could
> enforce the non-throwing behaviour simply by returning false.
>
>
> I think using the return value form on_warning() or on_hook()
> to decide if an exception should be thrown is an excellent
> idea. That would fit very well with my needs.
I've added two new pp hook functions: found_error_directive() and
found_warning_directive(), both taking the context and the directive
argument token sequence as their arguments. The return vaue is used to
suppress the corresponding exception (true suppresses, false keeps the old
behaviour). I have not updated the docs yet (but will do soon).
The changes are in the CVS::HEAD branch only (I'm not allowed to add new
features to the release branch).
HTH
Regards Hartmut
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