4 Commits

Author SHA1 Message Date
6072bfab68 Marke SingletonByRef functions scope 2025-05-03 18:52:24 +02:00
4acf163b42 Combine dependencies and dependencies-linux
Platform dependencies aren't supported according to the dub
documentation, that states: "this setting does not support platform
suffixes".

dub test with dub 1.34.0 produces a warning:

"dependencies-linux: Key is not a valid member of this section.
Did you mean: dependencies"

Then the build fails because it cannot find modules defined in the
dependency.
2023-09-25 18:35:33 +02:00
e1fd528607 Merge remote-tracking branch 'n8sh/DMD_2.105' 2023-09-23 17:22:27 +02:00
20ae6465d6 Update to compile with DMD 2.105
https://dlang.org/changelog/2.105.0.html#dmd.enum-function

> enum on a function declaration had no effect other than being
> equivalent to the auto storage class when no return type was present.
> That syntax could be confused with enum manifest constants and is now
> an error... Instead, remove enum and use auto where necessary
2023-09-22 15:43:36 -04:00
3 changed files with 4 additions and 7 deletions

View File

@ -13,10 +13,7 @@
"tanya:meta": "*", "tanya:meta": "*",
"tanya:os": "*", "tanya:os": "*",
"tanya:middle": "*", "tanya:middle": "*",
"tanya:test": "*" "tanya:test": "*",
},
"dependencies-linux": {
"mir-linux-kernel": "~>1.0.0" "mir-linux-kernel": "~>1.0.0"
}, },

View File

@ -2128,7 +2128,7 @@ if (isCallable!F)
} }
else else
{ {
enum getDefault(T[i .. i + 1] name) auto getDefault(T[i .. i + 1] name)
{ {
return name[0]; return name[0];
} }

View File

@ -109,7 +109,7 @@ private struct SingletonByRef(E)
this.element = &element; this.element = &element;
} }
@property ref inout(E) front() inout return @property ref inout(E) front() inout return scope
in in
{ {
assert(!empty); assert(!empty);
@ -148,7 +148,7 @@ private struct SingletonByRef(E)
return typeof(this)(*this.element); return typeof(this)(*this.element);
} }
ref inout(E) opIndex(size_t i) inout return ref inout(E) opIndex(size_t i) inout return scope
in in
{ {
assert(!empty); assert(!empty);