Use C++17 format for nested namespace definitions

Use the new C++17 format for defining nested namespaces in the
phosphor-regulators application.

The definition
  namespace A::B::C
  {
  ...
  }

is now equivalent to
   namespace A
   {
   namespace B
   {
   namespace C
   {
   ...
   }
   }
   }

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I284055bc94578a45d04d3561f511c0e347a8ecef
diff --git a/phosphor-regulators/src/actions/action.hpp b/phosphor-regulators/src/actions/action.hpp
index af87d41..4cbe76d 100644
--- a/phosphor-regulators/src/actions/action.hpp
+++ b/phosphor-regulators/src/actions/action.hpp
@@ -17,11 +17,7 @@
 
 #include "action_environment.hpp"
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -60,6 +56,4 @@
     virtual bool execute(ActionEnvironment& environment) = 0;
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/src/actions/action_environment.hpp b/phosphor-regulators/src/actions/action_environment.hpp
index fb34141..e519fa5 100644
--- a/phosphor-regulators/src/actions/action_environment.hpp
+++ b/phosphor-regulators/src/actions/action_environment.hpp
@@ -23,11 +23,7 @@
 #include <stdexcept>
 #include <string>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -225,6 +221,4 @@
     size_t ruleDepth{0};
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/src/actions/action_utils.hpp b/phosphor-regulators/src/actions/action_utils.hpp
index 9ddff4f..2cf9c7d 100644
--- a/phosphor-regulators/src/actions/action_utils.hpp
+++ b/phosphor-regulators/src/actions/action_utils.hpp
@@ -21,13 +21,7 @@
 #include <memory>
 #include <vector>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
-{
-namespace action_utils
+namespace phosphor::power::regulators::action_utils
 {
 
 /**
@@ -58,7 +52,4 @@
     return returnValue;
 }
 
-} // namespace action_utils
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators::action_utils
diff --git a/phosphor-regulators/src/actions/set_device_action.hpp b/phosphor-regulators/src/actions/set_device_action.hpp
index 3c61208..7942840 100644
--- a/phosphor-regulators/src/actions/set_device_action.hpp
+++ b/phosphor-regulators/src/actions/set_device_action.hpp
@@ -20,11 +20,7 @@
 
 #include <string>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -86,6 +82,4 @@
     const std::string deviceID{};
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/src/device.hpp b/phosphor-regulators/src/device.hpp
index 5f443b5..ba4c067 100644
--- a/phosphor-regulators/src/device.hpp
+++ b/phosphor-regulators/src/device.hpp
@@ -17,11 +17,7 @@
 
 #include <string>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -66,6 +62,4 @@
     const std::string id{};
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/src/id_map.hpp b/phosphor-regulators/src/id_map.hpp
index c4aab0b..2fbaa93 100644
--- a/phosphor-regulators/src/id_map.hpp
+++ b/phosphor-regulators/src/id_map.hpp
@@ -23,11 +23,7 @@
 #include <stdexcept>
 #include <string>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -151,6 +147,4 @@
     std::map<std::string, Rule*> ruleMap{};
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/src/rail.hpp b/phosphor-regulators/src/rail.hpp
index d5d3b13..247e8ee 100644
--- a/phosphor-regulators/src/rail.hpp
+++ b/phosphor-regulators/src/rail.hpp
@@ -17,11 +17,7 @@
 
 #include <string>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -69,6 +65,4 @@
     const std::string id{};
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/src/rule.hpp b/phosphor-regulators/src/rule.hpp
index 3fb21a6..73e831a 100644
--- a/phosphor-regulators/src/rule.hpp
+++ b/phosphor-regulators/src/rule.hpp
@@ -17,11 +17,7 @@
 
 #include <string>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 /**
@@ -73,6 +69,4 @@
     const std::string id{};
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators
diff --git a/phosphor-regulators/test/actions/mock_action.hpp b/phosphor-regulators/test/actions/mock_action.hpp
index 2535ef3..84455dd 100644
--- a/phosphor-regulators/test/actions/mock_action.hpp
+++ b/phosphor-regulators/test/actions/mock_action.hpp
@@ -20,11 +20,7 @@
 
 #include <gmock/gmock.h>
 
-namespace phosphor
-{
-namespace power
-{
-namespace regulators
+namespace phosphor::power::regulators
 {
 
 class MockAction : public Action
@@ -41,6 +37,4 @@
     MOCK_METHOD(bool, execute, (ActionEnvironment & environment), (override));
 };
 
-} // namespace regulators
-} // namespace power
-} // namespace phosphor
+} // namespace phosphor::power::regulators