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
在不改变函数调用形式的情况下,重构Launch,增强可读性,美观
// before struct Launch { struct Prompt {}; struct Schedule {}; struct Current {}; }; // after enum class Launch { Prompt, Schedule, Current, };
// before template <class T, class F, typename std::enable_if<std::is_same<T, Launch::Prompt>::value, T>::type* = nullptr> inline Uthread async(F&& f, Executor* ex) { ... } template <class T, class F, typename std::enable_if<std::is_same<T, Launch::Schedule>::value, T>::type* = nullptr> inline void async(F&& f, Executor* ex) { ... } // after template <Launch T, class F> inline std::enable_if_t<T == Launch::Prompt, Uthread> async(F&& f, Executor* ex) { ... } template <Launch T, class F> inline std::enable_if_t<T == Launch::Schedule> async(F&& f, Executor* ex) { ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Search before asking
What happened + What you expected to happen
在不改变函数调用形式的情况下,重构Launch,增强可读性,美观
Reproduction way
Anything else
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: