On Sunday, 22 February 2015 at 10:54:10 UTC, Nordlöw wrote:
I got things working better (without alias this in Index) at
https://github.com/nordlow/justd/blob/a3b0df924fd774709ab7844e6c47b5a8e5ff3917/typecons_ex.d
than with my previous solution (with alias this in Index) at
I tried to override the opCast operator in a class to be able to
explicitly convert the class to a string, but to!string just
returns the name of the class.
Do opCast and to! together not work with strings and does that
mean that i have to use alias this?
On Sunday, 22 February 2015 at 13:04:56 UTC, Jacques Müller wrote:
I tried to override the opCast operator in a class to be able
to explicitly convert the class to a string, but to!string just
returns the name of the class.
to!string actually forwards to a special function, string
toString()
On Sunday, 22 February 2015 at 13:15:31 UTC, Adam D. Ruppe wrote:
to!string actually forwards to a special function, string
toString() {} which you'll need to implement and override from
the base class.
Thanks, that's good to know.
I was just wondering why my code wasn't working correctly.
Is there some function similar to std.algorithm.find() which
returns an element index instead of a range? I guess 0 means no
hit and 1, 2, 3 means hits at indexes 0, 1, 2 etc.
I want this to avoid having to create ranges ([]) when searching
for a specific element in std.container.Array.
At
https://github.com/nordlow/justd/blob/master/typecons_ex.d#L93
I'm trying to implement a wrapper type that provides type-safe
indexing and slicing via an integer-like wrapper type I call
*Index*.
However there's something wrong implicit conversions because
assert(jx[J(0)] == 11);
On Sunday, 22 February 2015 at 10:52:26 UTC, Nordlöw wrote:
At
https://github.com/nordlow/justd/blob/master/typecons_ex.d#L93
I'm trying to implement a wrapper type that provides type-safe
indexing and slicing via an integer-like wrapper type I call
Here's a copy of the definitions for
On Saturday, 21 February 2015 at 20:46:09 UTC, Kenny wrote:
I like D modules and it's a major point in the list of major
points why I like D (there is also the second not so nice
wft-list but it's for another post). I'm annoyed with C++
includes and I'm tired to create 2 files every time when I
On Sunday, 22 February 2015 at 13:53:51 UTC, Nordlöw wrote:
Is there some function similar to std.algorithm.find() which
returns an element index instead of a range? I guess 0 means no
hit and 1, 2, 3 means hits at indexes 0, 1, 2 etc.
I want this to avoid having to create ranges ([]) when
Is this possible?
Example:
void foo(Args...)(auto ref Args args) {
sprintf(str.ptr, fmt.ptr, args);
}
On Sunday, 22 February 2015 at 17:09:27 UTC, Foo wrote:
Is this possible?
Example:
void foo(Args...)(auto ref Args args) {
sprintf(str.ptr, fmt.ptr, args);
}
yes
On Sunday, 22 February 2015 at 17:20:23 UTC, Foo wrote:
On Sunday, 22 February 2015 at 17:15:06 UTC, anonymous wrote:
On Sunday, 22 February 2015 at 17:09:27 UTC, Foo wrote:
Is this possible?
Example:
void foo(Args...)(auto ref Args args) {
sprintf(str.ptr, fmt.ptr, args);
}
yes
On Sunday, 22 February 2015 at 17:15:06 UTC, anonymous wrote:
On Sunday, 22 February 2015 at 17:09:27 UTC, Foo wrote:
Is this possible?
Example:
void foo(Args...)(auto ref Args args) {
sprintf(str.ptr, fmt.ptr, args);
}
yes
I get the error, that I cannot pass a dynamic array
On Sunday, 22 February 2015 at 12:13:02 UTC, MrSmith wrote:
You can also fold all the function bodies in your editor, this
helps me to read massive sources.
Oh, I almost forgot about this feature, never used it in C++ but
for D it looks promising. Thanks!
On Saturday, 21 February 2015 at 20:56:26 UTC, anonymous wrote:
On Saturday, 21 February 2015 at 20:46:09 UTC, Kenny wrote:
b) Write DDocs and read documentation. The problem here is that
I'm going to use D only for my own projects and in the last
time
I tend to write less documentation, for
On Sun, 22 Feb 2015 16:12:49 +, Kenny wrote:
On Saturday, 21 February 2015 at 20:56:26 UTC, anonymous wrote:
On Saturday, 21 February 2015 at 20:46:09 UTC, Kenny wrote:
b) Write DDocs and read documentation. The problem here is that I'm
going to use D only for my own projects and in the
On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth wrote:
I've gone with static this() approach and it works.
You should use shared static this to initialize immutable
variables.
On Monday, 23 February 2015 at 04:04:08 UTC, ketmar wrote:
On Mon, 23 Feb 2015 02:15:08 +, stewarth wrote:
On Monday, 23 February 2015 at 02:10:09 UTC, amber wrote:
On Sunday, 22 February 2015 at 23:17:33 UTC, Martin Nowak
wrote:
On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth
On 02/22/2015 03:17 PM, Martin Nowak wrote:
On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth wrote:
I've gone with static this() approach and it works.
You should use shared static this to initialize immutable variables.
Is that because they are not thread-local? If so, initializing
On Sunday, 22 February 2015 at 23:17:33 UTC, Martin Nowak wrote:
On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth wrote:
I've gone with static this() approach and it works.
You should use shared static this to initialize immutable
variables.
OK, thanks a lot for the help.
Cheers,
On Mon, 23 Feb 2015 02:15:08 +, stewarth wrote:
On Monday, 23 February 2015 at 02:10:09 UTC, amber wrote:
On Sunday, 22 February 2015 at 23:17:33 UTC, Martin Nowak wrote:
On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth wrote:
I've gone with static this() approach and it works.
On Friday, 20 February 2015 at 14:36:47 UTC, MartinNowak wrote:
On Friday, 20 February 2015 at 04:48:09 UTC, Charles wrote:
They're installer versions, dub is 0.9.22 Nov 22 I want to say,
and DMD is 2.066.1
Same ones I tried.
With --force dmd seems to fail but there is not output.
Can you
On Monday, 23 February 2015 at 02:10:09 UTC, amber wrote:
On Sunday, 22 February 2015 at 23:17:33 UTC, Martin Nowak wrote:
On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth wrote:
I've gone with static this() approach and it works.
You should use shared static this to initialize
23 matches
Mail list logo