Section 15.5.1 of gettext(-0.18.3.1)'s documentation (gettext.info)
has to say in summary:

        String syntax
             ‘"abc"’
        gettext shorthand
             ‘_("abc")’

The C++2011 literal operator provides an interesting stylistic way
of invoking a function on a string without having to use parentheses.
For example:

#include <cstdio>
#include <libintl.h>
static const char *operator"" _tl(const char *s, size_t)
{
        return gettext(s);
}
int main(void)
{
        printf("Hello world\n"_tl);
        return 0;
}

It does not look like xgettext has a way to specify the suffix
and extract the string, short of using the -a option. (RFE)

Additionally, xgettext stumbles upon the operator"" keyword itself (as a 
result of -a), which does not mean what xgettext thinks it means:

stl.cpp:3: warning: Empty msgid.  It is reserved by GNU gettext:
                    gettext("") returns the header entry with
                    meta information, not the empty string.

Reply via email to