[Issue 23626] [REG2.096] Template deduction with auto const ref Args... and delegate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 14 19:24:41 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23626
--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Still 3 files, but one possible reduction.
space_reclaimer.d
```
void __trace_maybeDumpTupleToFile(Args)(ref const Args ) { }
auto as(Func)(Func) {}
@nogc void foo() { }
void assertOp(LHS)(LHS lhs) {
as({
try {
try as(lhs);
catch(Throwable) foo;
} catch(Throwable) assert(false);
});
}
struct FixedArray(T) {
int a = !FixedArray;
T* some_function() {
assertOp(1);
return null;
}
alias some_function this;
}
struct ReclamationBatch {
FixedArray!(uint) dummy;
@nogc nothrow void some_inout_func() { }
void func_2(Dlg)(Dlg dlg) {
__trace_maybeDumpTupleToFile(dlg);
}
void _reclaimBatch() {
func_2({ some_inout_func; });
}
}
```
tiering_policies.d
```
interface Timeline { }
struct Policy {
alias OldTagCallback = void delegate() @nogc nothrow;
Timeline timeline;
OldTagCallback oldTagCB;
}
import static_hash;
struct Tiering {
StaticHashTable!(Policy) policies;
}
```
static_hash.d
```
struct StaticHashTable(V) {
V v;
}
```
------------------------------------
Bonus source file, a minimal object.d to also rule out druntime.
```
module object;
alias size_t = ulong;
class Object { }
class TypeInfo
{
size_t getHash(const void* ) nothrow { }
}
class TypeInfo_Const : TypeInfo { }
class Throwable { }
bool _xopEquals() { }
```
--
More information about the Digitalmars-d-bugs
mailing list