[x3_devel] why not static ... def_ in specialized parse_rule?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[x3_devel] why not static ... def_ in specialized parse_rule?

cppljevans
The code here:

https://github.com/boostorg/spirit/blob/x3-devel/include/boost/spirit/home/x3/nonterminal/rule.hpp#L167

recalculates the same const value each time the function is entered.
Why not make this static to avoid the recalculation?

------------------------------------------------------------------------------
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [x3_devel] why not static ... def_ in specialized parse_rule?

Mikael Asplund
If you take a look at the master branch (which is in the released X3), you'll notice that it is...

https://github.com/boostorg/spirit/blob/master/include/boost/spirit/home/x3/nonterminal/rule.hpp#L164

  /Mikael


-----Original Message-----
From: Larry Evans [mailto:[hidden email]]
Sent: Wednesday, August 24, 2016 11:25
To: [hidden email]
Subject: [Spirit-devel] [x3_devel] why not static ... def_ in specialized parse_rule?

The code here:

https://github.com/boostorg/spirit/blob/x3-devel/include/boost/spirit/home/x3/nonterminal/rule.hpp#L167

recalculates the same const value each time the function is entered.
Why not make this static to avoid the recalculation?

------------------------------------------------------------------------------
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel

------------------------------------------------------------------------------
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [x3_devel] why not static ... def_ in specialized parse_rule?

cppljevans
On 08/24/2016 05:47 PM, Mikael Asplund wrote:
> If you take a look at the master branch (which is in the released X3), you'll notice that it is...
>
> https://github.com/boostorg/spirit/blob/master/include/boost/spirit/home/x3/nonterminal/rule.hpp#L164
>
>   /Mikael

So, why does x3-devel no longer do that?  They must have some reason for
the change, unless the change was unintended.

>
>
> -----Original Message-----
> From: Larry Evans [mailto:[hidden email]]
> Sent: Wednesday, August 24, 2016 11:25
> To: [hidden email]
> Subject: [Spirit-devel] [x3_devel] why not static ... def_ in specialized parse_rule?
>
> The code here:
>
> https://github.com/boostorg/spirit/blob/x3-devel/include/boost/spirit/home/x3/nonterminal/rule.hpp#L167
>
> recalculates the same const value each time the function is entered.
> Why not make this static to avoid the recalculation?
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Spirit-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/spirit-devel
>
> ------------------------------------------------------------------------------
>



------------------------------------------------------------------------------
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel