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++/13089] bug using operator[] for a template class & ISO C++ standard


------- 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


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