[Bug c++/61057] [C++11] operator . considered part of User Defined Literal invocation.
emsr at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 9 15:58:00 GMT 2014
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.
More information about the Gcc-bugs
mailing list