Skip to content

Commit 74194e4

Browse files
Merge pull request #54 from SciML/myb/con
Overload constructorof on SciMLFunctions
2 parents bdeb418 + be19f06 commit 74194e4

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name = "SciMLBase"
22
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
33
authors = ["Chris Rackauckas <[email protected]> and contributors"]
4-
version = "1.11.4"
4+
version = "1.12.0"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
88
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
9+
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
910
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1011
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1112
IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d"
@@ -21,6 +22,7 @@ TreeViews = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7"
2122
[compat]
2223
ArrayInterface = "2.6, 3.0"
2324
CommonSolve = "0.2"
25+
ConstructionBase = "1"
2426
DocStringExtensions = "0.8"
2527
IteratorInterfaceExtensions = "^0.1, ^1"
2628
RecipesBase = "0.7.0, 0.8, 1.0"

src/SciMLBase.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module SciMLBase
22

3+
using ConstructionBase
34
using RecipesBase, RecursiveArrayTools, Tables, TreeViews
45
using DocStringExtensions
56
using LinearAlgebra

src/scimlfunctions.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,5 +2156,10 @@ for S in [
21562156
@eval begin
21572157
Base.convert(::Type{$S}, x::$S) = x
21582158
Base.convert(::Type{$S{iip}}, x::T) where {T<:$S{iip}} where iip = x
2159+
function ConstructionBase.constructorof(::Type{<:$S{iip}}) where iip
2160+
let IIP = iip
2161+
(args...) -> ODEFunction{IIP, map(typeof, args)...}(args...)
2162+
end
2163+
end
21592164
end
21602165
end

0 commit comments

Comments
 (0)