[Bug c++/10243] typeof(expr) yields wrong result if expr has reference type

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jan 12 06:44:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-12 06:44 -------
Here is a better example (this should link):
template <class T> struct test_type { static void dump(); };
template <> void  test_type<int&>::dump(){}
int i;
typedef int &t;
int main() {
  int& int_ref = i;
  test_type<t>::dump();
  test_type<typeof(int_ref)>::dump();
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Last reconfirmed|2003-07-11 21:14:25         |2004-01-12 06:44:16
               date|                            |


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



More information about the Gcc-bugs mailing list