C++/Rust 2 way binding for MagiskD

This commit is contained in:
topjohnwu
2023-11-17 13:35:50 -08:00
parent 6c0966b795
commit 8d5b9e5329
11 changed files with 234 additions and 176 deletions
+6
View File
@@ -325,3 +325,9 @@ void exec_command_async(Args &&...args) {
};
exec_command(exec);
}
template <typename T>
constexpr auto operator+(T e) noexcept ->
std::enable_if_t<std::is_enum<T>::value, std::underlying_type_t<T>> {
return static_cast<std::underlying_type_t<T>>(e);
}