Julia Programming Language
Fallback Constructor for All Subtypes
General Usage
werpers
December 22, 2022, 4:59pm
2
Perhaps this is what you want:
function (T::Type{<:AbstractThing})() T("blah") end
3 Likes
show post in topic
Related topics
Topic
Replies
Views
Activity
Subtypes or parametric types to define constructor-dependent functions
General Usage
type
,
parametric-types
6
1050
July 25, 2019
How to refactor code which is using the fallback constructor
General Usage
2
450
May 11, 2018
Correct usage of type-dependent constructors
General Usage
struct
7
105
May 2, 2025
How to define an overload constructor across an abstract type?
General Usage
question
1
146
May 22, 2024
Default constructor for any type?
General Usage
question
94
1767
February 29, 2024