[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lily/freetype-error.cc: const struct #include ;
From: |
Carl Sorensen |
Subject: |
Re: lily/freetype-error.cc: const struct #include ; |
Date: |
Mon, 6 Sep 2010 12:32:25 -0600 |
On 9/6/10 11:44 AM, "Graham Percival" <address@hidden> wrote:
> I see a really weird C++ construct in this (short) file:
> lily/freetype-error.cc
>
> --------
> const struct Freetype_error_message
> {
> FT_Error err_code;
> const char* err_msg;
> } ft_errors[] =
>
> #include <freetype/fterrors.h>
>
> ;
> --------
>
> The #include and the ; appear to be part of the const struct -- moving
> the #include further up in the file produces a compile error.
>
> Does anybody know what this is doing, and more importantly, how it
> could be written in more standard/typical C++ ?
This is copied virtually verbatim from the suggested usage in the freetype.h
file, so I guess it's the recommended practice for use with freetype.
HTH,
Carl
- lily/freetype-error.cc: const struct #include ;, Graham Percival, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;,
Carl Sorensen <=
- Re: lily/freetype-error.cc: const struct #include ;, Werner LEMBERG, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Wols Lists, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Alexander Kobel, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Alexander Kobel, 2010/09/06
- Re: lily/freetype-error.cc: const struct #include ;, Graham Percival, 2010/09/10