次の定義があります。
typedef boost::multi_index_container<
ModelPtr,
boost::multi_index::indexed_by<
boost::multi_index::sequenced<boost::multi_index::tag<byInsertOrder> >, // to keep order of inserting
boost::multi_index::ordered_non_unique< boost::multi_index::tag<byPriority>,
boost::multi_index::const_mem_fun<IModel,
unsigned int,
&IModel::getPriority>,
std::greater< unsigned int> // from the highest priority to the lowest
>
>
> ModelContainer;
typedef ModelContainer::template index<AOActivationList::byInsertOrder>::type ModelByInsertOrderType; (*)
問題は、gcc 4.5.3 でコンパイルしようとすると、次のエラーが発生することです: エラー: 'template' (曖昧さ回避ツールとして) は、(*) でマークされたテンプレート内の行でのみ許可されます。Visual Studio 2008 ではコンパイルされます。
その理由は何ですか?修正方法は?