Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpl]... is there an mpl::string
From: Eric Niebler (eric_at_[hidden])
Date: 2009-04-07 16:26:25


Dominique Devienne wrote:
> On Tue, Apr 7, 2009 at 12:21 PM, Eric Niebler <eric_at_[hidden]> wrote:
>> multi-character literals give a nicer compile-time string interface.
>> // With mpl::string
>> mpl::string<'hell','o wo','rld'>
>
> Hi Eric,
>
> I've been lurking on this thread for a while, and I'm intrigued by
> "multi-character literals". Beside being new to me, a Google search
> yields little information on them, beside the fact that "The value of
> a narrow or wide character literal containing more than one character
> or escape sequence is implementation-defined." Isn't this a problem
> for mpl::string? Thanks, --DD

"Implementation-defined" means that each compiler vendor is required to
document how multi-character literals are assigned integral values. A
library like MPL can use this information to provide a specialized
implementation for each compiler, presenting the user with a uniform
interface. And as it turns out, there is very little variation among
compiler vendors around the handling of multi-character literals. So
far, just one implementation has sufficed.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net