This is the mail archive of the gcc-patches@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]

Re: [C++-11] User defined literals


On 10/31/2011 12:44 PM, 3dw4rd@verizon.net wrote:
For string and character literals, we can still just build up a call; we
only need to walk the overload list here for numeric literals.

I found that if you don't walk the overload list for chars, a char could be routed to the operator taking wchar_t for example.

Ah, yes, I was overlooking the bit in the standard that says "S shall contain a literal operator (13.5.8) whose only parameter has the type ch".


The paragraph for string literals doesn't have a similar restriction.

Jason


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