Class info on interfaces
Jacob Carlborg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 28 12:35:24 PDT 2015
On 2015-08-28 16:31, Adam D. Ruppe wrote:
> Not fully, no, but you might be able to reflect into the methods and see
> what kind of linkage they have.
>
> http://dlang.org/phobos/std_traits.html#functionLinkage
That might work.
> However, you can't do anything with an interface that isn't in there
> anyway without a runtime cast, so you might want to just skip any
> compile time guesses and just go with the runtime check.
Well, this would be for my serialization library. If the static type
it's not a native D interface I don't have way to recreate the instance
when deserializing, at least not with the default deserialization process.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list