Boost C++ Libraries: Ticket #6687: boost.geometry and Qt macros Q_OBJECT are incompatible https://svn.boost.org/trac10/ticket/6687 <p> #include &lt;boost/geometry.hpp&gt; and Q_OBJECT in same .h file </p> <p> C:/projects/boost_1_49_0/boost/mpl/bitand.hpp(24): Parse error at "(" </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6687 Trac 1.4.3 andrew.naplavkov@… Wed, 14 Mar 2012 18:48:50 GMT attachment set https://svn.boost.org/trac10/ticket/6687 https://svn.boost.org/trac10/ticket/6687 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">mywidget.h</span> </li> </ul> Ticket Barend Gehrels Thu, 22 Mar 2012 18:55:34 GMT <link>https://svn.boost.org/trac10/ticket/6687#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6687#comment:1</guid> <description> <p> This is a bit harder for me to verify. </p> <p> Question: are you sure this is an issue of Boost.Geometry? Is it not an issue of Boost.MPL? The error message indicates that direction. </p> </description> <category>Ticket</category> </item> <item> <author>andrew.naplavkov@…</author> <pubDate>Fri, 23 Mar 2012 11:37:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6687#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6687#comment:2</guid> <description> <p> May be it's Boost.MPL problem - this is a harder for me too. I use pimpl as workaround. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ivan</dc:creator> <pubDate>Wed, 22 Aug 2012 20:53:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6687#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6687#comment:3</guid> <description> <p> confronted the same problem </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 29 Oct 2012 15:15:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6687#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6687#comment:4</guid> <description> <p> Same error! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Mon, 29 Oct 2012 19:13:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6687#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6687#comment:5</guid> <description> <p> As said, I doubt if this is a Boost.Geometry problem. I'm using Qt and Boost.Geometry together without problems. Please attach a minimal sample to show this problem, for further investigation. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Barend Gehrels</dc:creator> <pubDate>Fri, 30 Nov 2012 23:22:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6687#comment:6 https://svn.boost.org/trac10/ticket/6687#comment:6 <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">wontfix</span> </li> </ul> <p> This is a moc problem. See also this URL: <a class="ext-link" href="https://bugreports.qt.nokia.com/browse/QTBUG-22829"><span class="icon">​</span>https://bugreports.qt.nokia.com/browse/QTBUG-22829</a> </p> <p> I got exactly the problem described here. Solutions or workarounds: </p> <p> 1) include boost/geometry not in the headerfile, but in the source file 2) define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED, e.g. in your headerfile (before including boost/geometry) or as a define for the compiler </p> <p> I'm closing this now, it is related to the combination of moc/qobject/type_traits or moc/qobject/mpl but as far as I can see it is not related to Boost.Geometry itself </p> Ticket