Sorry, the title of the thread might be irrelevant, it's just
that I was playing around with contracts when I noticed the
problem.
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
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 converte
Ç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
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.
Rory McGuire Wrote:
> Mike L. wrote:
>
> > Simen kjaeraas Wrote:
> >
> >> On Wed, 16 Dec 2009 07:25:39 +0100, Mike L.
> >> wrote:
> >>
> >> > I'm making a class template that only works with strings, so I thought
> >
Simen kjaeraas Wrote:
> On Wed, 16 Dec 2009 07:25:39 +0100, Mike L.
> 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 templat
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 it.
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...
Hello, can anybody explain why the following code compiles with -version=works
but not without?
module test;
import std.stdio;
abstract class Parent
{
int opApply(int delegate(ref int) dg)
{
int fakeDelegate(ref uint fake, ref int content)
Derek Parnell Wrote:
> On Sun, 15 Feb 2009 02:20:50 -0500, Mike L. wrote:
>
> > Can anybody explain why I get the following error:
> >
> > test.d(28): Error: test.tblahTemplate!(uint).tblah at test.d(13) conflicts
> > with
> > test.tb
if
it's a template?
Thanks,
Mike L.
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"?
Hello,
I was wondering why the following does not work:
interface A(Type)
{ Type blah(); }
template ADefaults(Type, AType : A!(Type))
{
Type blah()
{ return Type.init; }
}
class B(Type) : A!(Type)
{ mixin ADefaults!(Type, B!(Type)); }
void main()
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 reas
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
std/c/window
17 matches
Mail list logo