Closed jatinchowdhury18 closed 2 years ago
Just tested this. While it works, there is a C++14 feature in place. Since Rack uses C++11, not sure you want that.
ChowDSP/src/Credit/FileUtils.hpp: In function 'void file_utils::saveToChosenFilePath(std::function<void(const char*)>&&)':
ChowDSP/src/Credit/FileUtils.hpp:45:70: warning: lambda capture initializers only available with '-std=c++14' or '-std=gnu++14'
45 | async_dialog_filebrowser(true, dir.c_str(), "Save credit file", [action = std::move (saveAction)](char* path) {
|
Yeah, that's a good point. I've updated the async call now to use std::bind
instead of the lambda capture initializer. It's a little uglier, but I believe that's the only C++11-friendly way to move something into a lambda that will be called asynchronously.
Related to the changes discussed in #28.
This patch should probably be tested with Cardinal before merging (@falkTX).