Re: auto function attributes based on type

2015-03-12 Thread ketmar via Digitalmars-d-learn
On Thu, 12 Mar 2015 04:51:40 +, amber wrote: On Thursday, 12 March 2015 at 04:04:28 UTC, weaselcat wrote: On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote: ... http://dlang.org/function.html#function-attribute-inference might be a good read if you haven't read it already. I did

Re: auto function attributes based on type

2015-03-12 Thread weaselcat via Digitalmars-d-learn
On Thursday, 12 March 2015 at 05:01:50 UTC, amber wrote: On Thursday, 12 March 2015 at 04:51:42 UTC, amber wrote: On Thursday, 12 March 2015 at 04:04:28 UTC, weaselcat wrote: On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote: ...

Re: auto function attributes based on type

2015-03-11 Thread weaselcat via Digitalmars-d-learn
On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote: ... http://dlang.org/function.html#function-attribute-inference might be a good read if you haven't read it already.

Re: auto function attributes based on type

2015-03-11 Thread amber via Digitalmars-d-learn
On Thursday, 12 March 2015 at 04:04:28 UTC, weaselcat wrote: On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote: ... http://dlang.org/function.html#function-attribute-inference might be a good read if you haven't read it already. I did read it but didn't really understand it, so I've

Re: auto function attributes based on type

2015-03-11 Thread amber via Digitalmars-d-learn
On Thursday, 12 March 2015 at 04:51:42 UTC, amber wrote: On Thursday, 12 March 2015 at 04:04:28 UTC, weaselcat wrote: On Thursday, 12 March 2015 at 03:12:15 UTC, amber wrote: ... http://dlang.org/function.html#function-attribute-inference might be a good read if you haven't read it already.

auto function attributes based on type

2015-03-11 Thread amber via Digitalmars-d-learn
Hi, Is there a way in D to specify function attributes for a template struct/class by type? E.g. given a template struct/class as follows: --- struct S(T) { T[] values; void someFunc(int i) pure nothrow @safe {} } --- For some types the pure, nothrow, @safe attributes are valid and