From 5315635950717842658
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,515fa24b8aaed57
X-Google-Attributes: gidf78e5,public
From: ark@research.att.com (Andrew Koenig)
Subject: Re: Example in "The C++ Workbook" by Wiener and Pinson
Date: 1995/08/01
Message-ID: <DCMst7.KoJ@research.att.com>#1/1
X-Deja-AN: 107303129
references: <3ujj8d$o4m@scapa.cs.ualberta.ca> <9520904.20199@mulga.cs.mu.OZ.AU> <3vj9ak$49m@news.rrz.uni-koeln.de>
organization: AT&T Bell Laboratories, Murray Hill NJ
newsgroups: comp.std.c++

In article <3vj9ak$49m@news.rrz.uni-koeln.de> a2675528@athena.rrz.Uni-Koeln.DE (Paul Sponagl) writes:

> or do like that

> 	inline template < class T > void swap(T& a, T& b) 
> 	{
> 		a ^=b; b^=a;a ^=b;
> 	}

... which fails when you try to swap floating-point values, for example.
-- 
				--Andrew Koenig
				  ark@research.att.com



