Closed Kojoley closed 3 years ago
Ahh, I forgot that I saw this code in Qi, here it is https://github.com/boostorg/spirit/blob/ac63f8e6b5b258177ada155678547f3c363ee72d/include/boost/spirit/home/qi/detail/alternative_function.hpp#L38 so Qi should have the same issue. The actual commit that introduces that line is https://github.com/boostorg/spirit/commit/97baf5bbe2f7c13996a6b95c8814ac458bfec419
Sadly the commit https://github.com/boostorg/spirit/commit/97baf5bbe2f7c13996a6b95c8814ac458bfec419 did not put a test, and the link http://boost.2283326.n4.nabble.com/Grammar-stopped-compiling-on-more-recent-spirit-version-td3432652.html is dead
Found that post https://sourceforge.net/p/spirit/mailman/message/27322799/, we have the test https://github.com/boostorg/spirit/blob/4ea7e3a7b7abbf60187194a5a3f790e0f6af6579/test/qi/alternative.cpp#L63-L81 https://github.com/boostorg/spirit/blob/4ea7e3a7b7abbf60187194a5a3f790e0f6af6579/test/qi/alternative.cpp#L259-L266 so it did not regress with swapping, that's good.
It seems that confusion in template parameters naming lead to mistakenly swapped types to
is_substitute
. The code to X3 have been brought from Qi with the same mistake, but I do not know how to trigger it in Qi.Fixes #701 Fixes #679