Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 22202 invoked from network); 24 Nov 2007 18:29:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2007 18:29:07 -0000 Received: (qmail 49737 invoked by uid 500); 24 Nov 2007 18:28:55 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 49728 invoked by uid 500); 24 Nov 2007 18:28:55 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 49717 invoked by uid 99); 24 Nov 2007 18:28:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Nov 2007 10:28:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of msebor@gmail.com designates 209.85.146.180 as permitted sender) Received: from [209.85.146.180] (HELO wa-out-1112.google.com) (209.85.146.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Nov 2007 18:28:57 +0000 Received: by wa-out-1112.google.com with SMTP id n4so467821wag for ; Sat, 24 Nov 2007 10:28:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=bvuRgKAHMU6P1W13vTIdFfKTO20i7Y317VFQI+wH3Z0=; b=ab1bCTiE2hzc+XNviPC7JJJNNnkRh96oUxiUUJIPlMgbSKQ3f3kZCA0fUYbKh6sHA769l5B5tk9KS2+1dTAp2iqhCIsFO9BJd2rizvV+WNzeM5K1yydE8Eoul+ym1AmYAVB+Za8cItFHefQot+pzoRscTOwf6RzuIKy2ccZ532E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=eMNOCcHwpdD/ttn7ZYLpWHhcwQlxObAdlBWEGufasJEVbXQX5BTqn6PxMywxJCC0jcA0MFnX3SWcb6x2njWqLvIscGyaDL8hIn9xqeMjm1n4Q2RBn3fjmGO+89v+lbkAzy+1OKoDgEta/bjMiVHdu6xbwx7MCLr1GeSFntQPviU= Received: by 10.115.54.1 with SMTP id g1mr740783wak.1195928914323; Sat, 24 Nov 2007 10:28:34 -0800 (PST) Received: from bugsy.sebor.net ( [71.229.200.170]) by mx.google.com with ESMTPS id m17sm3769779waf.2007.11.24.10.28.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Nov 2007 10:28:32 -0800 (PST) Message-ID: <47486D4E.7020005@roguewave.com> Date: Sat, 24 Nov 2007 11:28:30 -0700 From: Martin Sebor Organization: Rogue Wave Software, Inc. User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: question on the examples for the source/forward/backward incompatible changes References: <7BDB2168BEAEF14C98F1901FD2DE643801482A48@epmsa009.minsk.epam.com> <47477A82.5090105@roguewave.com> <4748677D.9060809@gmail.com> In-Reply-To: <4748677D.9060809@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org Mark Brown wrote: [...] > Or adding overloads with different behavior to functions that are > a better match for calls in existing programs. For instance, if we > added an overload for the ostream inserter for wchar_t* that did > something different than print the value of the pointer it would > break programs that insert wchar_t pointers into narrow streams. > So code like this: std::cout << L"insert a pointer"; inserts the > address of the wide string today, but if we added the overload it > would write the string itself. This is an interesting example because it doesn't actually break programs at compile time but rather changes their runtime behavior, something that typically is associated with binary compatibility. Incidentally, we even have an enhancement request for this new inserter (maybe you've seen it): http://issues.apache.org/jira/browse/STDCXX-296 But there certainly are cases where adding an overload can break programs by introducing an ambiguity where there previously was none. Martin