This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
If this code supposed to be well-formed?
- To: gcc at gcc dot gnu dot org
- Subject: If this code supposed to be well-formed?
- From: Olivier Galibert <galibert at pobox dot com>
- Date: Wed, 17 Jan 2001 10:32:57 -0500
Because if yes then gcc 2.95.2 has a bug, and it could be used as a
test case. The standard is unclear for me in this aspect.
galibert@zalem:~/wk #4 >g++ -O9 -Wall -g test.cc -o test
test.cc: In function `int main()':
test.cc:12: no matching function for call to `f (vector<A *,allocator<A *> > &, B *)'
test.cc:
#include <vector>
class A {};
class B : public A {};
template <typename T> void f(std::vector<T *> v, T *e) {}
int main()
{
std::vector<A *> a_v;
B b;
f(a_v, &b);
return 0;
}