From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22865 invoked by alias); 20 Jan 2004 01:02:12 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 22815 invoked from network); 20 Jan 2004 01:02:09 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by sources.redhat.com with SMTP; 20 Jan 2004 01:02:09 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AikHQ-0008Nl-00 for ; Tue, 20 Jan 2004 02:02:08 +0100 To: sid@sources.redhat.com Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AikHP-0008Nd-00 for ; Tue, 20 Jan 2004 02:02:07 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AikHP-0008Ve-00 for ; Tue, 20 Jan 2004 02:02:07 +0100 From: Ben Elliston Subject: Re: PATCH: make trace_stream better preserve std::ofstream semantics Date: Tue, 20 Jan 2004 01:02:00 -0000 Message-ID: <877jzntott.fsf@wasabisystems.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-SW-Source: 2004-q1/txt/msg00004.txt.bz2 Jim Blandy writes: > Rather than subclassing std::ofstream and doing this odd redirection > stuff, wouldn't it be simpler to just make trace_stream an instance > of plain old std::ofstream, and then call rdbuf () to set its > streambuf to either cout's streambuf, or a filebuf for the trace > file? Yes, that seems better. Thanks. Ben