This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61057] [C++11] operator . considered part of User Defined Literal invocation.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]