Mail Archives: djgpp/2000/04/19/11:13:01

From: "Olaf van der Spek" <Olaf AT XCC DOT TMFWeb DOT NL>
Newsgroups: comp.os.msdos.djgpp
Subject: Overloading?
Date: Wed, 19 Apr 2000 16:55:21 +0200
Organization: EuroNet Internet
Lines: 33
Sender: spek AT d21006 DOT dtk DOT chello DOT nl
Message-ID: <8dkhco$ft5$>
X-Trace: 956156120 16293 (19 Apr 2000 14:55:20 GMT)
X-Complaints-To: abuse AT euronet DOT nl
NNTP-Posting-Date: 19 Apr 2000 14:55:20 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


I'm new to DJGPP and have a problem with two functions with the same name,
but with different parameters.

This is my own one:
int distance(const Cak_vector& a, const Cak_vector& b);

And this was is from stl_iterator.h:
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last) {
  typedef typename iterator_traits<_InputIterator>::iterator_category
  return __distance(__first, __last, _Category());

Now the problem is that the compiler complains about value_type not present
in Cak_vector, because value_type is probably used in some way by the STL
Is this a compiler bug or is it designed this way?
The code compiled correctly with MS VC6.
Is there a way around this other then renaming the function?


Olaf van der Spek
Almere, Holland

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019