bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Template problem


From: Helmut Zeisel
Subject: Template problem
Date: Mon, 21 May 2001 22:10:09 +0200

Is this a gcc bug?

template <typename T, T A> class C1 {};

#include <iostream>

template <typename T, T A>
std::ostream& operator<<(std::ostream& os, const C1<T,A>& a)
{
  return os;
}
int main()
{
  C1<int,5> c1;
  std::cout << c1 << std::endl;
  return 0;
}

g++ main.cpp:
main.cpp: In function `int main()':
main.cpp:13: no match for `_IO_ostream_withassign & << C1<int,5> &'
/usr/include/g++/iostream.h:77: candidates are: ...

I am using SuSE Linux 6.3, c++ -v: gcc version 2.95.2 19991024 (release)

Helmut



reply via email to

[Prev in Thread] Current Thread [Next in Thread]