[Boost-bugs] [Boost C++ Libraries] #12388: useless static const generated by BOOST_SPIRIT_DEFINE_?

Subject: [Boost-bugs] [Boost C++ Libraries] #12388: useless static const generated by BOOST_SPIRIT_DEFINE_?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-08-10 17:16:54


#12388: useless static const generated by BOOST_SPIRIT_DEFINE_?
--------------------------+------------------------------
 Reporter: cppljevans@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.61.0
 Severity: Cosmetic | Keywords:
--------------------------+------------------------------
 The purpose of creating of a static variable here:

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

 is not apparent. Why wouldn't the following replacement:

   auto const& def_=BOOST_PP_CAT(rule_name, _def);

 work just as well. If not, some source code comments explaining the need
 for
 creating a new instance of a struct would help maintainers and people
 trying to understand the code.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12388>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC