Boost C++ Libraries: Ticket #9468: Missing include in boost/spirit/home/qi/string/detail/tst.hpp https://svn.boost.org/trac10/ticket/9468 <p> boost 1.52 on FreeBSD 10.0. </p> <p> boost/spirit/home/qi/string/tst_map.hpp has a forward declaration of struct tst_pass_through (which is actually declared in boost/spirit/home/qi/string/tst.hpp), however structure's operator() is called in tst_map::find(): </p> <pre class="wiki">return find(first, last, tst_pass_through()); </pre><p> This obviously won't compile due to incomplete type. This was discovered on boost 1.52, but since tst_map.hpp haven't changed since then in boost trunk, the bug still exists and needs fixing. </p> <p> Test program: </p> <pre class="wiki">#include &lt;boost/spirit/home/qi/string/tst_map.hpp&gt; int main() { boost::spirit::qi::tst_map&lt;char, int&gt; map; int* x; map.find(x, x); return 0; } </pre><p> clang output: </p> <pre class="wiki">In file included from test.cc:1: /usr/local/include/boost/spirit/home/qi/string/tst_map.hpp:74:38: error: invalid use of incomplete type 'boost::spirit::qi::tst_pass_through' return find(first, last, tst_pass_through()); ^~~~~~~~~~~~~~~~~~ /usr/local/include/boost/spirit/home/qi/string/tst_map.hpp:20:12: note: forward declaration of 'boost::spirit::qi::tst_pass_through' struct tst_pass_through; // declared in tst.hpp ^ 1 error generated. </pre><p> gcc output: </p> <pre class="wiki">In file included from test.cc:1:0: /usr/local/include/boost/spirit/home/qi/string/tst_map.hpp: In instantiation of 'T* boost::spirit::qi::tst_map&lt;Char, T&gt;::find(Iterator&amp;, Iterator) const [with Iterator = int*; Char = char; T = int]': test.cc:6:15: required from here /usr/local/include/boost/spirit/home/qi/string/tst_map.hpp:74:56: error: invalid use of incomplete type 'struct boost::spirit::qi::tst_pass_through' return find(first, last, tst_pass_through()); ^ /usr/local/include/boost/spirit/home/qi/string/tst_map.hpp:20:12: error: forward declaration of 'struct boost::spirit::qi::tst_pass_through' struct tst_pass_through; // declared in tst.hpp ^ </pre><p> Patch is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9468 Trac 1.4.3 amdmi3@… Wed, 04 Dec 2013 00:58:17 GMT attachment set https://svn.boost.org/trac10/ticket/9468 https://svn.boost.org/trac10/ticket/9468 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">tst_map.hpp.patch</span> </li> </ul> Ticket anonymous Sun, 18 Oct 2015 14:49:20 GMT <link>https://svn.boost.org/trac10/ticket/9468#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9468#comment:1</guid> <description> <p> Still present in Boost 1.55, FreeBSD 10.2 ... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Sun, 18 Oct 2015 23:22:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9468#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9468#comment:2</guid> <description> <p> Could you please issue a Pull Request instead? That way, we can keep track of contributors: </p> <blockquote> <p> <a class="ext-link" href="https://github.com/boostorg/spirit/tree/develop"><span class="icon">​</span>https://github.com/boostorg/spirit/tree/develop</a> </p> </blockquote> <p> make sure you do it against develop. </p> </description> <category>Ticket</category> </item> <item> <author>amdmi3@…</author> <pubDate>Mon, 16 Nov 2015 14:21:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9468#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9468#comment:3</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/spirit/pull/165"><span class="icon">​</span>https://github.com/boostorg/spirit/pull/165</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Mon, 16 Nov 2015 22:27:03 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9468#comment:4 https://svn.boost.org/trac10/ticket/9468#comment:4 <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">fixed</span> </li> </ul> Ticket