[過去ログ] Boostを語れゴラァ part3 (1001レス)
前次1-
抽出解除 レス栞

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
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 ; } ;
481: 450 2006/12/19(火)08:04 AAS
SP1いれたら、テンプレートテンプレートパラメータのデフォルト引数が使えるようになっていた。
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.024s