Duplicated functions not reported?

2017-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
I'm not sure if I'm missing something obvious here, but the following code compiles and runs: void foo() {} void foo() {} void main() {} Although if I do call "foo", the compiler will complain that it matches both versions of "foo". Is this expected behavior of how function overloading work

Re: Duplicated functions not reported?

2017-04-15 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 15 April 2017 at 09:17:08 UTC, Jacob Carlborg wrote: I'm not sure if I'm missing something obvious here, but the following code compiles and runs: void foo() {} void foo() {} void main() {} Although if I do call "foo", the compiler will complain that it matches both versions of

Re: Compilation problems with GDC/GCC

2017-04-15 Thread DRex via Digitalmars-d-learn
On Friday, 14 April 2017 at 18:00:22 UTC, Johannes Pfau wrote: Am Fri, 14 Apr 2017 13:03:22 + schrieb DRex : GDC should generally only need to link to -lgdruntime (and -lgphobos if you need it). However, if you really link using ld you'll have to provide the C startup files, -lc and simil

Re: Compilation problems with GDC/GCC

2017-04-15 Thread DRex via Digitalmars-d-learn
On Saturday, 15 April 2017 at 12:45:47 UTC, DRex wrote: On Friday, 14 April 2017 at 18:00:22 UTC, Johannes Pfau wrote: Am Fri, 14 Apr 2017 13:03:22 + schrieb DRex : GDC should generally only need to link to -lgdruntime (and -lgphobos if you need it). However, if you really link using ld

Re: Compilation problems with GDC/GCC

2017-04-15 Thread DRex via Digitalmars-d-learn
On Saturday, 15 April 2017 at 13:02:43 UTC, DRex wrote: On Saturday, 15 April 2017 at 12:45:47 UTC, DRex wrote: Update to the Update, I fixed the lib failing to open by copying it to the location of my sources, and setting the ld to use libraries in that folder, however I am still getting th

Re: Compilation problems with GDC/GCC

2017-04-15 Thread DRex via Digitalmars-d-learn
On Saturday, 15 April 2017 at 13:08:29 UTC, DRex wrote: On Saturday, 15 April 2017 at 13:02:43 UTC, DRex wrote: On Saturday, 15 April 2017 at 12:45:47 UTC, DRex wrote: Update to the Update, I fixed the lib failing to open by copying it to the location of my sources, and setting the ld to use

std.net.curl: how to abort operation

2017-04-15 Thread mab via Digitalmars-d-learn
I want to abort a download, if a condition inside of onReceiveHeader is true. The following code do the job, but it feels very wrong - is there a better/proper way to do such a thing? client.onReceiveHeader = (in char[] key, in char[] value) { if(key == "content-type") { if( -1 == value.i

Re: Duplicated functions not reported?

2017-04-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-04-15 13:10, Stefan Koch wrote: It would requires an O(n^2) check per declaration. Even it is never used. which would make imports that much more expensive. Does it need to be that bad? Isn't it possible to do some simple checks with less overhead? Something like first checking the na

Re: Command Line Parsing

2017-04-15 Thread Jon Degenhardt via Digitalmars-d-learn
On Wednesday, 12 April 2017 at 09:51:34 UTC, Russel Winder wrote: Are Argon https://github.com/markuslaker/Argon or darg https://github. com/jasonwhite/darg getting traction as the default command line handling system for D or are they just peripheral and everyone just uses std.getopt https:/

What is a few good ways to parse tokens with cassv

2017-04-15 Thread Jethro via Digitalmars-d-learn
I have to parse a cassv in to tokens but want to keep group element that use comma's and spaces as as single token: e.g., a /*b, c*/, d should be split a b, c d and not a /*b, c*/ d or a b c d

SFML gcc - MacOS

2017-04-15 Thread Joel via Digitalmars-d-learn
In getting DSFML (http://dsfml.com/) working. I found gcc takes for ever to install, is there some thing wrong? (I posted in https://github.com/Jebbs/DSFML, but no replies). Maybe just install Xcode CLT (some how), and uninstall gcc. I've had this problem for a while now. I would appreciate a

Re: Strange stack variable corruption error after calling extern(C) function

2017-04-15 Thread cc via Digitalmars-d-learn
On Saturday, 15 April 2017 at 00:23:42 UTC, Lewis wrote: Holy crap, thank you. I know this is late, but I was playing around with derelictFMOD, and ran into a strange crash like yours on shutdown. Looking at the disassembly revealed that FMOD_System_Close() was popping more off the stack as it