Opened 3 years ago

Last modified 3 years ago

#11315 assigned Bugs

Compilation warnings created by boost::polygon::operators

Reported by: lopresti@… Owned by: Andrii Sydorchuk
Milestone: To Be Determined Component: polygon
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

When I compile bp_warn.cc (attached) with Clang and enable "-Wall -Werror", the compilation fails with "template argument uses unnamed type". See attached "warnings.txt" for complete output.

This took me a little while to track down, since the error occurs on a call to "*" using primitive types (!).

I am not sure this is really a bug in boost::polygon, and I am not sure how to fix it if it is, but I thought I would report it anyway.

Attachments (2)

bp_warn.cc (140 bytes) - added by lopresti@… 3 years ago.
warnings.txt (9.9 KB) - added by lopresti@… 3 years ago.
Output of "clang++ -Wall -Werror -I/path/to/boost-1.58 -S bp_warn.cc"

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by lopresti@…

Attachment: bp_warn.cc added

Changed 3 years ago by lopresti@…

Attachment: warnings.txt added

Output of "clang++ -Wall -Werror -I/path/to/boost-1.58 -S bp_warn.cc"

comment:1 Changed 3 years ago by anonymous

I found this report looking for a similar problem with compiling KiCad? which uses the boost::polygon library. The issue / solution is that using unnamed types in a template argument was illegal using older C++ standard. Using C++0x, it is allowed. So.. you can compile this without warning / error by adding -std=C++0x to the clang++ call.

comment:2 Changed 3 years ago by Andrii Sydorchuk

Owner: changed from Lucanus Simonson to Andrii Sydorchuk
Status: newassigned
Note: See TracTickets for help on using tickets.