Boost.ConfigがeMbedded Visual C++ 4.0で定義する主なマクロ

  • BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
    • 実行時まで失敗が分からないので注意
    • BOOST_(APPEND_)EXPLICIT_TEMPLATE_(NON_)TYPEを必ず使うこと
    • それでもコンパイルが通らない場合があった
  • BOOST_NO_FUNCTION_TEMPLATE_ORDERING
  • BOOST_NO_MEMBER_TEMPLATE_FRIENDS
    • Visual C++ 7.1でも
  • BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
    • 関数名をこちらで決めさせてもらうことでそれなりのことはできる
  • BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
  • BOOST_NO_USING_TEMPLATE


[]template[]< []class[] []TagT[] >
[]UINT[] []register_window_message[]([]LPCTSTR[] []pszMessage[] []BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE[]([]TagT[]))
{

[]ATLASSERT[]([]is_valid_string[]([]pszMessage[]));

[]static[] []UINT[] []uMessage[] = 0;

[]if[] ([]uMessage[] == 0)
{
[]scoped_lock[]<[]WTL[]::[]CStaticDataInitCriticalSectionLock[]> []lock[];

[]if[] ([]uMessage[] == 0)
{
[]uMessage[] = ::[]RegisterWindowMessage[]([]pszMessage[]);
[]api_verify[]([]uMessage[] != 0);
}
}

[]ATLASSERT[]([]uMessage[] != 0);
[]return[] []uMessage[];
}