Я просмотрел такие ответы, как https://stackoverflow.com/a/69694086/18658154, однако в моем случае он не компилируется.
template
class ViewPath : public Path {
public:
ViewPath(Types ...args) {
// irrelevant code here
}
void executeFunction() const override {
std::apply(std::bind_front(this->function, this), this->function_args);
}
private:
std::function function;
std::tuple function_args;
};
Я также пробовал заменить Types... на int, но возникают те же ошибки:
/usr/include/c++/v1/tuple
1354 | _LIBCPP_NOEXCEPT_RETURN(std::__invoke(std::forward(__f), std::get(std::forward(__t))...))
|
/usr/include/c++/v1/tuple
1358 | _LIBCPP_NOEXCEPT_RETURN(std::__apply_tuple_impl(
| ^~~~~~~~~~~~~~~~~~~~~~~
Подробнее здесь: https://stackoverflow.com/questions/798 ... s-template
Мобильная версия