El dimecres, 23 de novembre de 2016, a les 9:00:10 CET, Ander Pijoan va
escriure:
> So would it be to hamrfull to add at least this four operators? At the
> moment just allowing same Unit values. You mentioned that using Q_ASSERT is
> not a good idea, maybe there is another way of ensuring they ha
So would it be to hamrfull to add at least this four operators? At the
moment just allowing same Unit values. You mentioned that using Q_ASSERT is
not a good idea, maybe there is another way of ensuring they have the same
unit.
Value operator +(const Value &other) {
Q_ASSERT( this->unit() == other
I wasn't expecting to have different Units operations and conversion at
math operation.
Just same Unit category math operations, now it is no possible to sum or
subtract two VALUES whatever their unit is because the operator is not
overloaded. Just to be able to do "10m" + "20m" which is not possi
El dilluns, 21 de novembre de 2016, a les 18:00:18 CET, Christoph Feck va
escriure:
> On 21.11.2016 08:27, Ander Pijoan wrote:
> > Value operator +(const Value &other)
> > {
> >
> > Q_ASSERT( unit() == other.unit() );
> > return Value( number() + other.number() , unit() );
> >
> >
El dilluns, 21 de novembre de 2016, a les 8:27:11 CET, Ander Pijoan va
escriure:
> Hi Aleix,
>
> I think at least the most desirable basic feature would be to have the
> math operators overloaded to be able to operate with Values. Something like
>
>
> Value operator +(const Value &other)
> {
>
On 21.11.2016 08:27, Ander Pijoan wrote:
Value operator +(const Value &other)
{
Q_ASSERT( unit() == other.unit() );
return Value( number() + other.number() , unit() );
}
So when adding "3 m" and "40 cm" you want to have an assert (that isn't
compiled into code unless you are in d
On Monday, November 21, 2016 8:27:11 AM CET Ander Pijoan wrote:
> Hi Aleix,
>
> I think at least the most desirable basic feature would be to have the
> math operators overloaded to be able to operate with Values. Something like
>
>
> Value operator +(const Value &other)
> {
> Q_ASSERT( un
Hi Aleix,
I think at least the most desirable basic feature would be to have the
math operators overloaded to be able to operate with Values. Something like
:
Value operator +(const Value &other)
{
Q_ASSERT( unit() == other.unit() );
return Value( number() + other.number() , unit()
On Fri, Nov 18, 2016 at 1:21 PM, Ander Pijoan wrote:
> Hi all,
>
> First of all sorry if this email should be in another list.
>
> I have a small question about summing, subtracting, multiplying... Values.
> I see that the operators have not been overloaded. Should we extend the
> Value class and
Hi all,
First of all sorry if this email should be in another list.
I have a small question about summing, subtracting, multiplying... Values.
I see that the operators have not been overloaded. Should we extend the
Value class and overload them or there is a more straightforward way of
operating
10 matches
Mail list logo