We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
参考:
可以使用std::tuple来进行包装
std::tuple
如下:
template <typename attribute_tuple, APITypes APIType, typename policy_tuple> class IShader; template <AttributeType... Attributes, APITypes APIType, class... Policies> class IShader<std::tuple<Attributes...>, APIType, std::tuple<Policies...>> : public Policies... { // ... };
可以按照下面的方式来使用模板类:
IShared<std::tuple<Attribute1, Attribute2>, APITypeFoo, std::tuple<Policy1, Policy2>> ishared_instance;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
模板类的多个可变参数包解决方案
参考:
解决方案
可以使用
std::tuple
来进行包装如下:
可以按照下面的方式来使用模板类:
The text was updated successfully, but these errors were encountered: