Merge pull request #188 from Geod24/body-do

Replace 'body' with 'do'
This commit is contained in:
Sönke Ludwig 2020-04-17 12:10:16 +02:00 committed by GitHub
commit 41f7357eb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 27 deletions

View file

@ -190,7 +190,7 @@ in {
assert((cast(size_t) chunk.ptr) % T.alignof == 0,
format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s", &chunk[0], T.alignof, T.stringof));
} body {
} do {
enum classSize = __traits(classInstanceSize, T);
auto result = () @trusted { return cast(T) chunk.ptr; } ();
@ -226,7 +226,7 @@ in {
assert((cast(size_t) chunk.ptr) % T.alignof == 0,
format("emplace: Misaligned memory block (0x%X): it must be %s-byte aligned for type %s", &chunk[0], T.alignof, T.stringof));
} body {
} do {
return emplace(() @trusted { return cast(T*)chunk.ptr; } (), args);
}