On 09/30/2015 10:46 PM, Russel Winder via Digitalmars-d-learn wrote:
I have the code:
reduce!"a+b"(x)
where x is a int[] and I get an exception "Enforcement failed" at run
time. This gives me enough information to say ¿que?
It's coming from the following no-message enforce():
I have the code:
reduce!"a+b"(x)
where x is a int[] and I get an exception "Enforcement failed" at run
time. This gives me enough information to say ¿que?
--
Russel.
=
Dr Russel Winder t: +44 20 7585 2200
This compiles and appears to execute correctly, but if I
uncomment the taskPool line I get a compile error message about
wrong buffer type. Am I breaking some rule for
std.parallelism.amap?
import std.algorithm, std.parallelism, std.range;
import std.stdio;
import std.datetime;
import std.typ
I'm using the std.regex API as part of Linux GUI grep utility I'm
trying to create. I've got the GUI going fine using gtkd, the
code to iterate over files (wow that was succinct in D, very
impressive!), and getting matches via regex using the matchAll
function.
I'm stuck though on how to get
On Thursday, 1 October 2015 at 00:04:18 UTC, Nordlöw wrote:
How do I check that a template parameter is a CT-value or an
enum symbol?
I want this to restrict the following template:
/** Returns: true iff all values $(D V) are the same. */
template allSame(V...) // TODO restrict to val
How do I check that a template parameter is a CT-value or an enum
symbol?
I want this to restrict the following template:
/** Returns: true iff all values $(D V) are the same. */
template allSame(V...) // TODO restrict to values only
{
static if (V.length <= 1)
enum bool al
On Wednesday, 30 September 2015 at 22:48:03 UTC, Freddy wrote:
How do you take the address of a specific overloaded function.
This won't compile
You can write a helper function that uses __traits(getOverloads)
and searches them for the right signature:
http://dlang.org/traits.html#getOverloa
How do you take the address of a specific overloaded function.
This won't compile
---
import std.range;
void main()
{
ForwardAssignable!int range;
int delegate() @property get = &range.front;
void delegate(int) @property set = &range.front;
}
---
On Wednesday, 30 September 2015 at 22:24:25 UTC, Jay Norwood
wrote:
// various metric definitions
// the Tuples could also define names for each member and use
the names here in the metrics.
long met1( TI m){ return m[0] + m[1] + m[2]; }
long met2( TI m){ return m[1] + m[2] + m[3]; }
long met3(
This is something I'm playing with for work. We do this a lot,
capture counter events for some number of on-chip performance
counters, compute some metrics, display the outputs. This seems
ideal for the application.
import std.algorithm, std.parallelism, std.range;
import std.stdio;
import std
On Wednesday, 30 September 2015 at 20:11:56 UTC, Freddy wrote:
Is there a way to make a range of a variables lazily?
---
int var1;
int var2;
void func()
{
int var3;
auto range = /*range of var1,var2,var3*/ ;
}
---
There's std.range.only which gives you a range over the arguments
you pa
Is there a way to make a range of a variables lazily?
---
int var1;
int var2;
void func()
{
int var3;
auto range = /*range of var1,var2,var3*/ ;
}
---
On Wednesday, 30 September 2015 at 14:20:28 UTC, Namal wrote:
On Wednesday, 30 September 2015 at 13:03:52 UTC, Rikki
Cattermole wrote:
On 01/10/15 1:59 AM, Namal wrote:
Hello,
can someone give me a complete example please how to do
unittests? I
tried this with the example from german wikipedi
On Wednesday, 30 September 2015 at 13:03:52 UTC, Rikki Cattermole
wrote:
On 01/10/15 1:59 AM, Namal wrote:
Hello,
can someone give me a complete example please how to do
unittests? I
tried this with the example from german wikipedia, but the flag
-unittest didn't make any difference.
Exampl
On 01/10/15 1:59 AM, Namal wrote:
Hello,
can someone give me a complete example please how to do unittests? I
tried this with the example from german wikipedia, but the flag
-unittest didn't make any difference.
Example file with loads of unittests:
https://github.com/rikkimax/alphaPhobos/blo
Hello,
can someone give me a complete example please how to do
unittests? I tried this with the example from german wikipedia,
but the flag -unittest didn't make any difference.
On Tuesday, September 29, 2015 22:38:42 Johannes Pfau via Digitalmars-d-learn
wrote:
> Am Tue, 29 Sep 2015 15:10:58 -0400
> schrieb Steven Schveighoffer :
>
> >
> > > 3) Why do I have to pass a "Mutex" to "Condition"? Why can't I just
> > > pass an "Object"?
> >
> > An object that implements the M
On Wednesday, 30 September 2015 at 07:57:59 UTC, Atila Neves
wrote:
On Tuesday, 29 September 2015 at 09:40:41 UTC, Alexandru
Ermicioi wrote:
On Saturday, 26 September 2015 at 10:10:39 UTC, Alexandru
Ermicioi wrote:
Suppose we have, two modules:
module testOne;
[...]
So, is this behavior cor
On Tuesday, 29 September 2015 at 09:40:41 UTC, Alexandru Ermicioi
wrote:
On Saturday, 26 September 2015 at 10:10:39 UTC, Alexandru
Ermicioi wrote:
Suppose we have, two modules:
module testOne;
[...]
So, is this behavior correct?
If yes, then why?
Yes, because private members aren't accessi
19 matches
Mail list logo