我試圖附加一個函數對象,用於對模板化類的銷燬進行調用。但是,我似乎無法將函數對象作爲臨時對象傳遞。我得到的警告(如果註釋行xi.data = 5;): warning C4930: 'X<T> xi2(writer (__cdecl *)(void))':
prototyped function not called (was a variable definition intended
我想使用對象實例爲模塊/函子,更多或更少的,如下所示: abstract class Lattice[E] extends Set[E] {
val minimum: E
val maximum: E
def meet(x: E, y: E): E
def join(x: E, y: E): E
def neg(x: E): E
}
clas