This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Static member template bug?
- To: egcs-bugs at cygnus dot com
- Subject: Re: Static member template bug?
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Date: Wed, 11 Feb 1998 18:20:01 +0100 (MET)
- cc: Mark Mitchell <mmitchell at usa dot net>, Alexandre Oliva <oliva at dcc dot unicamp dot br>, "William S. Lear" <rael at zopyra dot com>
- Reply-To: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
On Mon, 2 Feb 1998, Mark Mitchell wrote about a problem submitted by
William S. Lear <rael@zopyra.com>:
struct foo {
template <typename T, int N>
static T* array_end(T(&array)[N]) { return &array[N]; }
};
main(int ac, char* av[]) {
int i[] = {1,2,3,4,5,6,7};
int* e = foo::array_end(i);
}
Mark wrote:
> Alexandre wrote:
>> I've just tested it with egcs-980129 on Solaris 2.[56]; it won't work,
>> same error :-(
> Well, the good news is that the patches I submitted aren't in that
> snapshot, so they still might fix the problem. Would you be so kind
> as to remember this mail, and try it again in the next snapshot?
Sorry, Mark -- With egcs-2.91.07 980205 (actually CVS from 980209) on
sparc-sun-solaris2.6 I still get
x.cc: In function `int main(int, char **)':
x.cc:8: no matching function for call to `foo::array_end (int[7])'
x.cc:3: candidates are: foo::array_end<int, 7>(int (&)[7])
Gerald
--
Gerald Pfeifer (Jerry) Vienna University of Technology
pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/