make a nothrow call a throwing function
Jonathan M Davis
jmdavisProg at gmx.com
Thu Feb 7 16:33:22 PST 2013
On Thursday, February 07, 2013 23:14:51 monarch_dodra wrote:
> I was though able to get a function pointer, and cast said
> pointer, at compile time (place it an enum). At that point,
> calling the function via the compile-time known pointer *should*
> be just as efficient as calling the function directly. I'll need
> to check the assembly.
Hmmm. I wouldn't have thought that you could get the function pointer at
compiler time. Regardless, you lose any possibility of inlining the function
call, which is the main problem AFAIK, though I don't know if they would have
been an option in the case of dup anyway.
> I think the conclusion I came to though is to bite the bullet,
> and not worry too about it.
Well, long term, this should be solved by dup actually being nothrow when it
can't throw.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list