From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32660 invoked by alias); 29 Mar 2011 18:22:46 -0000 Received: (qmail 32648 invoked by uid 22791); 29 Mar 2011 18:22:45 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-px0-f176.google.com (HELO mail-px0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 18:22:40 +0000 Received: by pxi11 with SMTP id 11so82190pxi.21 for ; Tue, 29 Mar 2011 11:22:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.195.3 with SMTP id s3mr108308wff.21.1301422959823; Tue, 29 Mar 2011 11:22:39 -0700 (PDT) Received: by 10.142.76.2 with HTTP; Tue, 29 Mar 2011 11:22:39 -0700 (PDT) In-Reply-To: References: <4D8A2403.5050708@redhat.com> <4D90A209.2020508@redhat.com> Date: Tue, 29 Mar 2011 18:57:00 -0000 Message-ID: Subject: Re: [C++0x] Range-based for statements and ADL From: Jonathan Wakely To: Rodrigo Rivas Cc: Gabriel Dos Reis , Jason Merrill , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg02017.txt.bz2 On 29 March 2011 17:41, Rodrigo Rivas wrote: > > Maybe a simpler error is better. such as: > "expression is not valid as range in a range-based % loop > because it lacks begin/end members or begin(int&) and end(int&) > overloads." (I leave the wording to someone more skilled with > English). If you can prevent the full lookup error and print something different I think users would be very grateful indeed. How about "No suitable % and % functions found for range expression of type %qT in % statement" ? That