|
Boost Users : |
Subject: Re: [Boost-users] [Proto] implementing an computer algebrasystemwith proto
From: Dave Jenkins (david_at_[hidden])
Date: 2009-01-28 10:55:30
"Eric Niebler" <eric_at_[hidden]> wrote in message
news:49807DB5.2080307_at_boost-consulting.com...
> You're passing an expression to a grammar to be evaluated with its
> transforms. That expression must match the grammar. It's undefined
> behavior if it doesn't, and in this case, it doesn't. "Performing the
> transform" falls withing UB.
>
> It would be possible to add a compile-time check to all grammars function
> call operators to catch this error, but that comes with a compile-time
> cost.
I think it would be a useful check. Could you either
(1) always check in proto::exact
(2) check when a compile time flag is defined
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