From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14199 invoked by alias); 31 Oct 2008 13:40:31 -0000 Received: (qmail 14043 invoked by uid 22791); 31 Oct 2008 13:40:30 -0000 X-Spam-Check-By: sourceware.org Received: from mx.anti-virus.by (HELO tux.vba.com.by) (193.232.92.242) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 31 Oct 2008 13:39:52 +0000 Received: from st.vba.com.by (unknown [192.168.234.183]) by tux.vba.com.by (Postfix) with ESMTP id B946E1D5947 for ; Fri, 31 Oct 2008 15:39:31 +0200 (EET) Date: Fri, 31 Oct 2008 13:40:00 -0000 From: Sergei Trofimovich To: gcc-bugs@gcc.gnu.org Subject: [resend][stl] std::vector::data - nonstandard method. Message-ID: <20081031153859.00158590@st.vba.com.by> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.12.11; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/8hfuLsglbROG7/Oxey2GQbr"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg02113.txt.bz2 --Sig_/8hfuLsglbROG7/Oxey2GQbr Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-length: 1551 Hi, today i've occasionally wrote importable code :] std::vector::data() is absent in some other (standard conformant?) STLs. Would be a good idea to rename data() or change specifier (-> protected?). g++ -v: Using built-in specs. Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/configure --prefix=3D/usr --bindir=3D/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2 --includedir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include --datadir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.2 --mandir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.2/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.2/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include/g++= -v4 --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-cld --disable-libgcj --enable-languages=3Dc,c++,treelang,fortran --enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --with-bugurl=3Dhttp://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo 4.3.2 p1.0' Thanks! ---- // source example: #include #include #include #include void f() { std::vector v(1); std::cout // vvvvvvvvvvvvvvv << v.data() // nonstandard method (compiles, works) //^^^^^^^^^^^^^^^^ << std::endl; } int main() { f(); } --Sig_/8hfuLsglbROG7/Oxey2GQbr Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc Content-length: 197 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkkLCngACgkQcaHudmEf86qUtwCfX+ce9rV4LCB1dP+8OMBfQo52 bfcAn0kxoe6XQ8KYXnZqTh061BNf2AtF =Pk4I -----END PGP SIGNATURE----- --Sig_/8hfuLsglbROG7/Oxey2GQbr--