¡@

Home 

c++ Programming Glossary: is_instantiation_of

How can I check if a type is an instantiation of a given class template? [duplicate]

http://stackoverflow.com/questions/11251376/how-can-i-check-if-a-type-is-an-instantiation-of-a-given-class-template

typename Tail struct typelist static_assert boost mpl or_ is_instantiation_of typelist Tail std is_same Tail null_type value Tail must be.. typedef Head head typedef Tail tail Is such a trait is_instantiation_of already available in the standard library or in Boost Is is.. template typename... class Template typename T struct is_instantiation_of std false_type template template typename... class Template..

Doing a static_assert that a template type is another template

http://stackoverflow.com/questions/17390605/doing-a-static-assert-that-a-template-type-is-another-template

template typename T template typename class TT struct is_instantiation_of std false_type template typename T template typename class TT.. template typename T template typename class TT struct is_instantiation_of TT T TT std true_type Use it as follows in your program template.. foo template typename FooType struct bar static_assert is_instantiation_of FooType foo value failure int main bar int b ERROR bar foo int..

Using a template alias instead of a template within a template

http://stackoverflow.com/questions/17392621/using-a-template-alias-instead-of-a-template-within-a-template

template typename... class TT typename... Ts struct is_instantiation_of public std false_type template template typename... class TT.. template typename... class TT typename... Ts struct is_instantiation_of TT TT Ts... public std true_type template typename T struct.. foo template typename FooType struct bar static_assert is_instantiation_of foo FooType value success int main int char bar foo int b success..