July 16, 2004 Cannot default template parameters with member types of other parameters | ||||
---|---|---|---|---|
| ||||
The compiler complains "no property 'value_type' for type 'R'no property 'value_type' for type 'R'" template FilteredNotionalRange(R, V : R.value_type) { class FilteredNotionalRange { . . . }} Is this a bug, or a missing language feature? |
July 16, 2004 Re: Cannot default template parameters with member types of other parameters | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew Wilson | Matthew Wilson wrote:
> The compiler complains "no property 'value_type' for type 'R'no property 'value_type' for type 'R'"
>
> template FilteredNotionalRange(R, V : R.value_type) { class
> FilteredNotionalRange
> {
> . . .
> }}
>
> Is this a bug, or a missing language feature?
That would be specialisation then. Not default?
Bit confusing, but the templates apparently don't follow the rest of D when
specifying defaults.
: == specialisation
= == default
Unless the spec is way out of date with reality and I've been doing this all wrong - no wonder my tests don't work :)
|
Copyright © 1999-2021 by the D Language Foundation