[過去ログ] Boostを語れゴラァ part3 (1001レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
450
(1): 2006/12/16(土)02:36 AAS
これか?
template < typename T >
struct Foo
{
template < typename P >
static void Bar() ;
} ;

Foo<int>::Bar<int>() ;

あるいはこれか?
template < typename T,
template<typename, typename>
class Container >
class Foo
{
Container< T, std::allocator<T> > cont ;
} ;

Foo< int, std::vector > FooVec ;

どちらもできる……が、後者は、なぜかテンプレートテンプレートパラメータのデフォルト引数が使えない。

//エラー
template< template <typename, typename = std::allocator<int> > class Container >
class Foo
{ Container<int> cont ; } ;
1-
あと 551 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.010s