From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3627 invoked by alias); 13 May 2012 09:06:59 -0000 Received: (qmail 3613 invoked by uid 22791); 13 May 2012 09:06:58 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 May 2012 09:06:46 +0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51829] decltype() deduces non-const but only in a template Date: Sun, 13 May 2012 09:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2012-05/txt/msg01354.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D51829 --- Comment #6 from Marc Glisse 2012-05-13 09:0= 6:42 UTC --- With boost 1.49, g++-4.7 compiles the code just fine, while g++-4.6 gives: u.cc: In function =E2=80=98void bug() [with =3D vo= id]=E2=80=99: u.cc:14:24: instantiated from here u.cc:11:3: error: cannot convert =E2=80=98const type {aka const boost::proto::exprns_::expr > >, 0l>&, boost::proto::exprns_::expr, 0l> >, 2l>&>, 1l>}=E2=80=99 to = =E2=80=98const type* {aka const boost::proto::exprns_::expr > >, 0l>&, boost::proto::exprns_::expr, 0l> >, 2l>*}=E2=80=99 in assignme= nt