This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15064] [3.4/3.5 Regression] typeid of template parameter gives ICE


------- Additional Comments From giovannibajo at libero dot it  2004-04-23 13:05 -------
Fixed in 3.4.1 and mainline. Thank you for your report!

As for a temporary workaround, the problem comes from the use of typeid() 
within an initializer expression of a variable in a template. Try using a 
wrapper function, something along the lines of:

template <class T>
const std::type_info& wrapper_typeid()
{ return typeid(T); }

/* ... */

template <class T>
void dummy() {
  const std::type_info& tid = wrapper_typeid<T>();
}

Untested, but should work as a workaround.


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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]