Boost C++ Libraries: Ticket #10746: Compiler error for valid boost::spirit::qi grammar https://svn.boost.org/trac10/ticket/10746 <p> Due to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8630" title="#8630: Bugs: uuid string generator accepts invalid uuids (closed: fixed)">#8630</a> I wanted to write a uuid parser using boost::spirit::qi. </p> <p> It failed with a compiler error. (Tested on g++ 4.8.2 and clang++ 3.5 on Linux amd64) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10746 Trac 1.4.3 lars.rohwedder@… Tue, 04 Nov 2014 15:13:24 GMT attachment set https://svn.boost.org/trac10/ticket/10746 https://svn.boost.org/trac10/ticket/10746 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">uuidparser.cc</span> </li> </ul> <p> Provokes the compiler error if line 32 is enabled </p> Ticket Joel de Guzman Tue, 04 Nov 2014 15:30:49 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10746#comment:1 https://svn.boost.org/trac10/ticket/10746#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> It's not a bug. You hit the limits. You can adjust phoenix limits, but I suggest writing a better grammar without semantic actions. It can be done. Go ask the mailing list: <a class="ext-link" href="https://lists.sourceforge.net/lists/listinfo/spirit-general"><span class="icon">​</span>https://lists.sourceforge.net/lists/listinfo/spirit-general</a>. </p> <p> I'm closing his one. </p> Ticket anonymous Tue, 04 Nov 2014 16:37:17 GMT <link>https://svn.boost.org/trac10/ticket/10746#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10746#comment:2</guid> <description> <p> So it is a bug in the documentation because I cannot find this limit. :-/ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Tue, 04 Nov 2014 22:27:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10746#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10746#comment:3</guid> <description> <p> Sorry about that. Yes you are probably right, it is a documentation bug. </p> <p> And let me correct myself, it's a fusion limit, not a phoenix limit. Just define #define FUSION_MAX_VECTOR_SIZE 20 before anything else, and you are good. </p> <p> This limit is documented here: <a href="http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/vector.html">http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/vector.html</a> </p> <p> This should probably be linked to in Spirit. Feel free to issue another ticket, or better yet, submit a doc patch/PR. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 05 Nov 2014 09:08:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10746#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10746#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10746#comment:3" title="Comment 3">djowel</a>: </p> <blockquote class="citation"> <p> And let me correct myself, it's a fusion limit, not a phoenix limit. Just define #define FUSION_MAX_VECTOR_SIZE 20 before anything else, and you are good. </p> </blockquote> <p> Okay, thanks for you fast answer. I try to circumvent the limit and hope for a boost version that supports real variadic templates so such limits will vanish. :-) </p> <blockquote class="citation"> <p> This limit is documented here: <a href="http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/vector.html">http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/vector.html</a> </p> </blockquote> <p> I never heard of "fusion" before (except in the compiler error message) so I didn't know of such limits. </p> <blockquote class="citation"> <p> This should probably be linked to in Spirit. Feel free to issue another ticket, or better yet, submit a doc patch/PR. </p> </blockquote> <p> Done: <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/10752" title="#10752: Bugs: Fusion limit is not mentioned in Spirit documentation (closed: fixed)">#10752</a> :-) </p> <p> Lars R. </p> </description> <category>Ticket</category> </item> </channel> </rss>