On Monday, 18 January 2021 at 18:57:04 UTC, vitamin wrote:
You need something like RefCountedRange with methods popFront,
front, empty.
Thanks! refRange from std.range does the trick, indeed.
I'm puzzled why RefCounted and foreach do not work well together,
i.e.:
```
auto range = refCounted(nonCopyableRange); // ok
foreach(e; range) // Error: struct is not copyable because it is
annotated with @disable
// do something
```
See https://run.dlang.io/is/u271nK for a full example w
On Wednesday, 9 September 2020 at 11:43:16 UTC, Fynn Schröder
wrote:
DMD v2.076 is ancient (almost 2 years old!)
typo: its almost 3 years old
On Wednesday, 9 September 2020 at 11:36:56 UTC, Shaleen Chhabra
wrote:
but i am unable to configure the libraries, have dmd v2.076.1
installed on my PC.
DMD v2.076 is ancient (almost 2 years old!). Current is DMD
2.093.1. I can only recommend to download and install an
up-to-date version of D
On Friday, 11 March 2016 at 08:21:33 UTC, Ali Çehreli wrote:
You mean 'else static if'. (Not your fault: I (and others) wish
the compiler warned about this problem.)
Thanks! Such an easy mistake..
You're right Ali, it would be nice if the compiler gave a warning
:)
Hi all,
I'm currently working on a small utility to control the EC
(embedded controller) of my notebook. I need to call an external
C library and choose different methods based on the desired
return type. I came up with a solution based on type checking and
static if - however I ran into a we