Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
インクルードする必要のある2つの異なるヘッダーファイルがあります(1つは標準のassert.hです)。どちらもassert関数を備えています。私はこれらのヘッダーファイルを制御できません(したがって、それらを変更することはできません)。これら2つの関数間の競合を示すコンパイラエラーが発生します。このコンパイラエラーを排除するためにassert.hのassert関数を使用するようにコードで指定するにはどうすればよいですか?
namespace OtherAssert { #include "private_assert.h" } //... void foo() { OtherAssert::assert(true); // non-standard assert assert(true); // the one from standard assert.h }