On Saturday, 12 September 2015 at 14:30:16 UTC, Ali Çehreli wrote:
On 09/12/2015 06:37 AM, Prudence wrote:
Says the creating new SingleStore is not an expression
Reduced:
mixin template ObjectStore(TKey)
{
class SingleStore
{
static void New() // Removing 'static' compiles
{
new SingleStore();
}
}
}
class MyStore
{
mixin ObjectStore!(int);
}
void main()
{
auto s = new MyStore();
}
Error: type SingleStore is not an expression
Ali
Are you saying this is a bug or something else? The only
alternative I can think of is to use string mixins but this
method should work?