On Wednesday, 31 October 2012 at 23:01:52 UTC, dsmith wrote:
What is your way to import modules from other directory trees?
Here is my (incorrect?) ideal:
Given:
/home/user/library_directory/
Containing:
lib_one.d
lib_two.d
lib_interface.d
lib_interface.d source:
module lib_interface;
On 2012-18-01 23:11, They call me Mr. D khea...@eapl.org wrote:
auto i = SList!int(1, 2, 3, 4, 5, 6, 7);
auto f = SList!float(1.1, 2.234, 3.21, 4.3, 5.001, 6.2, 7.0);
auto s = SList!string([I, Hello, World]);
auto c = SList!char('a', 'b' ,'c'); // doesn't compile, get the
following
On 01/11/12 22:21, Dan wrote:
TDPL states
--
However, unlike in C++, clear does not dispose of the object’s
own memory and there is no delete operator. (D used to have a
delete operator, but it was deprecated.) You still can free
memory manually if you really, really know what you’re doing
The error is: the constructor of SList!T takes a U[] if U is
implicitly convertible to T, but forwards to insertFront which
requires a range of T. But inside phobos char[] is a range of
dchar, so if fails. Imo a clear bug.
Not sure of the exact reasons, but I think Ali is probably
right.
A
The following works, but I want to make opAssign in D take const
ref D.
It needs to still print (dup here). How can this be done?
Thanks
Dan
import std.stdio;
struct A {
char a[];
this(this) { a = a.dup; writeln((dup here)); }
}
struct B { A a; }
struct C { B b; }
struct
On 11/02/2012 05:29 AM, Dan wrote:
The following works, but I want to make opAssign in D take const ref D.
It needs to still print (dup here). How can this be done?
Thanks
Dan
import std.stdio;
struct A {
char a[];
this(this) { a = a.dup; writeln((dup here)); }
}
I know this isn't quite a right place for my problem, but you
need to wait uncertain amount of time for registration on the
official derelict forum, so I decided to start here.
import derelict.sfml2.window;
import derelict.sfml2.system;
import std.file;
void main() {
version(Posix) {
On Friday, 2 November 2012 at 18:33:39 UTC, Andrey wrote:
I know this isn't quite a right place for my problem, but you
need to wait uncertain amount of time for registration on the
official derelict forum, so I decided to start here.
Sorry. That's a problem with DSource. The maintainer
Hi,
I need to check if some value exists in a list (Array). To
achieve that, I'm using Associative Arrays like this:
// Example
void main()
{
int[char] aa = [ '+' : 0, '-' : 1];
char ch = '+';
if(ch in aa)
// doSomething()...
}
But I'm looking for a more simple way like:
if(ch