|
Boost : |
From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-10-20 20:05:49
----- Original Message -----
From: "Juan Carlos Arevalo-Baeza" <jcab.lists_at_[hidden]>
> How's that for another reason to keep it? Or even to provide a mechanism, similar to the
proposed "auto" extension, to eliminate the redundancy? I'd propose something like macro functions:
>
> template < typename ParserT, typename SkipperT >
> auto error_skipper_p(ParserT const& parser_, SkipperT const& skipper_)
> = cpp_guard(parser)[skip_error_handler(skipper)];
And closer to Bjarne's proposed auto extension:
template <typename ParserT, typename SkipperT>
auto error_skipper_p(ParserT const& parser, SkipperT const& skipper)
-> cpp_guard(parser)[skip_error_handler(skipper)];
Without the redundant body { ... }. The return expression says it all
in most cases.
--Joel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk