Fix compiler error with -fno-exceptions. am: 5b1ea9b3fc

Original change: https://android-review.googlesource.com/c/platform/external/openscreen/+/1558661

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5842256fb9d988fd65b9e44bea6d4437e082390a
diff --git a/platform/api/task_runner.h b/platform/api/task_runner.h
index c061086..948eb08 100644
--- a/platform/api/task_runner.h
+++ b/platform/api/task_runner.h
@@ -22,7 +22,13 @@
 //     B runs (even if A and B run on different threads).
 class TaskRunner {
  public:
+// Seem to get an error using clang when compiling with -fno-exceptions:
+//   error: implicit instantiation of undefined template 'std::__1::packaged_task<void () noexcept>'
+#if __has_feature(cxx_exceptions)
   using Task = std::packaged_task<void() noexcept>;
+#else
+  using Task = std::packaged_task<void()>;
+#endif
 
   virtual ~TaskRunner() = default;