Workaround missing std::system on iOS, take 2

This commit is contained in:
Victor Zverovich 2021-04-25 08:14:36 -07:00
parent 847aac4315
commit 69bdc20a3c

View File

@ -200,8 +200,8 @@ FMT_API void report_windows_error(int error_code,
string_view message) FMT_NOEXCEPT; string_view message) FMT_NOEXCEPT;
#endif // _WIN32 #endif // _WIN32
// std::system is not available on iOS (#2248). // std::system is not available on some platforms such as iOS (#2248).
#ifndef TARGET_OS_IPHONE #ifdef __OSX__
template <typename S, typename... Args, typename Char = char_t<S>> template <typename S, typename... Args, typename Char = char_t<S>>
void say(const S& format_str, Args&&... args) { void say(const S& format_str, Args&&... args) {
std::system(format("say \"{}\"", format(format_str, args...)).c_str()); std::system(format("say \"{}\"", format(format_str, args...)).c_str());