[Bug c++/24606] New: ICE on template function which gets an template agrument as a function with a default argument

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 1 02:49:00 GMT 2005


Testcase:
template<typename _Function>
  void for_each(_Function __f)
{
  __f(1);
}
class locale{};
template<typename SequenceT>
  void trim(SequenceT& Input, const locale& Loc=locale());
int main()
{
  for_each(trim<const int>);
}
-------

I don't know if this is valid or not but guess what ICC also ICEs on this
testcase too.


-- 
           Summary: ICE on template function which gets an template agrument
                    as a function with a default argument
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list