From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9908 invoked by alias); 23 Oct 2009 21:28:19 -0000 Received: (qmail 9899 invoked by uid 22791); 23 Oct 2009 21:28:18 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_20,DATE_IN_PAST_06_12,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.network-theory.co.uk (HELO mail.network-theory.co.uk) (66.199.228.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Oct 2009 21:28:14 +0000 Date: Fri, 23 Oct 2009 21:28:00 -0000 Message-ID: From: Brian Gough To: Gerard Jungman Cc: gsl-discuss@sourceware.org Subject: Re: containers tentative design summary In-Reply-To: <1254783367.28192.98.camel@manticore.lanl.gov> References: <1254708349.18519.4.camel@ForbiddenPlanet> <7f1eaee30910050750l738876b1p41e6bd8ae5aa6d16@mail.gmail.com> <1254783367.28192.98.camel@manticore.lanl.gov> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Message-Mac: e023097a43e4154a9c2296f0573d72e0 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00023.txt.bz2 At Mon, 05 Oct 2009 16:56:07 -0600, Gerard Jungman wrote: > On Mon, 2009-10-05 at 10:50 -0400, James Bergstra wrote: > > I'm a bit rusty with my C structs... but you would need two distinct > > static classes to have const and non-const data pointers for your view > > right? > > Yes, sorry. I left that out. I think this is an interesting example. How would these two classes work in practice in C? For example, how would one pass a non-const matrix (taken as a view of a non-const multi-array) to a function taking a const matrix argument. Dealing with the interaction between const and non-const arguments is a fundamental issue.