------- Comment #10 from jakub at gcc dot gnu dot org  2008-04-03 10:23 -------
See http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00177.html
for details.
I guess before moving further along with this, attributes for parameter packs
should be decided upon.  Do we want to allow them at all?  What actually will
they mean, when they in fact change the type?

#define vector __attribute__((__vector_size__ (16)))

template <typename... T> void foo (int x, vector T... y) { }
void bar (vector long a, vector double b, vector long c, vector double d)
{
  foo<long, double> (5, a, b, c, d);
  foo<long, double, long, double> (6, a, b, c, d);
  foo<long, double> (7, 17, 18.0, 19L, 20.0);
}
ATM g++ will grok just the last foo call (and incorrectly, as the foo function
will expect to get int and 4 vectors as arguments, while the caller passes 5
scalars).


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dgregor at gcc dot gnu dot
                   |                            |org
         AssignedTo|jakub at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35758

Reply via email to