----- Original Message -----
From: Ed Smith-Rowland<3dw4rd@verizon.net>
To: gcc@gcc.gnu.org
Subject: [C++-0X] User-defined literals
Date: Mon, 28 Mar 2011 20:13:19 -0400
Greetings,
I am taking a new shot at user-defined literals.
Compared to the previous attempt:
* I have altered libcpp so that it tokenizes user defined
literals in one chunk properly.
* I have started work on new tree nodes and accessors.
* I have (or am trying to) refine the checks for argument and
template parameter.
I would like to check that template literal operators have the
specific non-type parameter pack:
template<char...>
Foo operator"" sluggo();
I looked through the internals documentation and didn't see much on
this. Could anyone give me some pointers?
Also, is there any preference for using VEC vs. TREE_CHAIN for
making trees and accessing them? Is one sort of "modern"?
Finally I am using compparms to verify that a literal operator
argument list conforms to strings like:
(const char*)
(const char*, std::size_t)
(const wchar_t*, std::size_t)
...
I cant get them to work. I built a set of global trees for the
argument types that I want to check. The char and number tests
work.
I use things like this to build the argument lists (I neglect the
return type).
userdef_lit_char16_str_type
= build_function_type_list (void_type_node, char16_array_type_node,
size_type_node, NULL_TREE);
I'm hoping that this matches
(const char16_t*, std::size_t)
but it doesn't.
Ideas?
Thanks,
Ed Smith-Rowland