Check if type is instantiation of a template (#1184)
Summary: - There is not an easy way to check if a given type is an instantiation of a class template. - The common solution is to write a custom trait each time and specialize it for the given instantiation so that the trait returns `std:true_type`. - Add `is_instantiation_of` to help with DRY in custom traits for checking if a type is an instance of a given class template. Note that this does not work when the class template has a mix of type and non-type template parameters. It only works with types. Pull Request resolved: https://github.com/facebook/folly/pull/1184 Reviewed By: vitaut Differential Revision: D16161679 Pulled By: yfeldblum fbshipit-source-id: c933fd3db7c56f61b6784fdcd199ff7963d61d8f
Showing
Please register or sign in to comment