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: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2005 03:17:38 -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 pinskia at gcc dot gnu dot org 2005-08-10 03:17 -------
(In reply to comment #72)
> 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.
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)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15910