noexcept: add some noexcepts when mirroring the STL

Change-Id: If139a17461644afd0262710631ca413f38f2f66e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/31040
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/pw_sync_stl/counting_semaphore.cc b/pw_sync_stl/counting_semaphore.cc
index 781aa77..629d0dc 100644
--- a/pw_sync_stl/counting_semaphore.cc
+++ b/pw_sync_stl/counting_semaphore.cc
@@ -36,7 +36,7 @@
   --native_type_.count;
 }
 
-bool CountingSemaphore::try_acquire() {
+bool CountingSemaphore::try_acquire() noexcept {
   std::lock_guard lock(native_type_.mutex);
   if (native_type_.count != 0) {
     --native_type_.count;