Re: Conditionally set nothrow: for a block of code.

2018-05-28 Thread Mike Franklin via Digitalmars-d-learn
On Thursday, 24 May 2018 at 18:51:31 UTC, Mike Franklin wrote: I'm trying to find a way to declare a block of code `nothrow:` when compiling with -betterC, but not `nothrow` when not compiling with -betterC. The solution is needed for this PR:

Re: Conditionally set nothrow: for a block of code.

2018-05-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 24 May 2018 at 18:51:31 UTC, Mike Franklin wrote: I'm trying to find a way to declare a block of code `nothrow:` when compiling with -betterC, but not `nothrow` when not compiling with -betterC. [...] Not one now but, DIP 1012 will allow this as nothrow will become a regular

Re: Conditionally set nothrow: for a block of code.

2018-05-27 Thread Uknown via Digitalmars-d-learn
On Thursday, 24 May 2018 at 18:51:31 UTC, Mike Franklin wrote: I'm trying to find a way to declare a block of code `nothrow:` when compiling with -betterC, but not `nothrow` when not compiling with -betterC. The solution is needed for this PR:

Re: Conditionally set nothrow: for a block of code.

2018-05-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/24/18 2:51 PM, Mike Franklin wrote: Given that the PR above is for object.d, I can't turn the entire object.d source file into a string and conditionally mix that in.  Does anyone have a solution to this? My recommendation would have been the last one, but if that doesn't work, I don't

Conditionally set nothrow: for a block of code.

2018-05-24 Thread Mike Franklin via Digitalmars-d-learn
I'm trying to find a way to declare a block of code `nothrow:` when compiling with -betterC, but not `nothrow` when not compiling with -betterC. The solution is needed for this PR: https://github.com/dlang/druntime/pull/2184/files#r188627707 Attempt #1 -- void test() { }