swap does not compile

Jonathan Wakely cow@compsoc.man.ac.uk
Mon Jan 12 12:39:00 GMT 2004


On Mon, Jan 12, 2004 at 10:44:44AM +0100, Lars Gullik Bjønnes wrote:

> #include <vector>
> #include <algorithm>
> 
> using std::swap;
> 
> int main() 
> {
> 	size_t a = 1;
>         size_t b = 2;
> 	swap(a, b);
> }
> swap.C: In function `int main()':
> swap.C:10: error: no matching function for call to `swap(size_t&, size_t&)'

For the record I see this too, with today's build, on i386-unknown-freebsd4.8,
and as reported it works if <vector> isn't included.

Is this more fallout from the strong-using work?

jon

-- 
"Political satire became obsolete when Henry Kissinger was awarded the
 Nobel Prize."
	- Tom Lehrer



More information about the Libstdc++ mailing list