Boost logo

Boost :

Subject: Re: [boost] Compile Time String in C++14
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-08-26 21:51:06

Mikael Persson wrote:
> Here is a short list of existing compile-time string implementations (in
> case some people reading this are not familiar with the options available
> to solve that problem):

Thanks for the links and valuable info!

I already played before with Scott Schurr's implementation but wasn't
able to do with it everything I wanted (see below).

> @ Abel:
>> So the way I'd use it would be something like:
>> ...
>> Did you manage to use these strings as template arguments somehow?
> AFAIK, you can use any of the above-listed implementations of constexpr
> strings in the way that you showed, but not the one discussed here.

Do you know about some example where this is actually done? I can't see
a straightforward way to pass such constexpr string as a template
parameter and do something reasonable with it internally. In particular
to generate a C++ type from a string literal. I think this is the most
important concept. Correct me if I'm wrong but it seems to me that if
you're dealing with constexpr strings you must handle them in constexpr
functions and AFAIU that's not what Abel wanted. The technique proposed
by TONGARI allows to generate types, at least in some cases, still not
in Abel's case. Or am I missing something?


Boost list run by bdawes at, gregod at, cpdaniel at, john at