Shared Object with DMD v2.031

2009-07-29 Thread teo
I have difficulties creating a Shared Object (.so) with D. Is it possible? Can I use classes defined in the library from the executable? Here is my library file: module test; // file "test.d" export int testMe() { return 1; } export class Test { private int n; this(int i) { n = i; } i

Reading bool as the string "true" or "false"

2009-07-29 Thread Ali Cehreli
I am trying to learn to read bool as a string and have it converted to bool. Too much to ask? :) This is what I know in C++: #include #include using namespace std; int main() { cin >> boolalpha; cout << boolalpha; bool b = false; cin >> b; cout << b << endl; } cin and c

Re: stack trace hack for recent Phobos?

2009-07-29 Thread bearophile
Trass3r: >Are there any plans to include a stacktrace in Phobos2?< +100 Bye, bearophile

Re: stack trace hack for recent Phobos?

2009-07-29 Thread Trass3r
Robert Fraser schrieb: There's no Windows stack trace that works with the newest Phobos AFAIK, however if you're using D2, you could probably copy Tango's stacktrace pretty easily since it has no dependencies on Tango other than the runtime, and druntime is used in Phobos2. Really? Seems pret

Re: std.regex.replace

2009-07-29 Thread Stewart Gordon
Vladimir Voinkov wrote: std.regex.replace does not compile with wstring: Correct. Stewart.

Re: confused about scope storage class

2009-07-29 Thread Trass3r
It will be disastrous to automatically delete all referenced objects. Now that you say it, yes there could be other references to that object.

std.regex.replace

2009-07-29 Thread Vladimir Voinkov
std.regex.replace does not compile with wstring: auto x = std.regex.regex ("abc"w); wchar[] buffer = "abc"w.dup; std.regex.replace (buffer, x, "def"w);

Re: confused about scope storage class

2009-07-29 Thread Kagamin
Trass3r Wrote: > So scope for class references guarantees that the destructor is called > upon leaving the scope (why isn't this done automatically?). It will be disastrous to automatically delete all referenced objects.