From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12502 invoked by alias); 21 Apr 2003 16:24:18 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 12493 invoked from network); 21 Apr 2003 16:24:18 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by sources.redhat.com with SMTP; 21 Apr 2003 16:24:18 -0000 Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 197e5Z-0004R4-00 for gcc-help@gnu.org; Mon, 21 Apr 2003 12:24:17 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 197e5U-0005sW-00 for gcc-help@gnu.org; Mon, 21 Apr 2003 12:24:13 -0400 Received: from web40909.mail.yahoo.com ([66.218.78.206]) by monty-python.gnu.org with smtp (Exim 4.10.13) id 197e3x-0005BM-00 for gcc-help@gnu.org; Mon, 21 Apr 2003 12:22:37 -0400 Message-ID: <20030421162235.37169.qmail@web40909.mail.yahoo.com> Received: from [80.200.238.60] by web40909.mail.yahoo.com via HTTP; Mon, 21 Apr 2003 18:22:35 CEST Date: Mon, 21 Apr 2003 16:24:00 -0000 From: =?iso-8859-1?q?drkm?= Subject: Re: vector instantiation To: gcc-help@gnu.org In-Reply-To: <1050901812.1163.5.camel@r-a117-bur> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Status: No, hits=-6.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,SPAM_PHRASE_03_05 version=2.41 X-Spam-Level: X-SW-Source: 2003-04/txt/msg00184.txt.bz2 --- "Andrey R. Urazov" a écrit : > > I'm not sure if it is allowed to put arrays as a > > parameter of the template. Why don't you make a class > > or a struct which contains this array of 4 size_t's > Because an array of 4 elements is just a particular case. In general > there are n elements and n is known at compile time. What do you think about template < typename T , size_t N > struct MyWrapper { T myArray[ N ] ; } ; std::vector< MyWrapper< size_t , 4 > > the_array ; ? But why do you not want the following : std::vector< std::vector< size_t > > the_array ; or std::vector< boost::array< size_t , 4 > > the_array ; ? Best regards, --drkm ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com