pw_thread: Add explicit public default ctor for stl::Options

Without the explicit default public constructor c++20-based compiler
rejects `stl::Options{}` initialization and allows only `stl::Options()`
one.
See this example for the reference: https://godbolt.org/z/K5GWaGsTf.

This CL also prevents to create `thread::Options` using `{}` syntax
with explicitly defining the empty constructor instead of the default
one.
See this example for the reference: https://godbolt.org/z/EP7hTooo8.

Change-Id: I2749198c0f8134f57320d8f91515c45d252bd089
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/98101
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Dennis Kormalev <denk@google.com>
diff --git a/pw_thread/docs.rst b/pw_thread/docs.rst
index ebc77b5..75df4b2 100644
--- a/pw_thread/docs.rst
+++ b/pw_thread/docs.rst
@@ -232,6 +232,13 @@
 stack, etc.). The Options may be deleted or re-used immediately after
 starting a thread.
 
+Options subclass must contain non-default explicit constructor (parametrized or
+not), e.g. ``constexpr Options() {}``. It is not enough to have them as
+``= default`` ones, because C++17 considers subclasses like ``stl::Options`` as
+aggregate classes if they have a default constructor and requires base class
+constructor to be public (which is not the case for the ``thread::Options``) for
+``Options{}`` syntax.
+
 Please see the thread creation backend documentation for how their Options work.
 
 Portable Thread Creation
diff --git a/pw_thread/public/pw_thread/thread.h b/pw_thread/public/pw_thread/thread.h
index aa9271c..9f36ba2 100644
--- a/pw_thread/public/pw_thread/thread.h
+++ b/pw_thread/public/pw_thread/thread.h
@@ -41,7 +41,9 @@
 // starting a thread.
 class Options {
  protected:
-  constexpr Options() = default;
+  // We can't use `= default` here, because it allows to create an Options
+  // instance in C++17 with `pw::thread::Options{}` syntax.
+  constexpr Options() {}
 };
 
 // The class Thread can represent a single thread of execution. Threads allow
diff --git a/pw_thread_embos/public/pw_thread_embos/options.h b/pw_thread_embos/public/pw_thread_embos/options.h
index d024fde..9f150d6 100644
--- a/pw_thread_embos/public/pw_thread_embos/options.h
+++ b/pw_thread_embos/public/pw_thread_embos/options.h
@@ -42,9 +42,9 @@
 //
 class Options : public thread::Options {
  public:
-  constexpr Options() = default;
-  constexpr Options(const Options&) = default;
-  constexpr Options(Options&& other) = default;
+  constexpr Options() {}
+  constexpr Options(const Options&) {}
+  constexpr Options(Options&&) {}
 
   // Sets the name for the embOS task, this is optional.
   // Note that this will be deep copied into the context and may be truncated
diff --git a/pw_thread_freertos/public/pw_thread_freertos/options.h b/pw_thread_freertos/public/pw_thread_freertos/options.h
index b87e2c2..fa6a086 100644
--- a/pw_thread_freertos/public/pw_thread_freertos/options.h
+++ b/pw_thread_freertos/public/pw_thread_freertos/options.h
@@ -42,9 +42,9 @@
 //
 class Options : public thread::Options {
  public:
-  constexpr Options() = default;
-  constexpr Options(const Options&) = default;
-  constexpr Options(Options&& other) = default;
+  constexpr Options() {}
+  constexpr Options(const Options&) {}
+  constexpr Options(Options&&) {}
 
   // Sets the name for the FreeRTOS task, note that this will be truncated
   // based on configMAX_TASK_NAME_LEN.
diff --git a/pw_thread_stl/public/pw_thread_stl/options.h b/pw_thread_stl/public/pw_thread_stl/options.h
index 26f5bf5..fc5fefb 100644
--- a/pw_thread_stl/public/pw_thread_stl/options.h
+++ b/pw_thread_stl/public/pw_thread_stl/options.h
@@ -21,6 +21,9 @@
 // Instead, users are expected to start the thread and after dynamically adjust
 // the thread's attributes using std::thread::native_handle based on the native
 // threading APIs.
-class Options : public thread::Options {};
+class Options : public thread::Options {
+ public:
+  constexpr Options() {}
+};
 
 }  // namespace pw::thread::stl
diff --git a/pw_thread_threadx/public/pw_thread_threadx/options.h b/pw_thread_threadx/public/pw_thread_threadx/options.h
index 079b587..0afb462 100644
--- a/pw_thread_threadx/public/pw_thread_threadx/options.h
+++ b/pw_thread_threadx/public/pw_thread_threadx/options.h
@@ -46,9 +46,9 @@
 //
 class Options : public thread::Options {
  public:
-  constexpr Options() = default;
-  constexpr Options(const Options&) = default;
-  constexpr Options(Options&& other) = default;
+  constexpr Options() {}
+  constexpr Options(const Options&) {}
+  constexpr Options(Options&&) {}
 
   // Sets the name for the ThreadX thread, note that this will be deep copied
   // into the context and may be truncated based on