Thread overview
[Issue 2251] New: Variadic templates and auto return types don't work together.
Jul 28, 2008
d-bugmail
[Issue 2251] ICE: Variadic templates and auto return types don't work together.
Jul 29, 2008
d-bugmail
Sep 08, 2008
d-bugmail
Mar 29, 2009
d-bugmail
May 05, 2009
d-bugmail
May 05, 2009
d-bugmail
[Issue 2251] ICE(glue.c): Variadic templates and auto return types don't work together.
May 16, 2009
David Simcha
Jul 07, 2009
Don
Jul 09, 2009
David Simcha
July 28, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2251

           Summary: Variadic templates and auto return types don't work
                    together.
           Product: D
           Version: 2.017
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: dsimcha@yahoo.com


It seems that one cannot use both variadic templates tuple parameters and auto return types in the same template function.  Consider the following functions:

/*If instantiated with any of several types I tried, compile time error: Assertion failure: '0' on line 847 in file 'glue.c'*/

auto foo(T...)(T dummyInput) {
    int i = 1;
    return i;
}

//Works.
int bar(T...)(T dummyInput) {
    int i = 1;
    return i;
}

//Works.
auto baz(T)(T dummyInput) {
    int i = 1;
    return i;
}


-- 

July 29, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2251


dsimcha@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|Variadic templates and auto |ICE:  Variadic templates and
                   |return types don't work     |auto return types don't work
                   |together.                   |together.




------- Comment #1 from dsimcha@yahoo.com  2008-07-28 19:54 -------
Adding ice-on-valid-code keyword, now that I realize what that stands for.


-- 

September 08, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2251


dsimcha@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |samukha@voliacable.com




------- Comment #2 from dsimcha@yahoo.com  2008-09-08 12:49 -------
*** Bug 2349 has been marked as a duplicate of this bug. ***


-- 

March 29, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2251





------- Comment #3 from dsimcha@yahoo.com  2009-03-29 18:00 -------
Possibly related to http://d.puremagic.com/issues/show_bug.cgi?id=854 ?


-- 

May 05, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2251


dsimcha@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com




------- Comment #4 from dsimcha@yahoo.com  2009-05-04 21:41 -------
*** Bug 2863 has been marked as a duplicate of this bug. ***


-- 

May 05, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2251





------- Comment #5 from dsimcha@yahoo.com  2009-05-04 21:44 -------
Bug 854 is very closely related to this and has had a patch for a while that probably fixes this one, too.  Please apply.


-- 

May 16, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2251


David Simcha <dsimcha@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei@metalanguage.com




--- Comment #6 from David Simcha <dsimcha@yahoo.com>  2009-05-16 12:46:56 PDT ---
*** Issue 2982 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: -------
July 07, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2251


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #7 from Don <clugdbug@yahoo.com.au>  2009-07-07 08:11:18 PDT ---
Fixed DMD 2.031

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 09, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2251





--- Comment #8 from David Simcha <dsimcha@yahoo.com>  2009-07-09 12:36:54 PDT ---
This one missed the changelog somehow.  Please update.  Anyhow, thanks for the fix.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------