Opened 10 years ago

Closed 10 years ago

#7635 closed Bugs (fixed)

Karma real generators output "inf" when attribute is integral 0

Reported by: K-ballo <kaballo86@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

Karma real generators output "inf" instead of the expected "0.0" when the supplied attribute is an integral 0. This is because the implementation of is_infinite compares the attribute to std::numeric_limits<T>::infinity() without checking std::numeric_limits<T>::has_infinity.

Attachments (2)

karma_real_0.cpp (477 bytes ) - added by K-ballo <kaballo86@…> 10 years ago.
minimal reproducible test
karma_inf.patch (596 bytes ) - added by K-ballo <kaballo86@…> 10 years ago.
patch

Download all attachments as: .zip

Change History (3)

by K-ballo <kaballo86@…>, 10 years ago

Attachment: karma_real_0.cpp added

minimal reproducible test

by K-ballo <kaballo86@…>, 10 years ago

Attachment: karma_inf.patch added

patch

comment:1 by Hartmut Kaiser, 10 years ago

Resolution: fixed
Status: newclosed

(In [81160]) Spirit: fixed #7635: Karma real generators output "inf" when attribute is integral 0

Note: See TracTickets for help on using tickets.