Opened 3 years ago

Last modified 3 years ago

#11397 new Bugs

Can't compile RawConverter from mpq_rational to double

Reported by: andyplekhanov@… Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

According to documentation I have to create low_level_convert function but compiler (gcc version 4.6.2 (SUSE Linux)) failed to compile it:

error: invalid static_cast from type

I attached test file.

Attachments (1)

test.cpp (4.2 KB) - added by andyplekhanov@… 3 years ago.
Testcase

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by andyplekhanov@…

Attachment: test.cpp added

Testcase

comment:1 Changed 3 years ago by John Maddock

Component: multiprecisiongeometry
Owner: changed from John Maddock to Barend Gehrels

This looks like a Geometry traits class question not a multiprecision one?

BTW I'm not sure if this is relevant, but mpq_rational is static_cast'able to double in C++11 land. It rounds correctly as well which mpq_get_d appears not to.

Note: See TracTickets for help on using tickets.