I'm getting several of these since I'm trying to do the same
thing in a few places. Here's a complete error:
path\to\file.d(55): Error: variable
units.unitvalue.opmethod!("sum(in unitvalue value)",
"add(value)").methodtemplate cannot use template to add field to
aggregate 'unitvalue'
Thanks so much for the help! I'm still getting used to D's
compile-time code.
On 25.01.2016 15:51, pineapple wrote:
class unitvalue{
double coefficient;
int[unit] exponents;
unitvalue copy(){
unitvalue value = new unitvalue();
value.coefficient = this.coefficient;
value.exponents = this.exponents.dup;
return value;
On Mon, 25 Jan 2016 14:51:21 +, pineapple wrote:
> I'm getting several of these since I'm trying to do the same thing in a
> few places. Here's a complete error:
>
> path\to\file.d(55): Error: variable
> units.unitvalue.opmethod!("sum(in unitvalue value)",
> "add(value)").methodtemplate