"Jonathan M Davis" wrote in message
news:mailman.659.1327175391.16222.digitalmars-d-le...@puremagic.com...
>
> It's partially available. It just isn't fully implemented, and I don't
> know
> what's missing from it. And I have no idea when it will be fully
> implemented.
> You can certainly use
"Jonathan M Davis" wrote in message
news:mailman.659.1327175391.16222.digitalmars-d-le...@puremagic.com...
> It's partially available. It just isn't fully implemented, and I don't
> know
> what's missing from it. And I have no idea when it will be fully
> implemented.
> You can certainly use it
"Jonathan M Davis" wrote in message
news:mailman.11.1327521278.25230.digitalmars-d-le...@puremagic.com...
> As http://d.puremagic.com/issues/show_bug.cgi?id=4788 points out,
> extern(System) isn't properly documented, so I have no idea what it
> translates
> to. Does anyone know what exactly it
Differing part:
FNaNb xdZ d6
PFNaNbNfxdZxd6
P -> pointer
Nf -> @safe
x -> const
The second one is a function pointer not a function, is inferred to be
@safe, and inferred to return const(double).
"bearophile" wrote in message
news:jfs683$2mqh$1...@digitalmars.com...
> I'm asking questions
Have you looked at std.variant? It sounds like what you're looking for.
"NewName" wrote in message
news:jg2du7$2nun$1...@digitalmars.com...
> Hello everybody.
> So I heard that `delete' is being deprecated?
>
When delete is gone, you will still be able to destroy class instances with
'clear' from phobos. Like delete, it runs the destructor on the class, it
just d
Yes. clear is in object.d so it will always be available.
"NewName" wrote in message
news:jg2fdj$2rmk$1...@digitalmars.com...
> Thanks Daniel.
> So clear() is a function thing, so my delete mmf; will look like
> clear(mmf); am I
> right?
>
The way to avoid purity checking is to put code in a debug {} statement.
I'm not aware of any plans to disable purity checking for contracts.
"Simen Kjærås" wrote in message
news:op.v8wj38qf0gp...@biotronic.lan...
> On Mon, 30 Jan 2012 13:58:38 +0100, sami wrote:
>
>> when i do that auto x = [1, "ha"];
>> i have an error Error: incompatible types for ((1) ? ("hgh")): 'int' and
>> 'string'
>> if there any method to combine different d
void func(alias G)(object O) if (is(typeof(G(O)) == void)) {
"H. S. Teoh" wrote in message
news:mailman.295.1328245356.25230.digitalmars-d-le...@puremagic.com...
> Quick question: I have a function that takes an alias parameter:
>
> struct X { ... };
>
> void func(alias G)(object O) {
> ...
> X
char[] and wchar[] could still define a put method, which would make them
output ranges. This is worth a bug report.
"Ali Çehreli" wrote in message
news:jgh4a1$1286$1...@digitalmars.com...
> This I knew: Being UTF-8 and UTF-16 encodings, and because those encodings
> are variable-width, char[
"bearophile" wrote in message
news:jgi3jn$2o6p$1...@digitalmars.com...
> I'd like to ask this to be valid, to shorten my code:
> alias immutable imm;
> Is this silly?
>
Yes =)
immutable might be more characters than you want to type, but at this point
it's extremely unlikely it will be changed
A limitation of the current implementation. Associative arrays are built on
the heap, and you can't currently build things on the heap and have them
exist at runtime.
The best current workaround is probably:
static int[string] table;
static this()
{
table = ["abc":1, "def":2, "ghi":3];
}
or
Return a struct containing a function pointer.
"Tobias Pankrath" wrote in message
news:jglvvq$7jr$1...@digitalmars.com...
> Is there any better way to write a function that can return a pointer to
> itself than returning void* and cast at call site to the appropiate type?
>
"Vidar Wahlberg" wrote in message
news:jgm2qk$c2g$1...@digitalmars.com...
> Adding a note about GDC (4.6.2) here:
> It appears like it ignores "module ;" and always use the filename
> for module name (or I've misunderstood what "module" is used for). If I
> create a file "Foo.d" which contains
I guess you've found a bug then. :)
"Vidar Wahlberg" wrote in message
news:jgm7sh$k4u$1...@digitalmars.com...
> On 2012-02-05 15:19, Daniel Murphy wrote:
>> The names only need to match if the compiler/build tool has to find the
>> module itself. If you call
"simendsjo" wrote in message
news:jgo9if$1mg9$1...@digitalmars.com...
> Should purity be checked at all if used with an enum?
I don't think so.
http://d.puremagic.com/issues/show_bug.cgi?id=6169
https://github.com/D-Programming-Language/dmd/pull/652
I wouldn't hold my breath.
"simendsjo" wrote in message
news:jgoejk$23j1$1...@digitalmars.com...
> On 02/06/2012 11:46 AM, Daniel Murphy wrote:
>> "simendsjo" wrote in message
>> news:jgo9if$1mg9$1...@digitalmars.com...
>>> Should purity be c
http://d.puremagic.com/issues/show_bug.cgi?id=2599
"Matthias Walter" wrote in message
news:mailman.71.1328567829.20196.digitalmars-d-le...@puremagic.com...
> Hi,
>
> I'd like to have a function foo which shall depend on several
> compile-time expressions (e.g. strings) and gets several arguments
It seems the problem you've run into is that a class reference cannot be
tail-const.
Pointers can be tail-const like this:
const(Data)*
but there is no way currently (there are proposals) to make only the data
and not the reference const.
A workaround is to use Rebindable in std.typecons.
An a
"Jonathan M Davis" wrote in message
news:mailman.306.1329166430.20196.digitalmars-d-le...@puremagic.com...
> Ideally perhaps, but I expect that that's not true, because operator
> overloading is done via lowering.
>
> foo() ~ bar()
>
> would become
>
> opBinary!"~"(foo(), bar());
>
While your po
"Jonathan M Davis" wrote in message
news:mailman.508.1329531876.20196.digitalmars-d-le...@puremagic.com...
>
> They have nothing to do with octal in that they were not intentionally
> octal.
> I was merely using the leading 0 without thinking about it, because having
> leading 0s generally makes
scope/scoped isn't broken, they're just not safe. It's better to have an
unsafe library feature than an unsafe language feature.
Unless you have an expectation that other people are already using the old
version of your branch, just use 'git push blah -f' to overwrite the old
version. It's not a big deal for patches and pull requests, but it would be
a disaster if anyone did this to the master branch.
"H. S. Teoh" wrot
"Andrej Mitrovic" wrote in message
news:mailman.364.1330825349.24984.digitalmars-d-le...@puremagic.com...
> import std.stdio;
> void check() { writeln("check"); }
>
> struct Foo { bool isTrue = true; }
> struct Bar { }
>
> void test(T)(T t)
> {
>static if (is(T == Foo))
>{
>if (t.
"simendsjo" wrote in message
news:op.wanctrbux8p62v@simendsjo-desktop...
> Hi.
> I have the following code:
> void f(Args...)(Args args) {
> needs_wchar_t(args);
> }
>
> I want to loop over Args, and if it's a string of some type, I want to run
> it through toUTFz. For all other values, I jus
"Denis Shelomovskij" wrote in message
news:jj9uv1$8o$1...@digitalmars.com...
> 1. Is there any guaranties that no code will be added between sequential
> inline assembler blocks, e.g.:
> ---
> void f()
> {
> static if(x)
> asm { mov EBX, 3; }
> else
> asm { mov EBX, 7; }
"H. S. Teoh" wrote in message
news:mailman.719.1331847338.4860.digitalmars-d-le...@puremagic.com...
> Actually, I discovered that my origin/master branch was also broken
> (probably due to running the wrong git command in it in the past),
> because it had a bunch of commits from upstream that fo
It could be that the string returned from the regex looks the same as the
hardcoded string but contains characters that don't show up when you print
it.
Does adding
assert(regexResult == expectedFilename);
throw?
"Simen kjaeraas" wrote in message
news:op.vewf53itvxi...@biotronic-pc.lan...
>I hav
"strtr" wrote in message news:i1lro6$307...@digitalmars.com...
> == Quote from bearophile (bearophileh...@lycos.com)'s article
>> strtr:
>> > Not that the memory is really significant compared to the rest of my
>> > program,
>> > but I have a few fairly large arrays I use only in compile time and
"strtr" wrote in message news:i1ql53$306...@digitalmars.com...
> == Quote from Daniel Murphy (yebbl...@nospamgmail.com)'s article
>> I think if you use enum instead of const/immutable the compiler is not
>> meant
>> to put them in the executable (it mi
"Steven Schveighoffer" wrote in message
news:op.vi64pdhveav...@localhost.localdomain...
> Second, std.algorithm.count looks like this:
>
> size_t count(alias pred = "a == b", Range, E)(Range r, E value) if
> (isInputRange!(Range))
>
> So, E can be any type, completely unrelated to strings, I cou
"Peter Federighi" wrote in message
news:ial8hq$213...@digitalmars.com...
> Is there a way to do it without removing handler() from the class? When I
> try
> compiling, I get: Error: cannot implicitly convert expression
> (&this.handler)
> of type void delegate(int signal) to void C function(in
What happens if you make pattern const?
"bearophile" wrote in message
news:ibn320$2uc...@digitalmars.com...
> In a not-ranged cases body, like in the program below (that doesn't
> compile), the switch variable is a compile-time constant, so why doesn't
> the compile see x as constant there?
In switch statements, you can do stuff lik
"Tom" wrote in message news:ic7nq3$6i...@digitalmars.com...
> Do I have to do this?
>
> file.write(cast(string)"hello");
You can set the type of a string literal using a suffix:
"hello"c - string
"hello"w - wstring
"hello"d - dstring
I might be off track, but I think I know what you're getting at.
You want to define a set of module scope variable that are initialized when
the program starts up:
eg. A struct that stores information loaded from a configuration file (can't
be done at compile time)
module foo;
struc
"Christopher Nicholson-Sauls" wrote in message
news:ie28aa$18b...@digitalmars.com...
> This
> surprises me, and certainly has to be a bug.
>
http://d.puremagic.com/issues/show_bug.cgi?id=3797
"Mandeep Singh Brar" wrote in message
news:ihf3gs$2kve$1...@digitalmars.com...
> Hi,
>
> I was just thinking if implementing interfaces as abstract classes could
> be a workaround. Since D anyways allows multiple inheritance, so would it
> make sense
> to just declare interfaces as abstract cla
"Andrej Mitrovic" wrote in message
news:mailman.764.1295584412.4748.digitalmars-d-le...@puremagic.com...
> Speaking of COM.. has anyone successfully used COM interfaces in D2?
> I'm asking because a few months ago I gave them a try but I kept
> having random access violations. And I *do* mean ran
"Ellery Newcomer" wrote in message
news:ihl0vh$1n8v$1...@digitalmars.com...
> in the following:
>
> void main(){
> char[] x;
> string s;
> string y;
>
> y = s ~ x;
> }
>
> tok.d(5): Error: cannot implicitly convert expression
> (cast(const(char)[])s ~ x) of type char[] to string
>
> why
"Jesse Phillips" wrote in message
news:ij2drt$1mq3$1...@digitalmars.com...
>
> Magic.
>
> No really, the best I can tell is that the compiler will try to run the
> foreach loop at compile-time if there is something in the body that must
> be evaluated at compile time.
>
Actually this happens b
Assuming you've checked that dlopen isn't returning null, I can't find the
source of the error in that code, sorry.
Unsolicited advice:
Is there any reason you're manually loading the dll rather than using an
import library?
A couple of remarks about the rest of the code:
Generally in D the c
"Peter Alexander" wrote in message
news:itlk5g$e7t$1...@digitalmars.com...
> I've been having strange linker errors recently and I have no ideas why
> they've started happening.
>
> Undefined symbols:
> "_D3std9exception7bailOutFAyaixAaZv", referenced from:
> _D3std9exception148__T7enforceTb
"Ali Çehreli" wrote in message
news:iuqja8$7nl$2...@digitalmars.com...
> { bool result = ElementType!Range.init is null; } ))
is(typeof(ElementType!Range.init is null))
__traits(compiles, cast(void)ElementType!Range.init is null)
__traits(compiles, { return ElementType!Range.init is null; })
sho
"Johann MacDonagh" wrote in message
news:iusp80$vnr$1...@digitalmars.com...
> Although CTFE supports ref parameters, swap doesn't appear to work. This
> casues dmd to segfault in 2.053 and the current dmd master.
>
> import std.algorithm;
> import std.stdio;
>
> string ctfeRef(ref string a, ref
"bearophile" wrote in message
news:iut093$1bjg$1...@digitalmars.com...
> Daniel Murphy:
>
>> Same thing happens with pointers. Reduced:
>
> Pointers to structs in CTFE will work in DMD 2.054 :-)
When they don't crash the compiler, that is.
http://d.puremagic.com/issues/show_bug.cgi?id=6250
Looks like a bug. Please file.
"bearophile" wrote in message
news:iv0eki$1d8e$1...@digitalmars.com...
> With DMD 2.053 the second assert of this program fires, is this a DMD bug
> or it's me that's missing something?
>
>
> struct Foo {
>int[] data;
>
>this(int n) {
>data.length
Maybe something like TypeTuple!(foo ,bar) will work.
"Andrej Mitrovic" wrote in message
news:mailman.1452.1310006894.14074.digitalmars-d-le...@puremagic.com...
> void foo(){};
> void bar(){};
>
> void main()
> {
>auto funcs = [&foo, &bar];
> }
>
> I'm using this in a foreach loop and invoki
"Steven Schveighoffer" wrote in message
news:op.vybo0hv1eav7ka@localhost.localdomain...
> 1. is a horrible legacy thing, and should be removed.
>
> -Steve
This I hate, but I'd hate to lose 1.f and 1.L
"Steven Schveighoffer" wrote in message
news:op.vygk71eweav7ka@localhost.localdomain...
>
> What's wrong with 1.0f and 1.0L ?
>
> -Steve
It's one character longer!
Mostly it's just a habit I've gotten into. I'd likely be able to get used
to writing the zero fairly easily.
"Steven Schveighoffer" wrote in message
news:op.vygm6auqeav7ka@localhost.localdomain...
>
> 1f is one character shorter :P (BTW, not sure the grammar currently
> supports this one, even though it compiles. I think:
>
> Integer FloatSuffix
>
> should be added.
>
> I admit, there is no equivalent
"Andrej Mitrovic" wrote in message
news:mailman.1569.1310506439.14074.digitalmars-d-le...@puremagic.com...
> Is this going to be fixed any time soon? Allowing callbacks with D
> calling convention where a C callback is expected should be an error,
> and this is like the 10th time I've ran into th
"Andrej Mitrovic" wrote in message
news:mailman.1607.1310570915.14074.digitalmars-d-le...@puremagic.com...
> Thanks! I've literally lost an entire day once when I was just
> starting using D and C together and had a calling convention mismatch.
> :x
It's worse than just calling conventions - try
Yeah, type deduction with modifiers is inconsistent.
In some cases matching T to const(U) gives U == tailconst(T), but not in
others.
The problem exists with pointers, arrays, and (if we ever get it) Michel
Fortin's const(Object)ref.
A big part of the problem is that it can match with implicit
I don't think there's a bug report specifically on this.
"bearophile" wrote in message
news:ivmigl$98a$1...@digitalmars.com...
> Daniel Murphy:
>
>> Yeah, type deduction with modifiers is inconsistent.
>>
>> In some cases matching T to const(U) g
Cast to ubyte* and slice?
ubyte[] array = (cast(ubyte*)pointer)[0..length];
"teo" wrote in message
news:ivn0n8$14ig$1...@digitalmars.com...
> Is there any way of wrapping a void* by a ubyte[] array? The void* comes
> from mmap.
"Jonathan M Davis" wrote in message
news:mailman.1687.1310805329.14074.digitalmars-d-le...@puremagic.com...
> Under what circumstances would a comparison of floating point values
> return
> true for is but not ==? If I understand corcectly, is does a bit-by-bit
> comparison. So, I would expect t
I'd recommend using Don's isIdentical (or something like that) in std.math
until it's fixed.
"Jonathan M Davis" wrote in message
news:mailman.1689.1310808023.14074.digitalmars-d-le...@puremagic.com...
> Hmm. Good to know. But assuming that two floating point values have the
> same
> bit pattern, shouldn't == return true for them? So, if == is failing, then
> two
> floating point values
"Jonathan M Davis" wrote in message
news:mailman.1690.1310809801.14074.digitalmars-d-le...@puremagic.com...
> I tried both casting to an integer of the appropriate size and swapping
> that
> and doing this:
>
> private T swapEndianImpl(T)(T val)
>if(isFloatingPoint!T)
> {
>import std.alg
"Jonathan M Davis" wrote in message
news:mailman.1705.1310853321.14074.digitalmars-d-le...@puremagic.com...
> I suspect that the problem is a combination of issues with NaN and real.
> If I
> change the first three tests (which test init which is NaN) to is, then
> they
> pass, but the test for
"Jonathan M Davis" wrote in message
news:mailman.1708.1310882400.14074.digitalmars-d-le...@puremagic.com...
> I'm on Linux.
>
> I need to do whatever will result in the correct value with == if that is
> at
> all possible. The question the is twofold:
>
> 1. How to make it so that swapping the e
That would be http://d.puremagic.com/issues/show_bug.cgi?id=2634
"Rolv Seehuus" wrote in message
news:ivug6b$o7o$1...@digitalmars.com...
> Hi all,
>
> First post - I'm learning D, 10yrs exp. with C++.
>
> While trying to generate a static table of functions using lambdas compile
> time using mi
"Rolv Seehuus" wrote in message
news:j04qff$i4s$1...@digitalmars.com...
> Is there a related/same reason why this don't compile?
>
> unittest {
> static void stuff(){}
> static void function()[string] functions = [ "stuff":&stuff ];
> }
That compiles for me.
Use extern(System)?
"Heinz" wrote in message
news:j12hkk$2mcd$1...@digitalmars.com...
> Hello D community!!!
>
> I'm porting the NVIDIA CUDA headers to D. The CUDA platform runs on
> multiple
> OS, so functions prototypes (in the D way) are declared as
> "extern(Windows)
> ..." for MS Windows
It is documented!
http://www.digitalmars.com/d/1.0/attribute.html#linkage
http://www.digitalmars.com/d/2.0/attribute.html#linkage
"Heinz" wrote in message
news:j12itk$2o99$1...@digitalmars.com...
> Thanks, extern(System) seems to do the job under windows at least, i hope
> it
> switch to extern
The problem is the parameter p is not being heap allocated. I'm fairly sure
it's already in bugzilla, something about failing to detect escaping
references with alias parameters.
"bearophile" wrote in message
news:j0vhod$t87$1...@digitalmars.com...
> D2 code:
>
>
> import std.stdio, std.algor
"Andrej Mitrovic" wrote in message
news:mailman.2651.1315000369.14074.digitalmars-d-le...@puremagic.com...
> On 9/2/11, Steven Schveighoffer wrote:
>> Am I missing something, or is it this simple?
>>
>> void appendMenuButton()
>> {
>> static size_t menuIndex;
>> auto frameIndex = menuInd
No, this is http://d.puremagic.com/issues/show_bug.cgi?id=4953
"Erik Baklund" wrote in message
news:j3u33n$1f87$1...@digitalmars.com...
> Hi,
>
> Do anybody know if the implicit casting rules of float[] in the example
> below,
> works as intended?
>
> E.
>
> --
>
> // dmd v2.054
> module main;
The good news is there are two possible patches that should fix it.
"Erik Baklund" wrote in message
news:j3v9dk$ero$1...@digitalmars.com...
> Thanks!
> Ouch, the regression is still not fixed after almost one year.
> I have put a vote on it.
> E.
"Ellery Newcomer" wrote in message
news:j557r6$vgt$1...@digitalmars.com...
> Just came across some old D code that does this:
>
> version(linux){
> extern(C):
> }
>
Are the prototypes extern(Windows) when not on linux, by any chance? That
is the only combination I've ever had to use, and is su
"Steven Schveighoffer" wrote in message
news:op.v13w8td2eav7ka@localhost.localdomain...
> On Tue, 20 Sep 2011 07:33:20 -0400, bearophile
> wrote:
>
>> void foo(const ref int[5] a) {}
>> void main() {
>> immutable int[5] arr;
>> foo(arr); // Error?
>> }
>
> The complaint from the compile
"Jesse Phillips" wrote in message
news:j5gfsa$2d5g$1...@digitalmars.com...
> Thank you this lets it compile. I think I had that somewhere, but forgot
> about it. As Steve mentions, it probably should also work for const
> arguments too.
It probably will, eventually. Some expressions can be pr
"Andrej Mitrovic" wrote in message
news:mailman.142.1316903007.26225.digitalmars-d-le...@puremagic.com...
>
> Is it possible to expand the phobos tuple in the call to test()? I can
> use the isTuple template in a `static if` to figure out if it needs
> expansion, so all that's left is to actually
The implicit conversion to immutable is only possible inside strongly pure
functions. When the parameter is 'in int[]' foo cannot be strongly pure,
only const pure. As 'in int[2]' is a value type, the second foo can be
strongly pure.
'new' expressions will hopefully be able to be converted to
"Steven Schveighoffer" wrote in message
news:op.v3h06olweav7ka@localhost.localdomain...
>
> That sounds like an incorrect restriction. The implicit cast to immutable
> should depend on whether the function being *called* qualifies, not if the
> function you are calling *from* qualifies.
>
I t
"bearophile" wrote in message
news:j7jepi$prp$1...@digitalmars.com...
> Daniel Murphy:
>
>> 2)
>> immutable(int[]) fun() { return new int[]; } // conversion happens here
>> immutable x = fun();
>>
>> Bearophile's example is of the second, wh
"Steven Schveighoffer" wrote in message
news:op.v3lug2q2eav7ka@localhost.localdomain...
> On Tue, 18 Oct 2011 02:40:12 -0400, Daniel Murphy
> wrote:
>
>> "Steven Schveighoffer" wrote in message
>> news:op.v3h06olweav7ka@localhost.localdomain
"Jesse Phillips" wrote in message
news:vaatltklsmbmdnabo...@forum.dlang.org...
Wish it would work with @safe and nothrow too, granted writeln should
eventually be @safe/trusted anyway.
I just travelled back in time and granted your wish!
int x;
int* p;
void main() pure nothrow @safe
{
"evilrat" wrote in message news:mxhmgkljrzqhaymec...@forum.dlang.org...
On Friday, 28 February 2014 at 04:19:47 UTC, Etienne Cimon wrote:
>
> How do you stop statements from belonging to the specific version of
> code without using brackets?
add "version(all):" after code where specific versi
On Friday, 4 April 2014 at 04:10:51 UTC, Saurabh Das wrote:
Hello,
Say I compile a program with:
dmd -unittest -debug -cov test.d
Then, when I run ./test, a file 'test.lst' is generated in the
current working directory. Is there a way in which I can
instruct the file to be created in a separ
"Byron" wrote in message news:li1ba2$5lc$1...@digitalmars.com...
So does anyone have a fool prof way of converting coff to omf libs. I
feel like this use to be easy..
In general, this won't work. The only thing that is straightforward and
reliable is converting coff import libraries to omf
"Jonathan M Davis" wrote in message
news:mailman.112.1397351369.5999.digitalmars-d-le...@puremagic.com...
Honestly, I would have considered that to be a bug. Converting the return
type
to a different level of mutability based on purity is one thing.
Automatically
casting the return value just
"bearophile" wrote in message news:hxdrbyqrhwvuochlh...@forum.dlang.org...
Is it possible and a good idea to allow code like the function
foo2?
It seems reasonable.
daoryn Wrote:
> According to http://digitalmars.com/d/2.0/template.html it is possible to
> specify template specialization so that DMD prefers them when instanciating
> templates, however the following code:
>
>
> -
> import std.stdio;
>
> void print(T)(T thin
Steve Teale Wrote:
> Which bit of the spec for template instantiation is it that allows the
> last two lines of the following to compile and work?
>
> import std.stdio;
>
>
> struct A
> {
> int a;
> }
>
> template Thingie(T)
> {
> static if (is(T == int))
> enum Thingie = 1;
>
Gythzel Wrote:
> (relating code at http://dpaste.com/156595/ on D2)
>
> This is a very trimmed version of something I'm experimenting with, so the
> design of the code is not the issue. The problem is what happens on the
> "accepter" function.
>
> After the Socket.select returns 1 (meaning, 1
It should work if you treat the dynamic array like a pointer and a length.
eg:
glBufferData(GL_ARRAY_BUFFER, (vertices[0]).sizeof * vertices.length,
vertices.ptr, GL_STATIC_DRAW);
It's probably because (type).sizeof gives the number of bytes to hold the
type.
For dynamic arrays
On 25/11/2015 2:16 PM, Rikki Cattermole wrote:
On 25/11/15 1:47 AM, Meta wrote:
I'm pretty sure you can just do:
wstring text = "my string";
Or
auto text = "my string"w;
The second one is correct yes.
I'm just assuming that it isn't compiled into the executable.
Either is fine. Non-suffi
On 21/11/2015 10:46 PM, BBaz wrote:
Seems to be fixed:
__
import std.math;
void main() {real function(real) c = &sin;}
__
https://issues.dlang.org/show_bug.cgi?id=4541
At least it works on linux x86_64.
It works because of
https://github.com/D-Prog
On 4/12/2015 8:38 AM, Chris Wright wrote:
An object reference is just a pointer, but we can't directly cast it. So
we make a pointer to it and cast that; the type system allows it. Now we
can access the data that the object reference refers to directly.
Casting is fine too: cast(void*)classRef
"Yuriy" wrote in message news:uflaemdlxvavfmvkb...@forum.dlang.org...
Hello, is there a way of reducing size of an empty class to just
vtbl? I tried to declare it as extern(C++) which works, but has a
nasty side effect of limited mangling.
What exactly is the mangling problem with extern(C++
On Tuesday, 13 May 2014 at 17:41:42 UTC, Yuriy wrote:
On Tuesday, 13 May 2014 at 17:09:01 UTC, Daniel Murphy wrote:
What exactly is the mangling problem with extern(C++) classes?
Can't use D arrays (and strings) as function argument types.
Can't use D array types as template argument
"Yuriy" wrote in message news:rfirqtgbparjbqxwt...@forum.dlang.org...
On Wednesday, 14 May 2014 at 08:47:38 UTC, Daniel Murphy wrote:
> I'm not getting any errors with the development head. What os/compiler
> version?
Hm, now that's strange. Building with latest pu
"Yuriy" wrote in message news:klosrzuxwmvilupzz...@forum.dlang.org...
Ok, i can understand that, but what about this one:
http://dpaste.dzfl.pl/6a9961e32e6d
It doesn't use d arrays in function interfaces. Should it work?
Similar problem, D arrays cannot be mangled correctly with C++ mangling.
"Jonathan M Davis via Digitalmars-d-learn" wrote in message
news:mailman.1421.1401576730.2907.digitalmars-d-le...@puremagic.com...
> By dynamic linking do you mean LoadLibrary or linking with import
> library?
Both will work, otherwise we couldn't use Microsoft's libraries - e.g.
std.windows.
"Brian Schott" wrote in message
news:pbfgiwaxsdxdxetpi...@forum.dlang.org...
The "delete" keyword is deprecated[1] and making that decision never broke
any code.
[1] http://dlang.org/deprecate.html#delete
If you look at the table up the top, delete hasn't actually been deprecated
yet. If
"Jonathan M Davis" wrote in message
news:xjmfhegvanqdivhbt...@forum.dlang.org...
AFAIK, the only reason that it's not deprecated is that no one has
bothered to make the change (and you didn't want to deprecate it when you
went through all of those and updated their status a while back). Andr
On 27/09/2015 3:14 AM, cym13 wrote:
On Saturday, 26 September 2015 at 17:08:00 UTC, Nordlöw wrote:
Why is the following code not pure:
float x = 3.14;
import std.conv : to;
auto y = x.to!string;
???
Is there a reason for it not being pure? If not, this is a serious
problem as thi
100 matches
Mail list logo