どういうわけか、(根本的な?)問題を示すこれらの「最短」プログラムが好きです。VS2008 で一部のテンプレート コードをテストすると、このエラーが表示されました (VS2010 および VS2012 でも確認されています。以下を参照してください)。
c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory(225): エラー C2752: 'std::_Ptr_cat_helper<_T1,_T2>': 複数の部分的な特殊化がテンプレート引数リストと一致します
with [ _T1=const float (**), _T2=const float (**) ]
問題を次の 3 行に要約できます。
#include <vector>
typedef float TPoint[3];
std::vector<TPoint const*> points; // error C2752
以下はすべて問題ないことに注意してください
#include <vector>
#include <list>
typedef float TPoint[3];
// these similar usages of TPoint are all ok:
std::vector<TPoint*> points; // no error
TPoint const* points1[2];
std::list<TPoint const*> points2;
struct _Ptr_cat_helper に追加のテンプレートの特殊化を提供することで、xutility を修正しようとしましたが、うまくいきませんでした。何がうまくいかないのですか?const
または、 ?を失うことなく回避する方法