From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17197 invoked by alias); 10 Oct 2012 10:55:26 -0000 Received: (qmail 17134 invoked by uid 48); 10 Oct 2012 10:55:08 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53000] Conditional operator does not behave as standardized Date: Wed, 10 Oct 2012 10:55: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot com X-Bugzilla-Status: NEW 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-10/txt/msg00956.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53000 --- Comment #16 from Daniel Kr=C3=BCgler 2012-10-10 10:55:02 UTC --- (In reply to comment #12) > So we now have: >=20 > common_type::type -> const int& > common_type::type -> int >=20 > ? >=20 > If we are going with this resolution, I think the 1 argument version shou= ld > derive from decay. I noticed the same problem recently, when playing around with a variadic make_array function (search in the test-suite for it once Paolo has committ= ed my recent changes to the main line). The problem is now that common_type is= now dependent on the size of the variadic argument expansion. Personally I feel uncertain what the best approach would be: Declaring LWG 2141 as NAD (and f= ix the affected other places in the library, which at least unique_ptr's comparison functions), or add decay to the unary form or finally keeping the P/R. I'm in the process of sending a message to the LWG group with the make_array as an example to make LWG of this problem aware. I have no probl= em to accept that we undo the 2141 application in the library, if this is what= you would like to see for the moment. This is also a message to the committee.