www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Cannot default template parameters with member types of other parameters

reply "Matthew Wilson" <admin.hat stlsoft.dot.org> writes:
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?
Jul 15 2004
parent Cabal <cabalN05P4M myrealbox.com> writes:
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 :)
Jul 16 2004