Opened 11 years ago
Closed 10 years ago
#6687 closed Bugs (wontfix)
boost.geometry and Qt macros Q_OBJECT are incompatible
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | To Be Determined | Component: | geometry |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | Cc: |
Description
#include <boost/geometry.hpp> and Q_OBJECT in same .h file
C:/projects/boost_1_49_0/boost/mpl/bitand.hpp(24): Parse error at "("
Attachments (1)
Change History (7)
by , 11 years ago
Attachment: | mywidget.h added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
May be it's Boost.MPL problem - this is a harder for me too. I use pimpl as workaround.
comment:5 by , 10 years ago
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.
comment:6 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This is a moc problem. See also this URL: https://bugreports.qt.nokia.com/browse/QTBUG-22829
I got exactly the problem described here. Solutions or workarounds:
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
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
This is a bit harder for me to verify.
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.