This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ testcase] [committed] PR c++/10858: failure with calling a method inside sizeof in a template
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Mon, 2 Feb 2004 23:25:25 -0800
- Subject: [C++ testcase] [committed] PR c++/10858: failure with calling a method inside sizeof in a template
This was fixed with Mark's patch for uses_template_parms speedup.
Committed this testcase for both 3.4.0 and 3.5.0.
Thanks,
Andrew Pinski
2004-02-02 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/10858
* g++.dg/template/sizeof7.C: New test.
// { dg-do compile }
// Testcase by: bangerth@dealii.org
// PR c++/10858: failure with calling a method inside sizeof in a
template
template <int> struct P {};
void bar ();
template <class T> struct X {
static int foo(void (*)());
P<sizeof(foo(&bar))> p;
};
template class X<int>;