From: Mehdi Saada <00120260a@gmail.com>
Subject: Re: no + or - defined for fixed point types in Standard, why ?
Date: Wed, 24 Jan 2018 10:36:51 -0800 (PST)
Date: 2018-01-24T10:36:51-08:00 [thread overview]
Message-ID: <21d0a0b8-8c66-42fb-9d4a-dc9dbbc33521@googlegroups.com> (raw)
In-Reply-To: <aa3b1466-b4f6-4e83-bac7-17dc88d488a7@googlegroups.com>
> It is hard to correctly override the predefined operators where they are directly visible. [...] To (re-)define * or / you will need to write a body that uses Unchecked_Conversion of the proper integer type, or converts both operands to some floating point type.
My gosh, did I stumbled against a language's corner again ? I think I'll stick with the conversion method... But can you elaborate on "directly visible" ? I don't understand. To me either it's visible, either it's not...
Even with the conversion method, the warning about overridding won't go away. Eventhough there's no explicit call on Standard anymore.
> You are trying to do something wonky, and the compiler is telling you that.
I could tell before trying ;-)
next prev parent reply other threads:[~2018-01-24 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 17:03 no + or - defined for fixed point types in Standard, why ? Mehdi Saada
2018-01-24 17:44 ` Robert Eachus
2018-01-24 18:36 ` Mehdi Saada [this message]
2018-01-25 1:09 ` Robert Eachus
2018-01-25 1:31 ` guyclaude.burger
2018-01-25 3:07 ` Robert Eachus
2018-01-25 3:25 ` Randy Brukardt
2018-01-25 13:33 ` Mehdi Saada
2018-01-26 4:34 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox