digitalmars.D.learn - Casting classes
- Jonathan Marler (6/6) Jul 01 2016 How do casts work under the hood? I'm mostly interested in what
- Basile B. (6/12) Jul 01 2016 https://github.com/dlang/druntime/blob/master/src/rt/cast_.d#L62
- Basile B. (2/11) Jul 01 2016 damn, where is the "edit" button ^^
- Jonathan Marler (4/17) Jul 01 2016 You pointed me right to it! Thanks this is exactly what I was
How do casts work under the hood? I'm mostly interested in what needs to be done in order to cast a class to a subclass. I'd like to know what is being done to determine whether the object is a valid instance of the cast type. If the code is implemented in the druntime, a pointer to where it lives would suffice. Thanks in advance for any help.
Jul 01 2016
On Friday, 1 July 2016 at 15:45:35 UTC, Jonathan Marler wrote:How do casts work under the hood? I'm mostly interested in what needs to be done in order to cast a class to a subclass. I'd like to know what is being done to determine whether the object is a valid instance of the cast type. If the code is implemented in the druntime, a pointer to where it lives would suffice. Thanks in advance for any help.https://github.com/dlang/druntime/blob/master/src/rt/cast_.d#L62 niptick: on github search then rather look at the results in the issues because in the code you'll get a lot of noise due to the unittests or like in this case because if the keywords. https://github.com/dlang/druntime/search?q=cast&type=Issues&utf8=%E2%9C%93
Jul 01 2016
On Friday, 1 July 2016 at 17:32:26 UTC, Basile B. wrote:On Friday, 1 July 2016 at 15:45:35 UTC, Jonathan Marler wrote:damn, where is the "edit" button ^^How do casts work under the hood? I'm mostly interested in what needs to be done in order to cast a class to a subclass. I'd like to know what is being done to determine whether the object is a valid instance of the cast type. If the code is implemented in the druntime, a pointer to where it lives would suffice. Thanks in advance for any help.https://github.com/dlang/druntime/blob/master/src/rt/cast_.d#L62 niptick
Jul 01 2016
On Friday, 1 July 2016 at 17:34:25 UTC, Basile B. wrote:On Friday, 1 July 2016 at 17:32:26 UTC, Basile B. wrote:You pointed me right to it! Thanks this is exactly what I was looking for. I figured it was doing something like this but now I have confirmation.On Friday, 1 July 2016 at 15:45:35 UTC, Jonathan Marler wrote:damn, where is the "edit" button ^^How do casts work under the hood? I'm mostly interested in what needs to be done in order to cast a class to a subclass. I'd like to know what is being done to determine whether the object is a valid instance of the cast type. If the code is implemented in the druntime, a pointer to where it lives would suffice. Thanks in advance for any help.https://github.com/dlang/druntime/blob/master/src/rt/cast_.d#L62 niptick
Jul 01 2016