Boost logo

Boost :

Subject: Re: [boost] [type_traits] templated type traits?
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2012-11-09 19:11:07

On 09/11/2012 08:45 p.m., Lorenzo Caminiti wrote:
> Is there a way to inspect if a type is a template instantiaton
> (is_templated) and the type of the instantiated template parameters
> (arg1_type)?
> is_templated< std::vector<int> >::value // true
> is_templated< int >::value // false
> template_traits< std::vector<int> >::arg1_type // int

I uploaded template traits to the vault a long time ago. You can find it
at as,
or simply

It works only for templates of type arguments, no non-type or template
arguments. There were other limitations, but I no longer remember them.

Agustín K-ballo Bergé.-

Boost list run by bdawes at, gregod at, cpdaniel at, john at