|
47 | 47 | @inline Dual{T}(value::V, ::Chunk{N}, p::Val{i}) where {T,V<:Real,N,i} = Dual{T}(value, single_seed(Partials{N,V}, p))
|
48 | 48 | @inline Dual(args...) = Dual{Nothing}(args...)
|
49 | 49 |
|
50 |
| -function Dual{T,V,N}(x::Real) where {T,V,N} |
51 |
| - Base.depwarn("Dual{$T,$V,$N}(x::Real) is deprecated, use `convert(Dual{$T,$V,$N}, x)` instead.", :Dual) |
52 |
| - return convert(Dual{T,V,N}, x) |
53 |
| -end |
54 |
| - |
55 |
| -function Dual{T,V}(x::Real) where {T,V} |
56 |
| - Base.depwarn("Dual{$T,$V}(x::Real) is deprecated, use `convert(Dual{$T,$V}, x)` instead.", :Dual) |
57 |
| - return convert(Dual{T,V}, x) |
58 |
| -end |
| 50 | +# we define these special cases so that the "constructor <--> convert" pun holds for `Dual` |
| 51 | +@inline Dual{T,V,N}(x::Real) where {T,V,N} = convert(Dual{T,V,N}, x) |
| 52 | +@inline Dual{T,V}(x::Real) where {T,V} = convert(Dual{T,V}, x) |
59 | 53 |
|
60 | 54 | ##############################
|
61 | 55 | # Utility/Accessor Functions #
|
|
0 commit comments