On 12/23/18 7:09 AM, Michelle Long wrote:
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
I think it has less to do with class names and more to do with symbol
overloading.
The only place I think templates are allowed to overload names with
non-templates is
More simple is : do not use the same identifier ;)
The whole point is to use the same identifier ;/
On Sunday, 23 December 2018 at 19:10:06 UTC, Alex wrote:
On Sunday, 23 December 2018 at 18:53:15 UTC, Vijay Nayar wrote:
You're right, it does compile. I'm a bit surprised. I wonder
if this is a relatively recent improvement in the language,
because last time I ran into this I had no such luck.
On Tuesday, 30 October 2018 at 04:22:21 UTC, helxi wrote:
On Sunday, 13 March 2016 at 19:28:57 UTC, karabuta wrote:
Gtk3 from python3 has got I nice book with examples that are
not so advanced but enough to get you doing real work(from a
beginner point of view). GtkD seem to have changed the AP
On Sunday, 23 December 2018 at 18:53:15 UTC, Vijay Nayar wrote:
You're right, it does compile. I'm a bit surprised. I wonder if
this is a relatively recent improvement in the language,
because last time I ran into this I had no such luck. But after
seeing that your example did work, I figured o
On Sunday, 23 December 2018 at 18:31:24 UTC, Alex wrote:
On Sunday, 23 December 2018 at 18:13:25 UTC, Vijay Nayar wrote:
For example, if you have a const function in your container
like "T find() const", and this function needs to use that
comparator, then you're out of luck because the compile
On Sunday, 23 December 2018 at 18:13:25 UTC, Vijay Nayar wrote:
I've been playing with the idea of specifying the constraints
or using "static assert" in the constructor. They are good
options, but there's a few cases where they fall a bit short.
For example, imagine you have a container class
On Sunday, 23 December 2018 at 18:04:32 UTC, Alex wrote:
On Sunday, 23 December 2018 at 17:13:49 UTC, Vijay Nayar wrote:
I have a few cases where I would like to pass in a function as
a value to a template, but I want to ensure that the function
takes certain kinds of parameters, is a const fun
On Sunday, 23 December 2018 at 17:13:49 UTC, Vijay Nayar wrote:
I have a few cases where I would like to pass in a function as
a value to a template, but I want to ensure that the function
takes certain kinds of parameters, is a const function, or
matches any other set of conditions.
What is
I have a few cases where I would like to pass in a function as a
value to a template, but I want to ensure that the function takes
certain kinds of parameters, is a const function, or matches any
other set of conditions.
What is the best way to do this? Just to avoid any potential
confusion,
On Sunday, 23 December 2018 at 12:09:31 UTC, Michelle Long wrote:
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
It is very nice to be able to treat X like the base and X!n as
a derived class.
Sure we can do
class X(int N) : X!0
{
static if(N == 0)
{
I recently played around with atomic operations. While doing so,
I noticed a problem with the interaction of interfaces and cas.
Consider the following program:
```
import core.atomic;
import std.stdio;
interface TestInterface
{
}
class TestClass : TestInterface
{
}
void main()
{
shared
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
It is very nice to be able to treat X like the base and X!n as a
derived class.
Sure we can do
class X(int N) : X!0
{
static if(N == 0)
{
}
}
but this is very ugly, in my code I always have to use X!0
13 matches
Mail list logo