This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11922] ICE on type_unification_real
- From: "gcc-bugzilla at x-infinity dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2003 05:40:17 -0000
- Subject: [Bug c++/11922] ICE on type_unification_real
- References: <20030814142652.11922.gcc-bugzilla@x-infinity.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.