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++/11922] ICE on type_unification_real


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.


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