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: 10 Aug 2005 03:34:50 -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-10 03:34 -------
(In reply to comment #73)
> > encountered the problem before. Not to say understand the problem. As the
> > very beginning, adding a message like `In instantiation of
std::distance...'
> > will be helpful.
> But it is not instantiating std::distance just yet, it is looking at the
return values/parameter types.
But it is about to instantiate std::distance, right? Even if not right, my
point is still that one should notified of the existence of std::distance
somehow.
> ICC produces about the same error message:
> /opt/intel/include/c++/xutility(290): error: class "std::vector<double,
std::allocator<double>>" has no
> member "iterator_category"
> typedef typename _Iter::iterator_category iterator_category;
> ^
> detected during instantiation of class "std::iterator_traits<_Iter>
[with _Iter=std::vector<double,
> std::allocator<double>>]" at line 12 of "t.cc"
> compilation aborted for t.cc (code 2)
Do you think this message is helpful for a user that encounters this problem?
That is just one place to show that GCC can do better than commercial compilers.
Yongwei
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15910