On Friday, 2 February 2024 at 11:31:09 UTC, Anonymouse wrote:
On Friday, 2 February 2024 at 08:22:42 UTC, Carl Sturtivant
wrote:
It seems I cannot pass e.g. an int argument to a Variant
function parameter. What's the simplest way to work around
this restriction?
The easiest thing would be to
On Saturday, 3 February 2024 at 08:04:40 UTC, Danilo wrote:
To be honest, this doesn't make sense.
`if (!is(T : Variant))` returns true for inputs like 42,
"hello", 3.14f, but the input is not a Variant but a random
type.
Yes, it's nice that it works in this case. It's just not
logical, it
On Saturday, 3 February 2024 at 02:20:13 UTC, Paul Backus wrote:
On Friday, 2 February 2024 at 23:25:37 UTC, Chris Katko wrote:
The auto solution won't work for a struct however which I'm
using:
```D
struct procTable{ //contains all the fields inside a file I'm
parsing
uint time;
int p
On Friday, 2 February 2024 at 20:58:12 UTC, Paul Backus wrote:
Another variation on the same theme:
```d
/// map over a variadic argument list
template mapArgs(alias fun)
{
auto mapArgs(Args...)(auto ref Args args)
{
import std.typecons: tuple;
impo