julia> function foo{T}() where T
1
end
ERROR: UndefVarError: foo not defined
Stacktrace:
[1] top-level scope at none:0
这个泛型函数必须要有泛型参数才能生成,可是我不想有参数我应该怎么声明这个函数??
julia> function foo{T}() where T
1
end
ERROR: UndefVarError: foo not defined
Stacktrace:
[1] top-level scope at none:0
这个泛型函数必须要有泛型参数才能生成,可是我不想有参数我应该怎么声明这个函数??
我好像把泛型结构体的构造函数和泛型函数的声明搞浑了,已经解决了