digitalmars.D.bugs - [Issue 242] New: template implicit template properties doesn't work
- d-bugmail puremagic.com (22/22) Jul 06 2006 http://d.puremagic.com/issues/show_bug.cgi?id=242
- Thomas Kuehne (14/24) Jul 07 2006 -----BEGIN PGP SIGNED MESSAGE-----
- d-bugmail puremagic.com (15/29) Nov 28 2006 http://d.puremagic.com/issues/show_bug.cgi?id=242
- d-bugmail puremagic.com (11/11) May 26 2009 http://d.puremagic.com/issues/show_bug.cgi?id=242
- d-bugmail puremagic.com (10/10) Apr 09 2010 http://d.puremagic.com/issues/show_bug.cgi?id=242
- d-bugmail puremagic.com (6/6) May 25 2010 http://d.puremagic.com/issues/show_bug.cgi?id=242
- d-bugmail puremagic.com (11/11) Nov 26 2010 http://d.puremagic.com/issues/show_bug.cgi?id=242
http://d.puremagic.com/issues/show_bug.cgi?id=242
Summary: template implicit template properties doesn't work
Product: D
Version: 0.162
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: oskar.linde gmail.com
template x() { template x() { const x = 1; } }
void main() { const y = x!()!(); }
Gives:
test.d(2): semicolon expected following auto declaration, not '!'
test.d(2): found '!' instead of statement
Instead, trying const y = x!().x!(), gives
test.d(2): template identifier x is not a member of x
I can't see any way to instantiate the inner template when it is "an implicit
template property".
--
Jul 06 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-07-06:http://d.puremagic.com/issues/show_bug.cgi?id=242template x() { template x() { const x = 1; } } void main() { const y = x!()!(); } Gives: test.d(2): semicolon expected following auto declaration, not '!' test.d(2): found '!' instead of statement Instead, trying const y = x!().x!(), gives test.d(2): template identifier x is not a member of x I can't see any way to instantiate the inner template when it is "an implicit template property".Added to DStress as http://dstress.kuehne.cn/run/t/template_37_A.d http://dstress.kuehne.cn/run/t/template_37_B.d http://dstress.kuehne.cn/run/t/template_37_C.d http://dstress.kuehne.cn/run/t/template_37_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFErkiFLK5blCcjpWoRAqT2AJ9WQKSU7tTiUxfIH2XOQ4dO5oCLzACgpm9E DyfsYYgZultsc0f067beVSg= =RZF5 -----END PGP SIGNATURE-----
Jul 07 2006
http://d.puremagic.com/issues/show_bug.cgi?id=242
template x() { template x() { const x = 1; } }
void main() { const y = x!()!(); }
Gives:
test.d(2): semicolon expected following auto declaration, not '!'
test.d(2): found '!' instead of statement
Instead, trying const y = x!().x!(), gives
test.d(2): template identifier x is not a member of x
I can't see any way to instantiate the inner template when it is "an implicit
template property".
Especially now with tuples, it would be nice if something like the x!()!()
above worked. Because:
* A template can only have one tuple parameter.
* Multiple tuples passed into a tuple-taking template get merged into a single
tuple.
Thus nested tuple templates seems to be the best hope for writing algorithms
that process or combine multiple tuples.
template x(S...) { template x(T...) { /*use S and T together*/ } }
x!(int,float)!(3,24.0)
(And even if the inner one is not named x, you still can't do x!().y!() right
now.)
--
Nov 28 2006
http://d.puremagic.com/issues/show_bug.cgi?id=242
Don <clugdbug yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug yahoo.com.au
Severity|normal |enhancement
This is an enhancement.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 26 2009
http://d.puremagic.com/issues/show_bug.cgi?id=242
Don <clugdbug yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simen.kjaras gmail.com
*** Issue 4061 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2010
http://d.puremagic.com/issues/show_bug.cgi?id=242 *** Issue 4233 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 25 2010
http://d.puremagic.com/issues/show_bug.cgi?id=242
Andrei Alexandrescu <andrei metalanguage.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |andrei metalanguage.com
Resolution| |INVALID
AssignedTo|nobody puremagic.com |bugzilla digitalmars.com
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 26 2010









Thomas Kuehne <thomas-dloop kuehne.cn> 