std.internal.scopebuffer is a nice utility that can be used when developing for betterC.
The following
```
import std.internal.scopebuffer;
extern(C):
void main()
{
ScopeBuffer!char buf;
}
void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow @nogc
{
assert(false, "Out of memory.");
}
```
Compiled with `-betterC -release -O -inline` will error out:
```
/dlang/dmd/linux/bin64/../../src/druntime/import/core/exception.d(540): Error: Cannot use throw statements with -betterC
```
Removing `-inline` makes the error go away.
Comment #1 by github-bugzilla — 2018-11-20T23:05:16Z