[Bug c++/13089] bug using operator[] for a template class & ISO C++ standard
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Nov 17 19:04:00 GMT 2003
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-17 19:04 -------
The mainline gives this error:
pr13089.cc: In function `int main()':
pr13089.cc:38: error: ISO C++ says that these are ambiguous, even though the worst conversion
for the first is better than the worst conversion for the second:
pr13089.cc:27: note: candidate 1: const T& Array<T, N>::operator[](size_t) const [with T = float,
int N = 48]
pr13089.cc:38: note: candidate 2: operator[](const float*, int) <built-in>
pr13089.cc:38: error: ISO C++ says that these are ambiguous, even though the worst conversion
for the first is better than the worst conversion for the second:
pr13089.cc:27: note: candidate 1: const T& Array<T, N>::operator[](size_t) const [with T = float,
int N = 48]
pr13089.cc:38: note: candidate 2: operator[](const float*, int) <built-in>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13089
More information about the Gcc-bugs
mailing list