Boost C++ Libraries: Ticket #12331: BOOST_FUSION_ADAPT_STRUCT doesn't work with empty struct on Visual Studio https://svn.boost.org/trac10/ticket/12331 <p> The following code works fine on GCC and Clang: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/fusion/adapted/struct/adapt_struct.hpp&gt;</span><span class="cp"></span> <span class="k">class</span> <span class="nc">EmptyStruct</span> <span class="p">{};</span> <span class="n">BOOST_FUSION_ADAPT_STRUCT</span><span class="p">(</span><span class="n">EmptyStruct</span><span class="p">);</span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{}</span> </pre></div></div><p> But on Visual Studio 2015 Update 3, it gives the following error: </p> <pre class="wiki">error C2220: warning treated as error - no 'object' file generated warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY' warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_EMPTY_SIZE </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12331 Trac 1.4.3 Kohei Takahashi Sat, 23 Jul 2016 09:17:42 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12331#comment:1 https://svn.boost.org/trac10/ticket/12331#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">duplicate</span> </li> </ul> <p> dup of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6592" title="#6592: Feature Requests: BOOST_FUSION_ADAPT/DEFINE: allow empty structures (closed: fixed)">#6592</a> </p> Ticket Edouard Thu, 28 Jul 2016 12:29:17 GMT <link>https://svn.boost.org/trac10/ticket/12331#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12331#comment:2</guid> <description> <p> It's not a duplicate, the feature has been added, it's just not supported in VS. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Thu, 28 Jul 2016 12:32:00 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/12331#comment:3 https://svn.boost.org/trac10/ticket/12331#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">duplicate</span> </li> </ul> Ticket Joel de Guzman Thu, 28 Jul 2016 12:33:00 GMT <link>https://svn.boost.org/trac10/ticket/12331#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12331#comment:4</guid> <description> <p> Reopened this one. This is specific to VS. I'm not so sure about the other one. <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6592" title="#6592: Feature Requests: BOOST_FUSION_ADAPT/DEFINE: allow empty structures (closed: fixed)">#6592</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Fri, 29 Jul 2016 01:01:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12331#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12331#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/12331#comment:2" title="Comment 2">Edouard</a>: </p> <blockquote class="citation"> <p> It's not a duplicate, the feature has been added, it's just not supported in VS. </p> </blockquote> <p> If so, should <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6592" title="#6592: Feature Requests: BOOST_FUSION_ADAPT/DEFINE: allow empty structures (closed: fixed)">#6592</a> be closed, right? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Fri, 29 Jul 2016 01:04:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12331#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12331#comment:6</guid> <description> <p> Yes, I think <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6592" title="#6592: Feature Requests: BOOST_FUSION_ADAPT/DEFINE: allow empty structures (closed: fixed)">#6592</a> is obsolete. </p> </description> <category>Ticket</category> </item> <item> <author>Benoit Blanchon <benoit@…></author> <pubDate>Fri, 29 Jul 2016 08:00:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12331#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12331#comment:7</guid> <description> <p> Well, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6592" title="#6592: Feature Requests: BOOST_FUSION_ADAPT/DEFINE: allow empty structures (closed: fixed)">#6592</a> is only partially obsolete. </p> <p> Even if BOOST_FUSION_ADAPT_STRUCT accepts an empty struct, BOOST_FUSION_DEFINE_STRUCT still doesn't. </p> </description> <category>Ticket</category> </item> </channel> </rss>