On Mon, 30 Nov 2009 07:10:41 +0100, Walter Bright <newshou...@digitalmars.com> wrote:

Walter Bright wrote:
And here it is (called opDispatch, Michel Fortin's suggestion):
http://www.dsource.org/projects/dmd/changeset?new=trunk%2f...@268&old=trunk%2f...@267

Fixed reported problems with it:

http://www.dsource.org/projects/dmd/changeset?old_path=trunk&old=269&new_path=trunk&new=270

This still does not compile:

struct foo {
        void opDispatch( string name, T )( T value ) {
        }
}

void main( ) {
        foo f;
        f.bar( 3.14 );
}

test.d(10): Error: template instance opDispatch!("bar") does not match template
declaration opDispatch(string name,T)

--
Simen

Reply via email to