07.05.2018 17:22, Timoses пишет:
On Monday, 7 May 2018 at 10:28:14 UTC, drug wrote:
I get the error like:
```
./foo/bar/baz/builder.d(57,23): Error: template instance
`staticMap!(DebugTypeMapper, BaseDebuggerTypes)` recursive template
expansion
```
That's all. It doesn's print instantiations
On Monday, 7 May 2018 at 10:28:14 UTC, drug wrote:
I get the error like:
```
./foo/bar/baz/builder.d(57,23): Error: template instance
`staticMap!(DebugTypeMapper, BaseDebuggerTypes)` recursive
template expansion
```
That's all. It doesn's print instantiations stack so I can't
track back the r
On Wednesday, 21 March 2018 at 23:05:22 UTC, Jonathan M Davis
wrote:
On Wednesday, March 21, 2018 22:50:32 Ontonator via
Digitalmars-d-learn wrote:
On Wednesday, 21 March 2018 at 06:39:22 UTC, ag0aep6g wrote:
> On 03/21/2018 01:47 AM, Ontonator wrote:
>> The following code does not compile:
>>>
On Wednesday, March 21, 2018 22:50:32 Ontonator via Digitalmars-d-learn
wrote:
> On Wednesday, 21 March 2018 at 06:39:22 UTC, ag0aep6g wrote:
> > On 03/21/2018 01:47 AM, Ontonator wrote:
> >> The following code does not compile:
> >>> [...]
> >>
> >> It gives the error:
> >>> [...]
> >>
> >> The a
On Wednesday, 21 March 2018 at 06:39:22 UTC, ag0aep6g wrote:
On 03/21/2018 01:47 AM, Ontonator wrote:
The following code does not compile:
[...]
It gives the error:
[...]
The aliases do not have to be aliases, as long as there is
some reference to the class (e.g. method and variable
decl
On 03/21/2018 01:47 AM, Ontonator wrote:
The following code does not compile:
void main() {}
class SuperClass {}
class TemplatedClass(T : SuperClass) {}
class A : SuperClass {
alias T = TemplatedClass!B;
}
class B : SuperClass {
alias T = TemplatedClass!C;
}
class C : SuperClass {}
On Wednesday, March 21, 2018 00:47:18 Ontonator via Digitalmars-d-learn
wrote:
> The following code does not compile:
> > void main() {}
> >
> > class SuperClass {}
> >
> > class TemplatedClass(T : SuperClass) {}
> >
> > class A : SuperClass {
> >
> > alias T = TemplatedClass!B;
> >
> > }
> >
On 03/13/2017 11:58 PM, Stefan Koch wrote:
On Monday, 13 March 2017 at 22:05:24 UTC, Jack Applegame wrote:
Is this a bug?
No it's not
struct C
{
B!C;
}
is an error.
Howto compute C ? <--\
let's check the members; |
The member needs a template. |
Howto compute the template
On 03/14/2017 12:02 AM, Stefan Koch wrote:
On Monday, 13 March 2017 at 22:59:36 UTC, ag0aep6g wrote:
[...]
struct A(T) {
void m() {
char[T.sizeof] data;
}
}
/* ... rest as above ... */
I don't see how the destructor makes a difference. Soo, bug?
Try to use m.
Work
On Monday, 13 March 2017 at 22:59:36 UTC, ag0aep6g wrote:
On 03/13/2017 03:26 PM, Jack Applegame wrote:
I'm pretty sure that this code should compile
(https://dpaste.dzfl.pl/cf1e1ee6ef4b):
struct A(T) {
~this() {
char[T.sizeof] data;
}
}
struct B(T) {
A!T foo;
}
struct C {
On 03/13/2017 03:26 PM, Jack Applegame wrote:
I'm pretty sure that this code should compile
(https://dpaste.dzfl.pl/cf1e1ee6ef4b):
struct A(T) {
~this() {
char[T.sizeof] data;
}
}
struct B(T) {
A!T foo;
}
struct C {
B!C bar;
}
void main() {
C c;
}
But it doesn't:
On Monday, 13 March 2017 at 22:05:24 UTC, Jack Applegame wrote:
Is this a bug?
No it's not
struct C
{
B!C;
}
is an error.
Howto compute C ? <--\
let's check the members; |
The member needs a template. |
Howto compute the template ? |
let's compute the parameters. |
What
Is this a bug?
Slightly simpler:
struct SomeType(K, V) {}
alias X(V) = V;
alias X(V, K...) = SomeType!(K[0], X!(V, K[1 .. $]));
That's a recurring pattern to get used to: aliasing away to one
of the parameters in a terminal and/or degenerate case. Also:
that an empty tuple matches no parameter "m
Thanks!
-Eric
On Saturday, 15 November 2014 at 18:49:32 UTC, anonymous wrote:
On Saturday, 15 November 2014 at 18:30:00 UTC, Eric wrote:
Hi -
I've never designed a recursive template before, but I think
that would solve my problem. What I would like is
someting like this:
class X(V, K...)
On Saturday, 15 November 2014 at 18:30:00 UTC, Eric wrote:
Hi -
I've never designed a recursive template before, but I think
that would solve my problem. What I would like is
someting like this:
class X(V, K...)
{
// I want to declare a type based on K and V such
// that for X!(V, int,
On 2013-11-26 21:31:55 +, bioinfornatics said:
On Tuesday, 26 November 2013 at 21:18:29 UTC, Shammah Chancellor wrote:
On 2013-11-26 21:00:56 +, bioinfornatics said:
On Tuesday, 26 November 2013 at 20:50:13 UTC, bioinfornatics wrote:
On Tuesday, 26 November 2013 at 20:29:00 UTC, bear
On Tuesday, 26 November 2013 at 21:18:29 UTC, Shammah Chancellor
wrote:
On 2013-11-26 21:00:56 +, bioinfornatics said:
On Tuesday, 26 November 2013 at 20:50:13 UTC, bioinfornatics
wrote:
On Tuesday, 26 November 2013 at 20:29:00 UTC, bearophile
wrote:
bioinfornatics:
I wrote some template
On 2013-11-26 21:00:56 +, bioinfornatics said:
On Tuesday, 26 November 2013 at 20:50:13 UTC, bioinfornatics wrote:
On Tuesday, 26 November 2013 at 20:29:00 UTC, bearophile wrote:
bioinfornatics:
I wrote some template to compute at compile time how many bits is need
for a number x. http:/
On Tuesday, 26 November 2013 at 20:50:13 UTC, bioinfornatics
wrote:
On Tuesday, 26 November 2013 at 20:29:00 UTC, bearophile wrote:
bioinfornatics:
I wrote some template to compute at compile time how many
bits is need for a number x.
http://www.dpaste.dzfl.pl/99a842fd
That works for small
On Tuesday, 26 November 2013 at 20:29:00 UTC, bearophile wrote:
bioinfornatics:
I wrote some template to compute at compile time how many bits
is need for a number x. http://www.dpaste.dzfl.pl/99a842fd
That works for small number but after i got an error about
limit recursion
Instead of te
bioinfornatics:
I wrote some template to compute at compile time how many bits
is need for a number x. http://www.dpaste.dzfl.pl/99a842fd
That works for small number but after i got an error about
limit recursion
Instead of template recursion, have you tried regular code run at
compile tim
22 matches
Mail list logo