[cppll:0919] <tips> マクロのコンフリクト防止( was Re: 二重インクルード防止をどう書く)

Subject:
[cppll:0919] <tips> マクロのコンフリクト防止( was Re: 二重インクルード防止をどう書く)
From:
Wraith the Trickster <wraith@...>
Date:
Thu, 31 Jan 2002 14:58:54 +0900
X-Mailer:
Microsoft Outlook Express 5.50.4807.1700
Message-Id:
<012f01c1aa1c$6643a540$c5acc63d@mist>
References:
915
道化師です。

[cppll:0915] Re: 二重インクルード防止をどう書く】
> 正直悩んでます。#define はnamespaceでくくれないから。

 #define EPI_HOGEHOGE ...
 #define EPI_MOGEMOGE ...

#ifdef USING_EPI
 #define HOGEHOGE  EPI_HOGEHOGE
 #define MOGEMOGE  EPI_MOGEMOGE
#endif

... こんなふうにするのはいかがでせう?

□■□■                  Wraith the Trickster                  □■□■
■□■□ 〜I'll go with heaven's advantage and fool's wisdom.〜 ■□■□
[cppll ML] http://www.trickpalace.net/cppll/

スレッド

Navigation

検索

[検索ヘルプ]

Maintener: Tietew <www.tietew.jp>
Powered by Ruby on Rails, Mongrel, PostgreSQL, and Hyper Estraier.
click here