This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/15910] can't compile self defined void distance(std::vector<T>, std::vector<T>)
- From: "adah at netstd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2005 05:27:13 -0000
- Subject: [Bug libstdc++/15910] can't compile self defined void distance(std::vector<T>, std::vector<T>)
- References: <20040610143911.15910.king.benjamin@mh-hannover.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From adah at netstd dot com 2005-08-04 05:27 -------
As the reporter of Bug 23213, I want to add my 2 cents (my opinions):
1) This bug is not in libstdc++, but in the C++ compiler.
2) The std::distance (as found by Koenig lookup) does not hide the global one
the user defines, but the failure to complete the return type aborts the
candidate building procedure (if we fake the type definitions required, the
user-defined version will be correctly selected). And SFINAE does not kick
in. I really cannot see why this is not a bug (providing something unrelated
to user code will make the user code work!).
3) To complicate the matter, all "good" compilers I know fail in this case.
However, I still believe it is the problem of the compilers.
Yongwei
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15910