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
template<typename Command, typename T> inline void bind_field(Command& command, size_t index, T& value) { bind_field(command, index, std::forward(value)); } template<typename Command, typename T> inline void bind_field(Command& command, const char* name, T& value) { size_t index=command.find_field(name); if(index==-1) value=T(); else bind_field(command, index, std::forward(value)); }
//! 下面编译报错,编译器不知道该使用上面哪个模板进行实例化! template<> inline void bind_record<qtl::mysql::statement, TestMysqlRecord>(qtl::mysql::statement& command, TestMysqlRecord&& v) { qtl::bind_field(command, 0, v.id); }
The text was updated successfully, but these errors were encountered:
这样写:
qtl::bind_field(command, size_t(0), v.id);
0可能会被当作整数或指针。
Sorry, something went wrong.
No branches or pull requests
template<typename Command, typename T>
inline void bind_field(Command& command, size_t index, T& value)
{
bind_field(command, index, std::forward(value));
}
template<typename Command, typename T>
inline void bind_field(Command& command, const char* name, T& value)
{
size_t index=command.find_field(name);
if(index==-1)
value=T();
else
bind_field(command, index, std::forward(value));
}
//! 下面编译报错,编译器不知道该使用上面哪个模板进行实例化!
template<>
inline void bind_record<qtl::mysql::statement, TestMysqlRecord>(qtl::mysql::statement& command, TestMysqlRecord&& v)
{
qtl::bind_field(command, 0, v.id);
}
The text was updated successfully, but these errors were encountered: