Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#8806 closed Bugs (invalid)

compilation error for operations on PolygonSet with double numbers

Reported by: Zhengdong Zhang <zhangzdfaing@…> Owned by: Andrii Sydorchuk
Milestone: To Be Determined Component: polygon
Version: Boost 1.54.0 Severity: Problem
Keywords: Polygon, double Cc:

Description

I downloaded "polygon_set_usage.cpp" from the main webpage of Polygon library. I manually replaced all the int type in that file with double. The file is compiled in Linux using the simple command: c++ polygon_set_usage.cpp -o test_polygon. Then the compiler issues a dozen of error messages.

The example file with all int changed to double is attached with this ticket.

Attachments (1)

polygon_set_usage.cpp (1.7 KB ) - added by Zhengdong Zhang <zhangzdfaing@…> 9 years ago.

Download all attachments as: .zip

Change History (5)

by Zhengdong Zhang <zhangzdfaing@…>, 9 years ago

Attachment: polygon_set_usage.cpp added

comment:1 by Andrii Sydorchuk, 9 years ago

Owner: changed from Lucanus Simonson to Andrii Sydorchuk
Status: newassigned

comment:2 by Andrii Sydorchuk, 9 years ago

The file doesn't compile because the return type of the main function is double. Please change it to int.

Here is what I get while compiling the file with clang++: polygon_set_usage.cpp:13:1: error: 'main' must return 'int'

I am going to mark this ticket as invalid.

comment:3 by Andrii Sydorchuk, 9 years ago

Resolution: invalid
Status: assignedclosed

comment:4 by anonymous, 9 years ago

It didn't work with me using v1.49 of boost/polygon. I got compiler errors like shown below:

f:\boost\polygon\polygon_45_set_data.hpp(1502): error C2296: '%' : illegal, left operand has type 'double'

However, this problem seems fixed when using the latest trunk version of boost/polygon.

Note: See TracTickets for help on using tickets.