Re: Mixin Template Function Attributes

2016-01-20 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 20 January 2016 at 19:48:04 UTC, jmh530 wrote: On Wednesday, 20 January 2016 at 19:19:04 UTC, Marc Schütz wrote: On Wednesday, 20 January 2016 at 16:37:31 UTC, jmh530 wrote: I'm not sure if this is how the behavior is supposed to be or if it is a bug. I believe, however, that it

Re: Mixin Template Function Attributes

2016-01-20 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 20 January 2016 at 19:19:04 UTC, Marc Schütz wrote: On Wednesday, 20 January 2016 at 16:37:31 UTC, jmh530 wrote: I'm not sure if this is how the behavior is supposed to be or if it is a bug. I believe, however, that it _is_ a bug that the imported symbols are visible outside the

Re: Mixin Template Function Attributes

2016-01-20 Thread Marc Schütz via Digitalmars-d-learn
On Wednesday, 20 January 2016 at 16:37:31 UTC, jmh530 wrote: I'm not sure if this is how the behavior is supposed to be or if it is a bug. It's not a bug. The `@attribute:` syntax applies to all following declarations _inside the current scope_, i.e. until your mixin templates closing `}`.

Re: Mixin Template Function Attributes

2016-01-20 Thread Marc Schütz via Digitalmars-d-learn
On Wednesday, 20 January 2016 at 16:37:31 UTC, jmh530 wrote: I'm not sure if this is how the behavior is supposed to be or if it is a bug. I believe, however, that it _is_ a bug that the imported symbols are visible outside the template. Most likely related to the infamous https://issues.dlan

Mixin Template Function Attributes

2016-01-20 Thread jmh530 via Digitalmars-d-learn
I was thinking about using mixin templates to put some module-level default information in a single file so that it doesn't clutter up other files. It works for imports, but it doesn't seem to propagate for function attributes. module_default.d --- module module_default; mixin