>>891
<errcode.h>
#ifndef ERR_ENTRY
 #define ERR_ENTRY_BEGIN enum Error {
 #define ERR_ENTRY(code, value, str) code = value
 #define ERR_ENTRY_END };
#endif
 ERR_ENTRY( ERR_OK, 0, "No Error" ),
 以下略

<errcode.cpp>
#define ERR_ENTRY_BEGIN
#define ERR_ENTRY(code, value, str) lookup.insert( make_pair(code, (const char*)str) )
#define ERR_ENTRY_END
void init_map() {
 #include "errcode.h"
}

ってことじゃないのかと思ってたのだけどどーだろ。