Nest all namespaces

The compiler supports this now.  We can type less going forward.
No functional changes.

Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: I29d6fa4f9aacc0e381f1a7637294db0392466995
diff --git a/y2014/actors/autonomous_actor.cc b/y2014/actors/autonomous_actor.cc
index 07c6855..7486f47 100644
--- a/y2014/actors/autonomous_actor.cc
+++ b/y2014/actors/autonomous_actor.cc
@@ -17,8 +17,7 @@
 #include "y2014/queues/auto_mode_generated.h"
 #include "y2014/queues/hot_goal_generated.h"
 
-namespace y2014 {
-namespace actors {
+namespace y2014::actors {
 
 namespace chrono = ::std::chrono;
 namespace this_thread = ::std::this_thread;
@@ -432,5 +431,4 @@
   return true;
 }
 
-}  // namespace actors
-}  // namespace y2014
+}  // namespace y2014::actors
diff --git a/y2014/actors/shoot_actor.cc b/y2014/actors/shoot_actor.cc
index 0719062..691e3de 100644
--- a/y2014/actors/shoot_actor.cc
+++ b/y2014/actors/shoot_actor.cc
@@ -9,8 +9,7 @@
 #include "y2014/control_loops/shooter/shooter_goal_generated.h"
 #include "y2014/control_loops/shooter/shooter_status_generated.h"
 
-namespace y2014 {
-namespace actors {
+namespace y2014::actors {
 
 constexpr double ShootActor::kOffsetRadians;
 constexpr double ShootActor::kClawShootingSeparation;
@@ -199,5 +198,4 @@
   return false;
 }
 
-}  // namespace actors
-}  // namespace y2014
+}  // namespace y2014::actors
diff --git a/y2014/constants.cc b/y2014/constants.cc
index ff22b8a..5ff44d4 100644
--- a/y2014/constants.cc
+++ b/y2014/constants.cc
@@ -21,8 +21,7 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-namespace y2014 {
-namespace constants {
+namespace y2014::constants {
 namespace {
 
 const uint16_t kCompTeamNumber = 971;
@@ -261,5 +260,4 @@
   return *values[team_number];
 }
 
-}  // namespace constants
-}  // namespace y2014
+}  // namespace y2014::constants
diff --git a/y2014/control_loops/claw/claw.cc b/y2014/control_loops/claw/claw.cc
index 2fb93b4..39ee7a4 100644
--- a/y2014/control_loops/claw/claw.cc
+++ b/y2014/control_loops/claw/claw.cc
@@ -40,9 +40,7 @@
 // If a claw runs up against a movable limit, move both claws outwards to get
 // out of the condition.
 
-namespace y2014 {
-namespace control_loops {
-namespace claw {
+namespace y2014::control_loops::claw {
 
 using ::frc971::HallEffectTracker;
 using ::frc971::control_loops::DoCoerceGoal;
@@ -1019,6 +1017,4 @@
   was_enabled_ = enabled;
 }
 
-}  // namespace claw
-}  // namespace control_loops
-}  // namespace y2014
+}  // namespace y2014::control_loops::claw
diff --git a/y2014/control_loops/claw/claw_lib_test.cc b/y2014/control_loops/claw/claw_lib_test.cc
index 8886cda..de9b6bc 100644
--- a/y2014/control_loops/claw/claw_lib_test.cc
+++ b/y2014/control_loops/claw/claw_lib_test.cc
@@ -15,10 +15,7 @@
 #include "y2014/control_loops/claw/claw_position_generated.h"
 #include "y2014/control_loops/claw/claw_status_generated.h"
 
-namespace y2014 {
-namespace control_loops {
-namespace claw {
-namespace testing {
+namespace y2014::control_loops::claw::testing {
 
 using ::aos::monotonic_clock;
 using ::frc971::HallEffectStructT;
@@ -659,7 +656,4 @@
   VerifyNearGoal();
 }
 
-}  // namespace testing
-}  // namespace claw
-}  // namespace control_loops
-}  // namespace y2014
+}  // namespace y2014::control_loops::claw::testing
diff --git a/y2014/control_loops/drivetrain/drivetrain_base.cc b/y2014/control_loops/drivetrain/drivetrain_base.cc
index be4f238..d9f396e 100644
--- a/y2014/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2014/control_loops/drivetrain/drivetrain_base.cc
@@ -13,8 +13,7 @@
 
 namespace chrono = ::std::chrono;
 
