This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Implementation of string-literal as template parameter
- From: "Piotr Rak" <piotr dot rak at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 15 Apr 2008 18:03:12 +0200
- Subject: Implementation of string-literal as template parameter
Hi,
Recently i have posted an idea of new language feature to
comp.lang.c++.moderated.
That is "String literal as template parameter?" form 12.04.2008,
if anyone is interested to see whole thread.
The idea is to allow string-literals as template argument, and make
them equivalent to variadic character pack 'char...'.
For example:
template <char... Chars_>
class Foo;
Foo<"abc">
would be equivalent to
Foo<'a', 'b', 'c'>
I am interested in writing proof of concept implementation.
Since i dont have expirience with g++ codebase, I wanted to ask:
1) Is it expected to be hard to implement? (which I rather dont expect
to be, but better ask :-)
2) Any hints, how/where should I start?
Thanks in advance for any feedback.
Piotr Rak