Boost C++ Libraries: Ticket #5281: alloc_func typedef in rapidxml.hpp, VC++ compiler can't lookup https://svn.boost.org/trac10/ticket/5281 <p> In VC8~VC10, a compilation error will be occurred when you declare "alloc_func" that can lookup from "boost::property_tree::detail::rapidxml" namespace before including &lt;boost/property_tree/detail/rapidxml.hpp&gt;. </p> <pre class="wiki">struct alloc_func; #include &lt;boost/property_tree/detail/rapidxml.hpp&gt; </pre><pre class="wiki">error C2226: syntax error : unexpected type 'alloc_func' A syntax error occurs before or in the type specifier. </pre><p> Because the VC++ compiler cause unexpectedly lookup about alloc_func typedef in rapidxml.hpp. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5281 Trac 1.4.3 bolero.murakami+cpp@… Tue, 08 Mar 2011 13:42:24 GMT attachment set https://svn.boost.org/trac10/ticket/5281 https://svn.boost.org/trac10/ticket/5281 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">rapidxml.patch</span> </li> </ul> Ticket niels_dekker Thu, 28 Apr 2011 12:37:33 GMT <link>https://svn.boost.org/trac10/ticket/5281#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5281#comment:1</guid> <description> <p> FYI, I also encountered this problem. One of the projects I'm involved with uses both &lt;boost/property_tree/xml_parser.hpp&gt; and the toolkit <a class="ext-link" href="http://www.itk.org"><span class="icon">​</span>ITK</a>, which includes a file named &lt;zlib.h&gt;. This &lt;zlib.h&gt; has a alloc_func typedef which appears to conflict with the one in xml_parser.hpp. So I would very much appreciate if this issue would be fixed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sebastian Redl</dc:creator> <pubDate>Mon, 16 May 2011 22:05:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5281#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5281#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/72003" title="Try to work around MSVC name lookup bug. See bug 5281.">[72003]</a>) Try to work around MSVC name lookup bug. See bug 5281. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sebastian Redl</dc:creator> <pubDate>Mon, 16 May 2011 22:05:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5281#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5281#comment:3</guid> <description> <p> I've tried a workaround. Can you please test it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 01 Oct 2011 17:45:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5281#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5281#comment:4</guid> <description> <p> The work around works for me. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sebastian Redl</dc:creator> <pubDate>Fri, 13 Jan 2012 12:20:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5281#comment:5 https://svn.boost.org/trac10/ticket/5281#comment:5 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76447" title="Merge [72000],[72001],[72003], [74691], [75587], [75589], [75590], and ...">[76447]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/72000" title="Make PTree XML writer escape attribute values.">[72000]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/72001" title="Allow nuls in PTree XML. See bug 5259.">[72001]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/72003" title="Try to work around MSVC name lookup bug. See bug 5281.">[72003]</a>, <a class="changeset" href="https://svn.boost.org/trac10/changeset/74691" title="Use boost::swap for swapping PTree's data member. Makes it possible to ...">[74691]</a>, <a class="changeset" href="https://svn.boost.org/trac10/changeset/75587" title="Give string_path an accessor for the separator.">[75587]</a>, <a class="changeset" href="https://svn.boost.org/trac10/changeset/75589" title="Make ptree_bad_data::data() and ptree_bad_path::path() const. See bug ...">[75589]</a>, <a class="changeset" href="https://svn.boost.org/trac10/changeset/75590" title="Suppress the MSVC insecure warning when compiling tests. Make ...">[75590]</a>, and <a class="changeset" href="https://svn.boost.org/trac10/changeset/75593" title="Improve pair member bug workaround: should now hopefully work with ...">[75593]</a> from trunk. Fixes bug 4840. Fixes bug 5259. Fixes bug 5281, I think. Fixes bug 5944. Fixes bug 5757. Fixes bug 5710. Fixes bug 5307, I think. </p> Ticket trent.waddington@… Sun, 08 Jul 2012 01:54:46 GMT <link>https://svn.boost.org/trac10/ticket/5281#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5281#comment:6</guid> <description> <p> Alternate fix: change all occurrences of alloc_func to alloc_func1. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 05 Aug 2012 22:27:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5281#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5281#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/5281#comment:6" title="Comment 6">trent.waddington@…</a>: </p> <blockquote class="citation"> <p> Alternate fix: change all occurrences of alloc_func to alloc_func1. </p> </blockquote> <p> This worked for me in windows. Have not yet tested if the fix works in other OS. </p> </description> <category>Ticket</category> </item> </channel> </rss>