Opened 10 years ago

Closed 10 years ago

#6880 closed Bugs (fixed)

Boost Polygon c++11 problem

Reported by: free66@… Owned by: Lucanus Simonson
Milestone: To Be Determined Component: polygon
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

In transform_detail.hpp of boost polygon line 257 you write

int this_array[3] = {horizontalDir.to_int(),

verticalDir.to_int(), proximalDir.to_int()};

where horizontalDir is a direction_3d defined in isotropy.hpp and the to_int() function is defined in line 529 as inline unsigned int to_int(void) const { return val_; }

returning an unsigned int. Using the uniform initialization with {} results in narrowing which is imho not allowed in c++11. At least the llvm clang 3.1 compiler complains.

Possible fixes afaik to_int() could return int or array should be defined as unsigned int

Change History (2)

comment:1 by anonymous, 10 years ago

Will be fixed in Boost 1.52.

Andrii Sydorchuk

comment:2 by Lucanus Simonson, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.