ALLOCATOR_DECL (<allocators>)
アロケーター テンプレート クラスを生成します。
#define ALLOCATOR_DECL(cache, sync, name) <alloc_template>
解説
マクロは共に同期 sync 型フィルターと cacheキャッシュを使用するアロケーター テンプレート クラスを定義する特殊化 template <> class name<void> {.....} とテンプレートを定義 template <class Type> class name {.....} します。
このブレークポイントをコンパイルできるコンパイラで生成されるテンプレートの定義は次のようになっています:
template <class Type> class name
: public stdext::allocators::allocator_base<Type, sync<cache > >
{
public:
name() {}
template <class Other> name(const name<Other>&) {}
template <class Other> name& operator = (const name<Other>&)
{return *this; }
template <class Other> struct rebind
{ /* convert a name<Type> to a name<Other> */
typedef name<Other> other;
};
};
を再コンパイルできないコンパイラで生成されるテンプレートの定義は次のようになっています:
template <class Type< class name
: public stdext::allocators::allocator_base<Type,
sync<stdext::allocators::rts_alloc<cache > > >
{
public:
name() {}
template <class Other> name(const name<Other>&) {}
template <class Other> name& operator = (const name<Other>&)
{return *this; }
};
必要条件
ヘッダー: <allocators>
名前空間: の stdext