C++相談室 part15
■ このスレッドは過去ログ倉庫に格納されています
0464デフォルトの名無しさん
NGNGでもこれだとメンバテンプレートだけどコピーコンストラクタを生成
してくれたよ。
template <typename T>
struct X {
X() {}
template <typename U>
X(const U&) {
std::cout << "template constructor" << std::endl;
}
};
int main()
{
const X<int> x;
X<X<int> > copied(x);
}
■ このスレッドは過去ログ倉庫に格納されています