That's what I thought.
I reported this bug a while ago but it didn't get a lot of
attention.
https://issues.dlang.org/show_bug.cgi?id=13337
On Tuesday, 20 January 2015 at 21:10:59 UTC, Guillaume Chatelet
wrote:
Consider the following foo.cpp
namespace A {
namespace B {
struct Type {};
int foo(Type unused){ return 42; }
}
}
Compile it : g++ foo.cpp -c -o foo.o
Then the following main.d
extern(C++, A.B) {
struct Type {}
int
Consider the following foo.cpp
namespace A {
namespace B {
struct Type {};
int foo(Type unused){ return 42; }
}
}
Compile it : g++ foo.cpp -c -o foo.o
Then the following main.d
extern(C++, A.B) {
struct Type {}
int foo(Type unused);
}
void main() {
foo(Type());
}
Compile it : dmd m
On Tue, 20 Jan 2015 17:59:38 +
JC via Digitalmars-d-learn wrote:
> The following code throws a
> core.exception.InvalidMemoryOperationError@(0), anyone have an
> idea of what is causing it?
>
> ---
>
> import std.stdio;
>
> class Test
> {
> this()
> {
> struct S
The following code throws a
core.exception.InvalidMemoryOperationError@(0), anyone have an
idea of what is causing it?
---
import std.stdio;
class Test
{
this()
{
struct Start
{
string filename;
}
On Tue, 20 Jan 2015 14:45:26 +
bearophile via Digitalmars-d-learn
wrote:
> ketmar:
>
> > Jonathan explains it very well. i can add the only thing: don't
> > use `const` until you forced to. ;-)
>
> In D use immutable (or const) everywhere you can. Possibly mark
> as immutable everything d
ketmar:
Jonathan explains it very well. i can add the only thing: don't
use `const` until you forced to. ;-)
In D use immutable (or const) everywhere you can. Possibly mark
as immutable everything doesn't need to mutate.
sure, you can cast `const` away in your code, but using `cast`
is a
On 1/20/15 9:07 AM, ketmar via Digitalmars-d-learn wrote:
On Tue, 20 Jan 2015 07:00:31 -0500
Steven Schveighoffer via Digitalmars-d-learn
wrote:
https://issues.dlang.org/show_bug.cgi?id=14014
So it looks like it's a DMD bug and we should not include that module.
sorry, i can't see how this
On Tue, 20 Jan 2015 09:29:45 +
qqiang via Digitalmars-d-learn
wrote:
> I am writing a tree data structure, and I have the following code:
>
> ```D
> final class Node {
> private {
> int val_;
> Node parent_;
> Node left_;
> Node right_;
> }
>
> @proper
On Tue, 20 Jan 2015 07:00:31 -0500
Steven Schveighoffer via Digitalmars-d-learn
wrote:
> On 1/19/15 4:49 PM, Steven Schveighoffer wrote:
>
> > I figured it out, poll.d is missing from here:
> >
> > https://github.com/D-Programming-Language/druntime/blob/master/mak/SRCS
> >
> > So it's for some r
Rikki Cattermole:
I'm guessing something along these lines:
A Phobos patch:
https://github.com/D-Programming-Language/phobos/pull/2881
Bye,
bearophile
Probably borrowed from java:
http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.12.4
On 1/19/15 4:49 PM, Steven Schveighoffer wrote:
I figured it out, poll.d is missing from here:
https://github.com/D-Programming-Language/druntime/blob/master/mak/SRCS
So it's for some reason not purposely included.
I think there's an expectation (I'm probably guilty of this too) that if
you i
On 21/01/2015 12:58 a.m., RuZzz wrote:
Alexandrescu "The_D_Programming_Language"
page 264: 7.1.10 Subtyping with structs. The @disable Attribute
import std.stdio;
...
unittest {
auto a = Final!Widget(new Widget);
a.print(); // Fine, just print a
auto b = a; // Fine, a and b are bound to the same
Alexandrescu "The_D_Programming_Language"
page 264: 7.1.10 Subtyping with structs. The @disable Attribute
import std.stdio;
...
unittest {
auto a = Final!Widget(new Widget);
a.print(); // Fine, just print a
auto b = a; // Fine, a and b are bound to the same Widget
a = b; // Error!
// opAssign(Fina
On Tuesday, 20 January 2015 at 09:38:55 UTC, Mathias LANG wrote:
On Tuesday, 20 January 2015 at 08:55:58 UTC, BlackEdder wrote:
Solved it. I had a _fromJSON comment somewhere else in the
file and the underscore causes ddoc to fail
If you could reduce it to a manageable size and post it to
h
On Monday, 19 January 2015 at 21:23:47 UTC, Nordlöw wrote:
On Monday, 19 January 2015 at 20:54:50 UTC, Steven
Schveighoffer wrote:
Cool. I would point out that the commented code suggests you
should be handling the 0 case, but you are not (when T.min ==
T.max)
I believe that should trigger a
On Tuesday, January 20, 2015 09:29:45 qqiang via Digitalmars-d-learn wrote:
> I am writing a tree data structure, and I have the following code:
>
> ```D
> final class Node {
> private {
> int val_;
> Node parent_;
> Node left_;
> Node right_;
> }
>
> @property
> const(N
On Tuesday, 20 January 2015 at 08:55:58 UTC, BlackEdder wrote:
Solved it. I had a _fromJSON comment somewhere else in the file
and the underscore causes ddoc to fail
If you could reduce it to a manageable size and post it to
https://issues.dlang.org/ that'll be super cool :)
On Tuesday, 20 January 2015 at 09:29:46 UTC, qqiang wrote:
I am writing a tree data structure, and I have the following
code:
```D
final class Node {
private {
int val_;
Node parent_;
Node left_;
Node right_;
}
@property
const(Node) maximum() con
I am writing a tree data structure, and I have the following code:
```D
final class Node {
private {
int val_;
Node parent_;
Node left_;
Node right_;
}
@property
const(Node) maximum() const {
auto ret = this;
Solved it. I had a _fromJSON comment somewhere else in the file
and the underscore causes ddoc to fail
On Monday, 19 January 2015 at 20:47:42 UTC, BlackEdder wrote:
I'm trying to use ddoc to generate documentation, but get the
following error:
$ dub -b docs
Building configuration "library", bu
22 matches
Mail list logo