[Bug c++/11922] ICE on type_unification_real
gcc-bugzilla at x-infinity dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 15 05:40:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11922
------- Additional Comments From gcc-bugzilla at x-infinity dot com 2003-08-15 05:40 -------
The following replacement makes code compile (and run):
template <class TraitsType>
struct ChannelFormatConverter
{
//
// ... code skipped ...
//
template <class OtherTraitsType>
inline static typename traits_type::value_type from(typename
OtherTraitsType::value_type value)
{
return OtherTraitsType::template
convert_format<traits_type::channel_format>()(value);
}
//
// ... code skipped ...
//
};
should be replaced with:
template <class TraitsType>
struct ChannelFormatConverter
{
//
// ... code skipped ...
//
template <class OtherTraitsType>
inline static typename traits_type::value_type from(typename
OtherTraitsType::value_type value)
{
typename OtherTraitsType::template
convert_format<traits_type::channel_format> converter_type;
return converter_type(value);
}
//
// ... code skipped ...
//
};
Imho, the first version just should not compile (no typename on a dependent
type), it should report "undeclared type XXX" or something like that.
More information about the Gcc-bugs
mailing list