#8806 closed Bugs (invalid)
compilation error for operations on PolygonSet with double numbers
Reported by: | 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)
Change History (5)
by , 9 years ago
Attachment: | polygon_set_usage.cpp added |
---|
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:4 by , 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.
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.