I'm on ubuntu x64 using dmd 2.060 and the following gives an
exception:
rdmd --main -unittest -version=useInterface mml/sets.d
while the following runs just fine:
rdmd --main -unittest -version=useAbstractClass mml/sets.d
The exception is:
object.Exception@src/object_.d(108): need opCmp for
Sorry, the title of the thread might be irrelevant, it's just
that I was playing around with contracts when I noticed the
problem.
Also, UFCS makes no sense on overloaded operators, because they
don't get
called with ., and all UFCS is is changing obj.func(params)
to func(obj,
params).
- Jonathan M Davis
Ok, that's basically what I was wondering. I had assumed
foreach(e; someThing) {} could possibly have been converted
How exactly does the compiler know how to do foreach on ranges
(for example, ones returned by std.algorithm.map ?) I've looked
around in std.algorithm and std.range, but can't seem to figure
it out.
Çehreli wrote:
On 07/17/2012 11:59 AM, Mike L. wrote:
How exactly does the compiler know how to do foreach on ranges
(for
example, ones returned by std.algorithm.map ?) I've looked
around in
std.algorithm and std.range, but can't seem to figure it out.
The spec mentions it under 'Foreach over
Rory McGuire Wrote:
Mike L. sgtmuff...@myrealbox.com wrote:
Simen kjaeraas Wrote:
On Wed, 16 Dec 2009 07:25:39 +0100, Mike L. sgtmuff...@myrealbox.com
wrote:
I'm making a class template that only works with strings, so I thought
it'd be good to instantiate each template
Simen kjaeraas Wrote:
On Wed, 16 Dec 2009 07:25:39 +0100, Mike L. sgtmuff...@myrealbox.com
wrote:
I'm making a class template that only works with strings, so I thought
it'd be good to instantiate each template with char, wchar, and dchar
right in the template's module so
I'm making a class template that only works with strings, so I thought it'd be
good to instantiate each template with char, wchar, and dchar right in the
template's module so that when it's compiled it'll be part of the .obj file and
won't have to compile it for every other project that uses
So currently if you want to overload just one case of an overloaded function,
you have to use an alias for the class to keep the behavior of the other cases.
I talked about it a little in #d, and the only reason that was given was that
it might protect the programmer somehow. But why should the
Apparently I'm missing some basic concept about how D does OO since I
recreated the problem with a simpler function. I'll re-examine things...
Steve Teale Wrote:
No no, you're doing it wrong. It's HITLER that you're supposed to compare them
to, not Islamic Fundamentalists.
The following code compiles fine for me with dmd 1.043:
--
module wtf;
version(Tango)
import tango.io.Stdout;
else
import std.stdio;
interface Printer
{
void print();
}
class WTF
{
Printer p;
this(int x)
{
p = new
Thanks, glad to have it all in one place.
Could someone lay out for me the different ways of doing constants in D (d1,
particularly)? I've heard things about const, final, invariant, and anonymous
enums?
I saved and compiled the code given as getenv.d on the page
http://www.digitalmars.com/d/archives/digitalmars/D/learn/623.html but I'm not
entirely sure why it works.
The reasons that I don't understand it are:
1. GetEnvironmentStringsA() and the other functions aren't mentioned in
Denis Koroskin Wrote:
Mike L. Wrote:
I saved and compiled the code given as getenv.d on the page
http://www.digitalmars.com/d/archives/digitalmars/D/learn/623.html but I'm
not entirely sure why it works.
The reasons that I don't understand it are:
1. GetEnvironmentStringsA
16 matches
Mail list logo