August 02, 2003 alias in templates | ||||
---|---|---|---|---|
| ||||
has someone already spotted that alias effect templates template L8Interface( T, I : IID ) { class obj { T cast_with( IID* riid, Object o ) { if ( *riid == I ) { return (T)o; } return null; } } } instance L8Interface( IUnknown, IID_IUnknown ).obj L8_IUnknown; causes the error instance L8Interface(IUnknown ,IID_IUnknown) does not match any template declaration strangely instance L8Interface( IUnknown, &IID_IUnknown ).obj L8_IUnknown; causes the error instance L8Interface(IUnknown ,#IID_IUnknown) does not match any template declaration but template L8Interface( T, I :GUID ) .... works |
Copyright © 1999-2021 by the D Language Foundation