| Thread overview | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 04, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 Sky Thirteenth <sky.13th.95@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sky.13th.95@gmail.com -- | ||||
September 04, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 Sky Thirteenth <sky.13th.95@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|sky.13th.95@gmail.com | -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 Sky Thirteenth <sky.13th.95@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 b2.temp@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86_64 |All OS|Windows |All --- Comment #1 from b2.temp@gmx.com --- 1. I don't see the first function working. (https://dpaste.dzfl.pl/2b462faf70b0). WHen you try to instantiate both gives the same error. 2. If you don't do partial instantiation then your alias can be declared more simply as 'alias TestAlias = TestType;' 3. The real problem you encounter here is that TestType template argument cannot be deduced from the value passed to the constructor: struct TestType(T) { T data; } void main() { auto a = TestType(0); // same error } This is exactly what happens when you call TestFunctionA. For example you can replace the declaration by: void testFunctionB(T)(T arg) | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 b2.temp@gmx.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from b2.temp@gmx.com --- This is not a bug, this is issue 6082. IFTI doesn't support this yet. *** This issue has been marked as a duplicate of issue 6082 *** -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 --- Comment #3 from Sky Thirteenth <sky.13th.95@gmail.com> --- (In reply to b2.temp from comment #2) > This is not a bug, this is issue 6082. IFTI doesn't support this yet. > > *** This issue has been marked as a duplicate of issue 6082 *** Sorry, but not we have some misunderstanding. Question is not about a constructors. It about a types. Here is more clear example: https://dpaste.dzfl.pl/2c8e1c350182 -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 Sky Thirteenth <sky.13th.95@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE |--- --- Comment #4 from Sky Thirteenth <sky.13th.95@gmail.com> --- (In addition to Sky Thirteenth from comment #3) > (In reply to b2.temp from comment #2) > > This is not a bug, this is issue 6082. IFTI doesn't support this yet. > > > > *** This issue has been marked as a duplicate of issue 6082 *** > > Sorry, but not we have some misunderstanding. > > Question is not about a constructors. It about a types. > > Here is more clear example: https://dpaste.dzfl.pl/2c8e1c350182 Template aliases does not work correct while it used with template functions. Compiler just somehow can't understand that is the same type, rather than different. -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 --- Comment #5 from b2.temp@gmx.com --- I confirm the misunderstanding. If you permit I would suggest you to close this one but to open a new issue using your second example. The first one really represented issue 6082. The second is perfectly clear. -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 --- Comment #6 from Sky Thirteenth <sky.13th.95@gmail.com> --- (In reply to b2.temp from comment #5) > I confirm the misunderstanding. If you permit I would suggest you to close this one but to open a new issue using your second example. The first one really represented issue 6082. The second is perfectly clear. Yes, sure. But, you will create new one, or should I? -- | ||||
September 11, 2016 [Issue 16465] Template alias does not get unwrapped in templated functions | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16465 --- Comment #7 from b2.temp@gmx.com --- (In reply to Sky Thirteenth from comment #6) > (In reply to b2.temp from comment #5) > > I confirm the misunderstanding. If you permit I would suggest you to close this one but to open a new issue using your second example. The first one really represented issue 6082. The second is perfectly clear. > > Yes, sure. > But, you will create new one, or should I? I wont, you will. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply