Hmm, sorry I didn't notice this patch until now. Please CC me on C++
patches, and feel free to ping me if I don't respond promptly. Thanks
for working on this!
2. Templates don't really work. This is proving difficult for my little brain.
I need to parse this:
123_abc;
and replace it with a call to
operator"" _abc<'1', '2', '3'>();
I can call
operator"" _abc<>();
In other words I can't figure out how to get the template args in.
There's stuff in there getting the template function out of OVERLOAD.
Then I try tsubst. No dice.
Can you build up a TEMPLATE_ID_EXPR and then let the usual overload
resolution code do the rest?
3. I can't get friend to work. The operator definition doesn't even get
written.
I'm deferring this until after I get templates to work.
If you're talking about your udlit-friend.C test, I wouldn't expect that
to work; friends are only found by argument-dependent lookup, and there
is no argument of type Foo in the call
operator""_Bar('x')
+#define UDLIT_OP_MANGLED_PREFIX "__udlit"
Discussion on the ABI list seems to have settled on
li <source-name>
as the mangling of a literal operator.
Rather than check lang == CXX0X or GNUCXX0X in libcpp, let's add a C++0x
flag.
There doesn't seem to be any need for USERDEF_LITERAL to be in the
language-independent code; bits can go in c-common.h and c-common.def
rather than tree.h and tree.def, etc.
Thanks,
Jason