|
Boost : |
Subject: Re: [boost] [yap] Review part 2: implementation
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-02-15 16:21:10
AMDG
On 02/14/2018 03:11 PM, Zach Laine via Boost wrote:
> On Tue, Feb 13, 2018 at 4:51 PM, Steven Watanabe via Boost <
> boost_at_[hidden]> wrote:
>
>>
>> 317: in left:
>> kind == expr_kind::expr_ref ||
>> detail::arity_of<kind>() == detail::expr_arity::two,
>> This assertion isn't quite strict enough as it
>> will accept an expr_ref to anything. I think
>> you need a get_kind_after_unwrapping_expr_refs
>> function, as this seems to be needed in quite
>> a few places.
>>
>
> That would provide better locality of error messages. However, you'll
> still get an error, just a call or two down the call stack.
Nope. left does not unwrap references by calling itself
recursively (which would handle the checking correctly).
It calls get, which has much looser checking.
> It's a lot of
> compile-time mechanism to get an improvement, and this slows down all the
> non-error cases. I don't think it's a favorable trade.
>
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk