
29 Oct
2010
29 Oct
'10
4:04 p.m.
Question. For the example given at the link above, it has
typedef mpl::string<'hell','o wo','rld'> hello;
That's weird.
Why would it not be
typedef mpl::string<'h','e','l','l','o', ' ','w','o','r','l','d'> hello;
I would think this was correct, as well.
OR if the example is correct, why could you not simply do
typedef mpl::string<'hello world'> hello;
Non-type template arguments can only be constant integers or (maybe in this case) multi-byte characters. A four-byte character value might be the standard limit here. (To be honest, I haven't really worked with Unicode or anything else beyond one-byte characters. Someone else may have a better answer for you.) Cromwell D. Enage