On Tuesday, 26 June 2018 at 00:59:24 UTC, Nicholas Wilson wrote:
On Sunday, 24 June 2018 at 14:16:26 UTC, Kamil Koczurek wrote:
[...]
If you were able to compile it with LDC and not DMD, then that
is most likely due to the LDC executable being 64-bit (limited
to available system RAM+swaps)
On Tuesday, 26 June 2018 at 01:52:42 UTC, Ali Çehreli wrote:
I've made some online improvements to "Programming in D" since
September 2017.
[...]
Great work on the book and keeping it up to date!
On Tuesday, 26 June 2018 at 03:45:27 UTC, Seb wrote:
Did you by chance also benchmark it with other languages like
C++, Go or Rust?
I didn't since I was evaluating hashtable implementations for use
in a D application.
BTW I'm not sure what your plans are, but are you aware of this
recent
On Tuesday, June 26, 2018 03:17:37 aliak via Digitalmars-d wrote:
> On Tuesday, 26 June 2018 at 03:07:08 UTC, aliak wrote:
> > Also, what would the work around be for code that relies on
> > opDispatch and alias this? And shouldn't the PR take in to
> > account the "Deprecation process" and
https://issues.dlang.org/show_bug.cgi?id=19027
Issue ID: 19027
Summary: iota(int.min, int.max).length is incorrect
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
On Tuesday, 26 June 2018 at 02:10:17 UTC, Manu wrote:
Some code:
-
struct Entity
{
enum NumSystems = 4;
struct SystemData
{
uint start, length;
}
SystemData[NumSystems] systemData;
@property uint systemBits() const { return
systemData[].map!(e =>
On Tuesday, 26 June 2018 at 02:53:22 UTC, Nathan S. wrote:
With LDC2 the times for vibe.utils.hashmap and memutils.hashmap
are suspiciously low, leading me to suspect that the optimizer
might be omitting most of the work. Here are the figures
without optimizations enabled.
== Speed Ranking
On Monday, 25 June 2018 at 18:59:37 UTC, Steven Schveighoffer
wrote:
On 6/25/18 2:51 PM, aliak wrote:
On Monday, 25 June 2018 at 15:06:42 UTC, Steven Schveighoffer
wrote:
I don't see any reason why the alias is to the function and
not the contexted function. I don't see how it's any
https://issues.dlang.org/show_bug.cgi?id=19026
Issue ID: 19026
Summary: Aliasing an inner function gets context but aliasing a
member function through instance does not
Product: D
Version: D2
Hardware: All
On Tuesday, 26 June 2018 at 02:20:37 UTC, Manu wrote:
I optimised another major gotcha eating perf, and now this
issue is taking 13% of my entire work time... bummer.
Without disagreeing with you, ldc2 optimizes this fine.
https://run.dlang.io/is/NJct6U
const @property uint
On Tuesday, 26 June 2018 at 02:10:17 UTC, Manu wrote:
[snip]
@property uint systemBits() const { return
systemData[].map!(e =>
e.length).sum; } [snip]
This property sum's 4 ints... that should be insanely fast. It
should
also be something like 5-8 lines of asm.
Turns out, that call to
On Tuesday, 26 June 2018 at 03:07:08 UTC, aliak wrote:
Also, what would the work around be for code that relies on
opDispatch and alias this? And shouldn't the PR take in to
account the "Deprecation process" and deprecate it first before
banning it?
Cheers,
- Ali
s/shouldn't/will
On Monday, June 25, 2018 19:10:17 Manu via Digitalmars-d wrote:
> Some code:
> -
> struct Entity
> {
> enum NumSystems = 4;
> struct SystemData
> {
> uint start, length;
> }
> SystemData[NumSystems] systemData;
> @property uint systemBits() const {
On Monday, 25 June 2018 at 23:13:12 UTC, Seb wrote:
Apparently three years ago it was we decided to ban alias this
and opDispatch in the same class.
What are your thoughts on this now?
Is anyone depending on using alias this + opDispatch together
like e.g. in
With LDC2 the times for vibe.utils.hashmap and memutils.hashmap
are suspiciously low, leading me to suspect that the optimizer
might be omitting most of the work. Here are the figures without
optimizations enabled.
== Speed Ranking using DMD (no optimizations) ==
95 msecs built-in AA
168
On Mon, 25 Jun 2018 at 19:10, Manu wrote:
>
> Some code:
> -
> struct Entity
> {
> enum NumSystems = 4;
> struct SystemData
> {
> uint start, length;
> }
> SystemData[NumSystems] systemData;
> @property uint systemBits() const { return
The below benchmarks come from writing 100 int-to-int mappings to
a new hashtable then reading them back, repeated 10_000 times.
The built-in AA doesn't deallocate memory when it falls out of
scope but the other maps do. Benchmark code in next post.
== Speed Ranking using LDC2 (optimized) ==
Benchmark code:
dub.sdl
```
name "hashbench"
description "D hashtable comparison."
dependency "emsi_containers" version="~>0.7.0"
dependency "memutils" version="~>0.4.11"
dependency "vibe-d:utils" version="~>0.8.4"
dependency "jive" version="~>0.2.0"
//dependency "collections" version="~>0.1.0"
Some code:
-
struct Entity
{
enum NumSystems = 4;
struct SystemData
{
uint start, length;
}
SystemData[NumSystems] systemData;
@property uint systemBits() const { return systemData[].map!(e =>
e.length).sum; }
}
Entity e;
e.systemBits(); // <- call
On Tuesday, 26 June 2018 at 00:56:13 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 23:13:12 Seb via Digitalmars-d wrote:
- Jonathan M Davis
I've tried to fix this issue. If briefly there is one collision:
Final alias this should be r-value:
static struct S
{
int i;
}
void
On Monday, 25 June 2018 at 21:34:43 UTC, Seb wrote:
Phobos
...
I forgot the links to the DUB registry:
https://phobos.dub.pm
https://dtools.dub.pm
I've made some online improvements to "Programming in D" since September
2017.
http://ddili.org/ders/d.en/index.html
NOTE: The copies of the book at hard copy printers are not updated yet.
If you order from Amazon etc. it will still be the OLD version. I need
some more time to work on
On Sunday, 24 June 2018 at 14:16:26 UTC, Kamil Koczurek wrote:
I recently wrote a brainfuck compiler in D, which loads the BF
source at compile time, performs some (simple) optimizations,
translates everything to D and puts it into the source code
with a mixin.
I did manage to get some
On Monday, June 25, 2018 23:13:12 Seb via Digitalmars-d wrote:
> Apparently three years ago it was we decided to ban alias this
> and opDispatch in the same class.
> What are your thoughts on this now?
> Is anyone depending on using alias this + opDispatch together
> like e.g. in
On Sunday, 24 June 2018 at 03:46:09 UTC, Dr.No wrote:
to make it work. But if anyone else know how to fix this, will
be very welcome too!
try it now.
thanks to Sandman83 on github.
Apparently three years ago it was we decided to ban alias this
and opDispatch in the same class.
What are your thoughts on this now?
Is anyone depending on using alias this + opDispatch together
like e.g. in https://github.com/dlang/phobos/pull/6596?
On Monday, June 25, 2018 19:40:30 kdevel via Digitalmars-d-learn wrote:
> Just stumbled over the following design:
>
> class S {...}
>
> class R {
>
>Nullable!S s;
>
> }
>
> s was checked in code like
>
> R r;
>
> if (r.s is null)
>throw new Exception ("some
I was in need of an associative array / dictionary object that
could also support getting ranges of entries with keys below or
above a given value. I couldn't find anything that would do
this, and ended up using the RedBlackTree to store key/value
pairs, and then wrap the relevant functions
Phobos
--
It's now possible to access the latest version of Phobos's
experimental packages through dub:
```
#!/usr/bin/env dub
/++dub.sdl:
dependency "phobos:checkedint" version="~master"
+/
void main(string[] args)
{
import stdx.checkedint; // From latest Phobos
import
https://issues.dlang.org/show_bug.cgi?id=19025
mmcoma...@gmail.com changed:
What|Removed |Added
CC||mmcoma...@gmail.com
--
https://issues.dlang.org/show_bug.cgi?id=18034
mmcoma...@gmail.com changed:
What|Removed |Added
CC||mmcoma...@gmail.com
--
On Sun, 24 Jun 2018 at 06:10, Rainer Schuetze via
Digitalmars-d-announce wrote:
>
> Hi,
>
> a new release of Visual D has just been uploaded. Major changes are
>
> * improved Visual C++ project integration: better dependencies,
>automatic libraries, name demangling
> * new project wizard
> *
https://issues.dlang.org/show_bug.cgi?id=18953
--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/3a4707b4b15743ff4a068fe5ac6b983b6ce042c4
fix issue 18953 - extern(C++) struct destructor not called
https://issues.dlang.org/show_bug.cgi?id=18984
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=18953
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=18916
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=18266
--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/5e18ed610d8d946c1718f591806342e933788559
Fix Issue 18266 - ICE: should allow reusing identifier in
https://issues.dlang.org/show_bug.cgi?id=18984
--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/b3c9c561ce8a52b9997a0fef8912eecd296f8c32
fix issue 18984 - Debugging stack struct's which are returned
https://issues.dlang.org/show_bug.cgi?id=18966
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/403d5f0148abe60ac1836da9038c18cebd8b8644
fix Issue 18966 - extern(C++) constructor should match C++
https://issues.dlang.org/show_bug.cgi?id=18266
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=18916
--- Comment #4 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/3b3e97904dd844d2c7546c528a4cb6fec19fe106
Fix Issue 18916 - ICE using Typedef and __LINE__
On Monday, June 25, 2018 17:29:23 Robert M. Münch via Digitalmars-d-learn
wrote:
> I have two foreach loops where the inner should change the iterator
> (append new entries) of the outer.
>
> foreach(a, candidates) {
> foreach(b, a) {
> if(...) candidates ~= additionalCandidate;
> }
> }
https://issues.dlang.org/show_bug.cgi?id=19025
Issue ID: 19025
Summary: Better definition of deallocateAll in
ContiguousFreeList
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Just stumbled over the following design:
class S {...}
class R {
:
Nullable!S s;
:
}
s was checked in code like
R r;
:
if (r.s is null)
throw new Exception ("some error message");
At runtime the following was caught:
fatal error: caught
On 6/25/18 2:51 PM, aliak wrote:
On Monday, 25 June 2018 at 15:06:42 UTC, Steven Schveighoffer wrote:
I don't see any reason why the alias is to the function and not the
contexted function. I don't see how it's any different from the ones
which use inner functions.
I can only agree - me no
On Monday, 25 June 2018 at 15:06:42 UTC, Steven Schveighoffer
wrote:
On 6/24/18 5:19 PM, aliak wrote:
[...]
No, because the alias is an alias to the function, not the
delegate.
The act of taking the address creates the delegate, where the
delegate's ptr is the context pointer (i.e. s),
Hi,
I am sure std.parallelism and vibe.d both have futures/channels/executors
systems as there appears not to be anything in Phobos as a futures system. Or
am I wrong here?
What is needed is a futures system with a single threaded executor system that
can be integrated with GtkD so as to make
https://issues.dlang.org/show_bug.cgi?id=16987
ki...@gmx.net changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
On Monday, 25 June 2018 at 15:39:09 UTC, Mr.Bingo wrote:
On Monday, 25 June 2018 at 13:58:54 UTC, aliak wrote:
A.x is translated in to A.opDispatch!"x" with no args. So I
guess you can overload or you can static if on a template
parameter sequence:
import std.stdio;
struct S {
auto
https://issues.dlang.org/show_bug.cgi?id=18978
Thomas changed:
What|Removed |Added
Status|RESOLVED|VERIFIED
--
On Sunday, 24 June 2018 at 13:08:53 UTC, Rainer Schuetze wrote:
a new release of Visual D has just been uploaded
Thanks Rainer, much appreciated. Looking forward to the many
debugging improvements.
https://issues.dlang.org/show_bug.cgi?id=18996
--- Comment #9 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/1b0af1ee6030b233eba7d29629c5ea995d5df944
Fix issue 18996 - ProtoGC should support removing
https://issues.dlang.org/show_bug.cgi?id=19005
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=18996
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=19008
--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/3e233e7e88bbf84d27cf87c33d94ab85f6f6fc12
Fix Issue 19008 - core.internal.convert.toUbyte
https://issues.dlang.org/show_bug.cgi?id=19005
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/416d1dd1afc43ff423becca63801f5807e8efdb9
Fix Issue 19005 - [REG2.081-b1] object.hashOf no
https://issues.dlang.org/show_bug.cgi?id=19008
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
On 06/25/2018 07:45 PM, zbr wrote:
void mergeSort(int[] arr, int l, int r)
{
if (l < r) // 1
{
int m = l+(r-l)/2; // 2
mergeSort(arr, l, m); // 3
mergeSort(arr, m+1, r); // 4
merge(arr, l, m, r); // 5
On Monday, 25 June 2018 at 17:45:01 UTC, zbr wrote:
Hi, this question is not specifically D related but I'll just
ask anyway. Consider the following snippet:
[...]
Your mistake is in your visualization :-)
But... more like:
0 < 4 ? true : mergeSort(0,2) && mergeSort(3, 4)
And so on.
I.e,
Hi, this question is not specifically D related but I'll just ask
anyway. Consider the following snippet:
void mergeSort(int[] arr, int l, int r)
{
if (l < r) // 1
{
int m = l+(r-l)/2;// 2
mergeSort(arr, l, m); // 3
On Monday, 25 June 2018 at 00:35:40 UTC, Jonathan M Davis wrote:
On Sunday, June 24, 2018 23:53:09 Timoses via Digitalmars-d
wrote:
On Sunday, 24 June 2018 at 23:34:49 UTC, Per Nordlöw wrote:
> Provided that
>
> __traits(allMembers, E)
>
> is a cheap operation as it's called once for every
On Monday, 25 June 2018 at 14:45:31 UTC, Miguel L wrote:
Sorry, I don't know where is the right place to report a bug on
the web site. I just noticed searching for "code" in
code.dlang.org generates this crash:
I suppose it's related to:
On Mon, Jun 25, 2018 at 05:29:23PM +0200, Robert M. Münch via
Digitalmars-d-learn wrote:
> I have two foreach loops where the inner should change the iterator
> (append new entries) of the outer.
>
> foreach(a, candidates) {
> foreach(b, a) {
> if(...) candidates ~=
On Monday, 25 June 2018 at 14:41:28 UTC, rikki cattermole wrote:
Let me get this straight, you decided to max out your memory
address space /twice over/ before you hit run time, and think
that this would be a good idea?
Well, that cause was suppose to allocate a dynamic array instead
of a
Hi all,
We are going to meet on 6/27 at 6 pm at the Capital One cafe in the Back
Bay in Boston (https://www.capitalone.com/local/boston-backbay). Sameer
Pradhan, a regular at the Boston D meetup group will show us his NLP
tool that he is planning to port from Python to D, called OntoNotes.
On Monday, 25 June 2018 at 13:58:54 UTC, aliak wrote:
On Monday, 25 June 2018 at 13:37:01 UTC, Mr.Bingo wrote:
One can overload assignment and dispatch so that something like
A.x = ... is valid when x is not a typical member but gets
resolved by the above functions.
Therefore, I can create
On Friday, 22 June 2018 at 14:45:46 UTC, Jesse Phillips wrote:
Should I be looking more at the benefits of having D as a tool?
It was a good choice for me since I know D so well (and other
reasons at the time), but C# is a reasonable language in this
space. I'm thinking, like should I go into
I have two foreach loops where the inner should change the iterator
(append new entries) of the outer.
foreach(a, candidates) {
foreach(b, a) {
if(...) candidates ~= additionalCandidate;
}
}
The foreach docs state that the collection must not change during
On 6/24/18 5:19 PM, aliak wrote:
Hi, I'm having some issues with template sequence parameters, it seems
they are not typed as delegates inside a template, but are outside. I.e.
template T(V...) {
alias T = typeof([0]);
}
struct S { void f() {} }
S s;
pragma(msg, T!(s.f)); // void
Sorry, I don't know where is the right place to report a bug on
the web site. I just noticed searching for "code" in
code.dlang.org generates this crash:
https://code.dlang.org/search?q=code
500 - Internal Server Error
Internal Server Error
Internal error information:
Let me get this straight, you decided to max out your memory address
space /twice over/ before you hit run time, and think that this would be
a good idea?
import std.stdio;
union Vector(T, size_t N = size_t.max)
{
import std.range, std.typecons, std.meta, std.algorithm,
std.conv, std.math;
static if (N == size_t.max) // For size_t.max sets N to be
infinite/dynamic;
{
mixin("Tuple!("~"T,".repeat(N).join()~") data;");
On Monday, 25 June 2018 at 13:37:01 UTC, Mr.Bingo wrote:
One can overload assignment and dispatch so that something like
A.x = ... is valid when x is not a typical member but gets
resolved by the above functions.
Therefore, I can create a member for assignment. How can I
create a member
With the latest releasae I still have the same problem. I really don't
have any idea what the cause could be or how to fix it... Anyone?
Viele Grüsse. Robert M. Münch
On 2018-05-21 17:46:45 +, Robert M. Münch said:
A project I can compile via the command line and dub, gives an error in
One can overload assignment and dispatch so that something like
A.x = ... is valid when x is not a typical member but gets
resolved by the above functions.
Therefore, I can create a member for assignment. How can I create
a member for getting the value?
A.x = 3; // Seems to get
On Sunday, 24 June 2018 at 21:28:06 UTC, aliak wrote:
On Sunday, 24 June 2018 at 20:33:32 UTC, Rudy Raab wrote:
So I have an XLSX (MS Excel 2007+ file format) library that I
wrote (https://github.com/TransientResponse/dlang-xlsx) that
I recently converted from std.xml to dxml. That went well
On Monday, 25 June 2018 at 10:49:26 UTC, Simen Kjærås wrote:
On Monday, 25 June 2018 at 09:36:45 UTC, Martin Tschierschke
wrote:
I am not sure that I understood it right, but there is a way
to detect the status of a parameter:
My question was different, but I wished to get a ctRegex! or
On Monday, 25 June 2018 at 10:38:49 UTC, Basile B. wrote:
On Monday, 25 June 2018 at 10:36:46 UTC, Basile B. wrote:
On Sunday, 24 June 2018 at 23:08:15 UTC, aliak wrote:
Wow nice, that was quick, would it be much more to make it so
that braces are required with if statements that do not
https://issues.dlang.org/show_bug.cgi?id=19018
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=19018
--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/37ff0dc4376b1617066be6435ac3cedd86f7cc7f
Fix Issue 19018 - deprecate invalid integer literal
On Monday, 25 June 2018 at 09:36:45 UTC, Martin Tschierschke
wrote:
I am not sure that I understood it right, but there is a way to
detect the status of a parameter:
My question was different, but I wished to get a ctRegex! or
regex used depending on the expression:
import
On 06/25/2018 07:47 AM, Mr.Bingo wrote:
The docs say that CTFE is used only when explicit, I was under the
impression that it would attempt to optimize functions if they could be
computed at compile time. The halting problem has nothing to do with
this. The ctfe engine already complains when
On Sunday, 24 June 2018 at 23:08:15 UTC, aliak wrote:
On Sunday, 24 June 2018 at 11:27:12 UTC, Basile B. wrote:
On Saturday, 23 June 2018 at 06:24:29 UTC, Basile B. wrote:
On Saturday, 23 June 2018 at 06:18:53 UTC, user1234 wrote:
On Saturday, 23 June 2018 at 05:09:13 UTC, aedt wrote:
On
On Monday, 25 June 2018 at 10:36:46 UTC, Basile B. wrote:
On Sunday, 24 June 2018 at 23:08:15 UTC, aliak wrote:
On Sunday, 24 June 2018 at 11:27:12 UTC, Basile B. wrote:
On Saturday, 23 June 2018 at 06:24:29 UTC, Basile B. wrote:
On Saturday, 23 June 2018 at 06:18:53 UTC, user1234 wrote:
On
On Monday, 25 June 2018 at 08:05:53 UTC, Mr.Bingo wrote:
On Monday, 25 June 2018 at 07:02:24 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 05:47:30 Mr.Bingo via
Digitalmars-d-learn wrote:
The problem then, if D can't arbitrarily use ctfe, means that
there should be a way to force ctfe
https://issues.dlang.org/show_bug.cgi?id=18374
--- Comment #2 from Mitu ---
(In reply to Seb from comment #1)
> Are you aware of the new `apply`?
>
> https://dlang.org/changelog/2.080.0.html#std-typecons-nullable-apply
>
> It still would be great to have Nullable and ranges working nicely
On Monday, June 25, 2018 07:43:53 Per Nordlöw via Digitalmars-d wrote:
> On Monday, 25 June 2018 at 00:35:40 UTC, Jonathan M Davis wrote:
> > Or if you want it to stay an AliasSeq, then just use Alias or
> > AliasSeq on it. e.g.
> >
> > alias members = AliasSeq!(__traits(allMembers, E));
>
>
On Monday, 25 June 2018 at 07:02:24 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 05:47:30 Mr.Bingo via
Digitalmars-d-learn wrote:
The problem then, if D can't arbitrarily use ctfe, means that
there should be a way to force ctfe optionally!
If you want to use CTFE, then give an enum
On Monday, 25 June 2018 at 07:43:53 UTC, Per Nordlöw wrote:
On Monday, 25 June 2018 at 00:35:40 UTC, Jonathan M Davis wrote:
Or if you want it to stay an AliasSeq, then just use Alias or
AliasSeq on it. e.g.
alias members = AliasSeq!(__traits(allMembers, E));
Thanks! Should we prefer this
On Monday, 25 June 2018 at 00:35:40 UTC, Jonathan M Davis wrote:
Or if you want it to stay an AliasSeq, then just use Alias or
AliasSeq on it. e.g.
alias members = AliasSeq!(__traits(allMembers, E));
Thanks! Should we prefer this over
enum members = [__traits(allMembers, E)];
?
On Sunday, 24 June 2018 at 23:53:09 UTC, Timoses wrote:
enum members = [_traits(allMembers, E)];
seems to work
Great!
Now becomes:
@safe:
/** Enumeration wrapper that uses optimized conversion to string
(via `toString`
* member).
*/
struct Enum(E)
if (is(E == enum))
{
@property
On Monday, June 25, 2018 05:47:30 Mr.Bingo via Digitalmars-d-learn wrote:
> The problem then, if D can't arbitrarily use ctfe, means that
> there should be a way to force ctfe optionally!
If you want to use CTFE, then give an enum the value of the expression you
want calculated. If you want to do
92 matches
Mail list logo