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/y2019/control_loops/drivetrain/drivetrain_base.cc b/y2019/control_loops/drivetrain/drivetrain_base.cc
index 089bdf0..77085a6 100644
--- a/y2019/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2019/control_loops/drivetrain/drivetrain_base.cc
@@ -13,9 +13,7 @@
 
 namespace chrono = ::std::chrono;
 
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
 
 using ::frc971::constants::ShifterHallEffect;
 
@@ -58,6 +56,4 @@
   return kDrivetrainConfig;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::drivetrain
diff --git a/y2019/control_loops/drivetrain/event_loop_localizer.cc b/y2019/control_loops/drivetrain/event_loop_localizer.cc
index 634cedb..a916914 100644
--- a/y2019/control_loops/drivetrain/event_loop_localizer.cc
+++ b/y2019/control_loops/drivetrain/event_loop_localizer.cc
@@ -2,9 +2,7 @@
 
 #include <functional>
 
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
 constexpr size_t EventLoopLocalizer::kMaxTargetsPerFrame;
 
 ::std::array<EventLoopLocalizer::Camera, constants::Values::kNumCameras>
@@ -110,6 +108,4 @@
   localizer_.UpdateTargets(cameras_[camera], views, t);
 }
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::drivetrain
diff --git a/y2019/control_loops/drivetrain/localized_drivetrain_test.cc b/y2019/control_loops/drivetrain/localized_drivetrain_test.cc
index 016e3b7..5aaafd7 100644
--- a/y2019/control_loops/drivetrain/localized_drivetrain_test.cc
+++ b/y2019/control_loops/drivetrain/localized_drivetrain_test.cc
@@ -15,10 +15,7 @@
 // drivetrain, will behave properly. The purpose of this test is to make sure
 // that all the pieces fit together, not to test the algorithms themselves.
 
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
-namespace testing {
+namespace y2019::control_loops::drivetrain::testing {
 
 using frc971::control_loops::drivetrain::DrivetrainConfig;
 using frc971::control_loops::drivetrain::Goal;
@@ -399,7 +396,4 @@
   EXPECT_NEAR(HPSlotLeft().abs_pos().y(), drivetrain_plant_.state().y(), 0.2);
 }
 
-}  // namespace testing
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::drivetrain::testing
diff --git a/y2019/control_loops/drivetrain/localizer_test.cc b/y2019/control_loops/drivetrain/localizer_test.cc
index 28f0235..7f0b13d 100644
--- a/y2019/control_loops/drivetrain/localizer_test.cc
+++ b/y2019/control_loops/drivetrain/localizer_test.cc
@@ -19,9 +19,7 @@
 
 DEFINE_bool(plot, false, "If true, plot");
 
-namespace y2019 {
-namespace control_loops {
-namespace testing {
+namespace y2019::control_loops::testing {
 
 using ::y2019::constants::Field;
 
@@ -694,6 +692,4 @@
             /*goal_tolerance=*/0.7,
         })));
 
-}  // namespace testing
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::testing
diff --git a/y2019/control_loops/drivetrain/replay_localizer.cc b/y2019/control_loops/drivetrain/replay_localizer.cc
index b7d269b..80cf221 100644
--- a/y2019/control_loops/drivetrain/replay_localizer.cc
+++ b/y2019/control_loops/drivetrain/replay_localizer.cc
@@ -25,9 +25,7 @@
 DEFINE_int32(start_offset, 0,
              "Time, in seconds, to start replay plot after the first enable.");
 
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
 using ::y2019::constants::Field;
 
 typedef TypedLocalizer<constants::Values::kNumCameras, Field::kNumTargets,
@@ -386,9 +384,7 @@
   ::std::vector<double> long_accel_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::drivetrain
 
 int main(int argc, char *argv[]) {
   gflags::ParseCommandLineFlags(&argc, &argv, false);
diff --git a/y2019/control_loops/drivetrain/target_selector.cc b/y2019/control_loops/drivetrain/target_selector.cc
index 87115ae..b078dba 100644
--- a/y2019/control_loops/drivetrain/target_selector.cc
+++ b/y2019/control_loops/drivetrain/target_selector.cc
@@ -2,8 +2,7 @@
 
 #include "aos/json_to_flatbuffer.h"
 
-namespace y2019 {
-namespace control_loops {
+namespace y2019::control_loops {
 
 constexpr double TargetSelector::kFakeFov;
 
@@ -100,5 +99,4 @@
   return true;
 }
 
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops
diff --git a/y2019/control_loops/drivetrain/target_selector_test.cc b/y2019/control_loops/drivetrain/target_selector_test.cc
index d4ef6da..b0767e5 100644
--- a/y2019/control_loops/drivetrain/target_selector_test.cc
+++ b/y2019/control_loops/drivetrain/target_selector_test.cc
@@ -5,9 +5,7 @@
 #include "aos/events/simulated_event_loop.h"
 #include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace testing {
+namespace y2019::control_loops::testing {
 
 typedef ::frc971::control_loops::TypedPose<double> Pose;
 typedef ::Eigen::Matrix<double, 5, 1> State;
@@ -190,6 +188,4 @@
                    true, CargoNearLeft(),
                    /*expected_radius=*/0.0}));
 
-}  // namespace testing
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::testing