Re: How to import for mixin contents only.

2016-03-10 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 22:07:23 UTC, Andrea Fontana wrote: On Thursday, 10 March 2016 at 17:43:08 UTC, Taylor Hillegeist wrote: I suppose the linker optimized the functions away since they are now in their own section. But it seems a hacky way to do this. AFAIK assert(0) and other fals

Re: How to import for mixin contents only.

2016-03-10 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 10 March 2016 at 17:43:08 UTC, Taylor Hillegeist wrote: I suppose the linker optimized the functions away since they are now in their own section. But it seems a hacky way to do this. AFAIK assert(0) and other falsey assert have a special meaning for compiler. So probably it's no

Re: How to import for mixin contents only.

2016-03-10 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 17:24:51 UTC, Taylor Hillegeist wrote: On Thursday, 10 March 2016 at 17:22:58 UTC, Taylor Hillegeist wrote: On Thursday, 10 March 2016 at 17:05:26 UTC, Taylor Hillegeist wrote: On Thursday, 10 March 2016 at 16:51:32 UTC, Andrea Fontana wrote: On Thursday, 10 March

Re: How to import for mixin contents only.

2016-03-10 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 17:22:58 UTC, Taylor Hillegeist wrote: On Thursday, 10 March 2016 at 17:05:26 UTC, Taylor Hillegeist wrote: On Thursday, 10 March 2016 at 16:51:32 UTC, Andrea Fontana wrote: On Thursday, 10 March 2016 at 16:20:42 UTC, Taylor Hillegeist wrote: [...] I wonder if c

Re: How to import for mixin contents only.

2016-03-10 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 17:05:26 UTC, Taylor Hillegeist wrote: On Thursday, 10 March 2016 at 16:51:32 UTC, Andrea Fontana wrote: On Thursday, 10 March 2016 at 16:20:42 UTC, Taylor Hillegeist wrote: [...] I wonder if compiler is smart enaugh to undestand that dependency is not needed at

Re: How to import for mixin contents only.

2016-03-10 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 16:51:32 UTC, Andrea Fontana wrote: On Thursday, 10 March 2016 at 16:20:42 UTC, Taylor Hillegeist wrote: I feel like this should do what i want it too. but it doesn't. struct Color_t { static if(1==1){ import std.bitmanip:bitfields;

Re: How to import for mixin contents only.

2016-03-10 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 10 March 2016 at 16:20:42 UTC, Taylor Hillegeist wrote: I feel like this should do what i want it too. but it doesn't. struct Color_t { static if(1==1){ import std.bitmanip:bitfields; immutable string item = bitfields!(

Re: How to import for mixin contents only.

2016-03-10 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 04:56:52 UTC, Mike Parker wrote: On Thursday, 10 March 2016 at 04:07:54 UTC, Taylor Hillegeist wrote: So i want bitfields for just a little bit. but i dont want its dependencies. How is it done. I have tried this. but it doesnt seem to work on gdc. :( struct Colo

Re: How to import for mixin contents only.

2016-03-09 Thread Taylor Hillegeist via Digitalmars-d-learn
On Thursday, 10 March 2016 at 04:56:52 UTC, Mike Parker wrote: On Thursday, 10 March 2016 at 04:07:54 UTC, Taylor Hillegeist wrote: So i want bitfields for just a little bit. but i dont want its dependencies. How is it done. I have tried this. but it doesnt seem to work on gdc. :( struct Colo

Re: How to import for mixin contents only.

2016-03-09 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 10 March 2016 at 04:07:54 UTC, Taylor Hillegeist wrote: So i want bitfields for just a little bit. but i dont want its dependencies. How is it done. I have tried this. but it doesnt seem to work on gdc. :( struct Color_t { static if(__ctfe){ import std.bitm

How to import for mixin contents only.

2016-03-09 Thread Taylor Hillegeist via Digitalmars-d-learn
So i want bitfields for just a little bit. but i dont want its dependencies. How is it done. I have tried this. but it doesnt seem to work on gdc. :( struct Color_t { static if(__ctfe){ import std.bitmanip:bitfields; } mixin(bitfields!( ui