-namespace y2014 {
-namespace control_loops {
+namespace y2014::control_loops {
 
 const DrivetrainConfig<double> &GetDrivetrainConfig() {
   // TODO(austin): Switch over to using the profile.
@@ -51,5 +50,4 @@
   return kDrivetrainConfig;
 };
 
-}  // namespace control_loops
-}  // namespace y2014
+}  // namespace y2014::control_loops
diff --git a/y2014/control_loops/shooter/shooter.cc b/y2014/control_loops/shooter/shooter.cc
index 2a3e0d0..b0ce4ba 100644
--- a/y2014/control_loops/shooter/shooter.cc
+++ b/y2014/control_loops/shooter/shooter.cc
@@ -9,9 +9,7 @@
 #include "y2014/constants.h"
 #include "y2014/control_loops/shooter/shooter_motor_plant.h"
 
-namespace y2014 {
-namespace control_loops {
-namespace shooter {
+namespace y2014::control_loops::shooter {
 
 namespace chrono = ::std::chrono;
 using ::aos::monotonic_clock;
@@ -688,6 +686,4 @@
   return output_builder.Finish();
 }
 
-}  // namespace shooter
-}  // namespace control_loops
-}  // namespace y2014
+}  // namespace y2014::control_loops::shooter
diff --git a/y2014/control_loops/shooter/shooter_lib_test.cc b/y2014/control_loops/shooter/shooter_lib_test.cc
index d7fc0ea..6c6c7e7 100644
--- a/y2014/control_loops/shooter/shooter_lib_test.cc
+++ b/y2014/control_loops/shooter/shooter_lib_test.cc
@@ -19,10 +19,7 @@
 namespace chrono = ::std::chrono;
 using ::aos::monotonic_clock;
 
-namespace y2014 {
-namespace control_loops {
-namespace shooter {
-namespace testing {
+namespace y2014::control_loops::shooter::testing {
 
 using ::frc971::control_loops::testing::kTeamNumber;
 using ::y2014::control_loops::shooter::kMaxExtension;
@@ -808,7 +805,4 @@
 
 // TODO(austin): Test all the timeouts...
 
-}  // namespace testing
-}  // namespace shooter
-}  // namespace control_loops
-}  // namespace y2014
+}  // namespace y2014::control_loops::shooter::testing
diff --git a/y2014/joystick_reader.cc b/y2014/joystick_reader.cc
index 5349334..232a0ce 100644
--- a/y2014/joystick_reader.cc
+++ b/y2014/joystick_reader.cc
@@ -25,9 +25,7 @@
 
 #define OLD_DS 0
 
-namespace y2014 {
-namespace input {
-namespace joysticks {
+namespace y2014::input::joysticks {
 
 const ButtonLocation kDriveControlLoopEnable1(1, 7),
     kDriveControlLoopEnable2(1, 11);
@@ -441,9 +439,7 @@
                                      "no drivetrain status");
 };
 
-}  // namespace joysticks
-}  // namespace input
-}  // namespace y2014
+}  // namespace y2014::input::joysticks
 
 int main(int argc, char **argv) {
   ::aos::InitGoogle(&argc, &argv);
diff --git a/y2014/wpilib_interface.cc b/y2014/wpilib_interface.cc
index b27e381..016b17a 100644
--- a/y2014/wpilib_interface.cc
+++ b/y2014/wpilib_interface.cc
@@ -55,8 +55,7 @@
 namespace shooter = ::y2014::control_loops::shooter;
 using std::make_unique;
 
-namespace y2014 {
-namespace wpilib {
+namespace y2014::wpilib {
 
 // TODO(Brian): Fix the interpretation of the result of GetRaw here and in the
 // DMA stuff and then removing the * 2.0 in *_translate.
@@ -769,7 +768,6 @@
   }
 };
 
-}  // namespace wpilib
-}  // namespace y2014
+}  // namespace y2014::wpilib
 
 AOS_ROBOT_CLASS(::y2014::wpilib::WPILibRobot);