d不能推导get,没必要用&

    auto formdata = (req.method == HTTPMethod.POST) ? req.form : req.query;
    Note note;
    note.topic = formdata.get("form_topic"); 

报错:
Error: template object.get cannot deduce function from argument types !()(DictionaryList!(string, true, 16u, false) delegate() @property ref @safe, string), candidates are:
其实,是你没必要用&req.form,而直接用req.form,就行了.

posted @ 2021-01-14 16:11  zjh6  阅读(11)  评论(0)    收藏  举报  来源