From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32297 invoked by alias); 9 Jul 2014 15:58:15 -0000 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 Received: (qmail 31853 invoked by uid 48); 9 Jul 2014 15:58:09 -0000 From: "emsr at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61057] [C++11] operator . considered part of User Defined Literal invocation. Date: Wed, 09 Jul 2014 15:58: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-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: emsr at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00561.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61057 emsr at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from emsr at gcc dot gnu.org --- As someone who has dabbled in Ruby I am sympathetic to the request to have this work. After looking at the standard language and our implementation I must conclude that your code is invalid. I then tried to imagine a way, for example, if the stuff after a dot could not be a mantissa stop processing chars at the dot so the remainder can become an invocation or access. Unfortunately, 123. is a valid double so this idea can't work even as an extension. FWIW, character and string user-defined literals can have invocations like "Hello, World!!!"s.length(). Perhaps two dots could signal a termination of a literal as was tried for '_' as digit separator. This would require much noodling by the standards folks though. I'll ponder this last idea but I'll mark this as resolved invalid.