🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1529

Re: Example in "The C++ Workbook" by Wiener and Pinson

#1529
From: Andrew Koenig
Date: Tue, 01 Aug 1995 12:17
13 lines
769 bytes
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
Technical Details
Message-ID: <DCMst7.KoJ@research.att.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!allegra!alice!ark
References: <3ujj8d$o4m@scapa.cs.ualberta.ca> <9520904.20199@mulga.cs.mu.OZ.AU> <3vj9ak$49m@news.rrz.uni-koeln.de>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!in1.uu.net!allegra!alice!ark
From: ark@research.att.com (Andrew Koenig)
Subject: Re: Example in "The C++ Workbook" by Wiener and Pinson
Message-ID: <DCMst7.KoJ@research.att.com>
Organization: AT&T Bell Laboratories, Murray Hill NJ
References: <3ujj8d$o4m@scapa.cs.ualberta.ca> <9520904.20199@mulga.cs.mu.OZ.AU> <3vj9ak$49m@news.rrz.uni-koeln.de>
Date: Tue, 1 Aug 1995 12:17:31 GMT