Opened 11 years ago

Closed 10 years ago

#6687 closed Bugs (wontfix)

boost.geometry and Qt macros Q_OBJECT are incompatible

Reported by: andrew.naplavkov@… 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)

mywidget.h (222 bytes ) - added by andrew.naplavkov@… 11 years ago.

Download all attachments as: .zip

Change History (7)

by andrew.naplavkov@…, 11 years ago

Attachment: mywidget.h added

comment:1 by Barend Gehrels, 11 years ago

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.

comment:2 by andrew.naplavkov@…, 11 years ago

May be it's Boost.MPL problem - this is a harder for me too. I use pimpl as workaround.

comment:3 by Ivan, 10 years ago

confronted the same problem

comment:4 by anonymous, 10 years ago

Same error!

comment:5 by Barend Gehrels, 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 Barend Gehrels, 10 years ago

Resolution: wontfix
Status: newclosed

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

Note: See TracTickets for help on using tickets.