[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with assignment operator

From: Emmanuel Thomé
Subject: Re: Problem with assignment operator
Date: Tue, 11 Jan 2005 21:27:25 +0100
User-agent: Mutt/1.5.4i

On Tue, Jan 11, 2005 at 08:40:21PM +0100, Linus Nordberg wrote:
> The denominator mustn't be negative.  From the fine manual, section
> Rational Number Functions:
> Wether a segfault is a reasonable punishment for not obeying this rule
> or not, I couldn't tell.  Cc to the GMP discussion list.

You're killed by the copy in mpq_set. Not surprising, as input
requirements are not met. period.

The c++ ctor should perhaps call mpq_canonicalize ; sounds reasonable to
me at least.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]