Nest some more namespaces

Did someone previously suggest that all namespace had been
nested?  Silly.

Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: I22278c1caaeba8b47dc46fb2ed3078c20a11e190
diff --git a/aos/actions/actions.h b/aos/actions/actions.h
index 1b5d607..f60f20b 100644
--- a/aos/actions/actions.h
+++ b/aos/actions/actions.h
@@ -14,9 +14,7 @@
 #include "aos/json_to_flatbuffer.h"
 #include "aos/logging/logging.h"
 
-namespace aos {
-namespace common {
-namespace actions {
+namespace aos::common::actions {
 
 class Action;
 
@@ -407,8 +405,6 @@
   }
 }
 
-}  // namespace actions
-}  // namespace common
-}  // namespace aos
+}  // namespace aos::common::actions
 
 #endif  // AOS_ACTIONS_ACTIONS_H_
diff --git a/aos/actions/actor.h b/aos/actions/actor.h
index c27f7dd..1c8806b 100644
--- a/aos/actions/actor.h
+++ b/aos/actions/actor.h
@@ -12,9 +12,7 @@
 #include "aos/util/phased_loop.h"
 #include "frc971/control_loops/control_loop.h"
 
-namespace aos {
-namespace common {
-namespace actions {
+namespace aos::common::actions {
 
 template <class T>
 class ActorBase {
@@ -229,8 +227,6 @@
   return ans;
 }
 
-}  // namespace actions
-}  // namespace common
-}  // namespace aos
+}  // namespace aos::common::actions
 
 #endif  // AOS_ACTIONS_ACTOR_H_
diff --git a/aos/events/epoll.h b/aos/events/epoll.h
index 2b7eb76..526c6a7 100644
--- a/aos/events/epoll.h
+++ b/aos/events/epoll.h
@@ -12,8 +12,7 @@
 
 #include "aos/time/time.h"
 
-namespace aos {
-namespace internal {
+namespace aos::internal {
 
 // Class wrapping up timerfd.
 class TimerFd {
@@ -187,7 +186,6 @@
   std::vector<std::function<void()>> before_epoll_wait_functions_;
 };
 
-}  // namespace internal
-}  // namespace aos
+}  // namespace aos::internal
 
 #endif  // AOS_EVENTS_EPOLL_H_
diff --git a/aos/events/event_loop_param_test.h b/aos/events/event_loop_param_test.h
index d466a1e..f2b16c5 100644
--- a/aos/events/event_loop_param_test.h
+++ b/aos/events/event_loop_param_test.h
@@ -18,8 +18,7 @@
 #include "aos/network/message_bridge_server_schema.h"
 #include "aos/network/timestamp_schema.h"
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 class EventLoopTestFactory {
  public:
@@ -398,7 +397,6 @@
 // Sends a test message with value 0 with the given sender
 RawSender::Error SendTestMessage(aos::Sender<TestMessage> &sender);
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // _AOS_EVENTS_EVENT_LOOP_PARAM_TEST_H_
diff --git a/aos/events/logging/log_namer.h b/aos/events/logging/log_namer.h
index 5374acf..e0660eb 100644
--- a/aos/events/logging/log_namer.h
+++ b/aos/events/logging/log_namer.h
@@ -15,8 +15,7 @@
 #include "aos/events/logging/logger_generated.h"
 #include "aos/uuid.h"
 
-namespace aos {
-namespace logger {
+namespace aos::logger {
 
 class LogNamer;
 
@@ -650,7 +649,6 @@
   void OpenNodeWriter(const Node *source_node, NewDataWriter *data_writer);
 };
 
-}  // namespace logger
-}  // namespace aos
+}  // namespace aos::logger
 
 #endif  // AOS_EVENTS_LOGGING_LOG_NAMER_H_
diff --git a/aos/events/logging/log_reader.h b/aos/events/logging/log_reader.h
index 901bf32..fb19e78 100644
--- a/aos/events/logging/log_reader.h
+++ b/aos/events/logging/log_reader.h
@@ -32,8 +32,7 @@
 #include "aos/util/threaded_queue.h"
 #include "aos/uuid.h"
 
-namespace aos {
-namespace logger {
+namespace aos::logger {
 
 class EventNotifier;
 
@@ -950,7 +949,6 @@
   ConfigRemapper config_remapper_;
 };
 
-}  // namespace logger
-}  // namespace aos
+}  // namespace aos::logger
 
 #endif  // AOS_EVENTS_LOGGING_LOG_READER_H_
diff --git a/aos/events/logging/log_writer.h b/aos/events/logging/log_writer.h
index ec02b7d..eb69d7e 100644
--- a/aos/events/logging/log_writer.h
+++ b/aos/events/logging/log_writer.h
@@ -17,8 +17,7 @@
 #include "aos/time/time.h"
 #include "aos/uuid.h"
 
-namespace aos {
-namespace logger {
+namespace aos::logger {
 
 // Packs the provided configuration into the separate config LogFileHeader
 // container.
@@ -377,7 +376,6 @@
   std::chrono::nanoseconds logging_delay_ = std::chrono::nanoseconds(0);
 };
 
-}  // namespace logger
-}  // namespace aos
+}  // namespace aos::logger
 
 #endif  // AOS_EVENTS_LOGGING_LOG_WRITER_H_
diff --git a/aos/events/logging/logfile_sorting.h b/aos/events/logging/logfile_sorting.h
index 825a210..4f2a2e2 100644
--- a/aos/events/logging/logfile_sorting.h
+++ b/aos/events/logging/logfile_sorting.h
@@ -15,8 +15,7 @@
 #include "aos/time/time.h"
 #include "aos/uuid.h"
 
-namespace aos {
-namespace logger {
+namespace aos::logger {
 
 struct Boots {
   // Maps the boot UUID to the boot count.  Since boot UUIDs are unique, we
@@ -309,7 +308,6 @@
   std::vector<std::string> logger_nodes_;
 };
 
-}  // namespace logger
-}  // namespace aos
+}  // namespace aos::logger
 
 #endif  // AOS_EVENTS_LOGGING_LOGFILE_SORTING_H_
diff --git a/aos/events/logging/multinode_logger_test_lib.h b/aos/events/logging/multinode_logger_test_lib.h
index f5fb4cf..63604d6 100644
--- a/aos/events/logging/multinode_logger_test_lib.h
+++ b/aos/events/logging/multinode_logger_test_lib.h
@@ -17,9 +17,7 @@
 #include "aos/events/logging/lzma_encoder.h"
 #endif
 
-namespace aos {
-namespace logger {
-namespace testing {
+namespace aos::logger::testing {
 
 struct CompressionParams {
   std::string_view extension;
@@ -196,8 +194,6 @@
 
 typedef MultinodeLoggerTest MultinodeLoggerDeathTest;
 
-}  // namespace testing
-}  // namespace logger
-}  // namespace aos
+}  // namespace aos::logger::testing
 
 #endif  //  AOS_EVENTS_LOGGING_MULTINODE_LOGGER_TEST_LIB_H
diff --git a/aos/events/logging/replay_channels.h b/aos/events/logging/replay_channels.h
index f9ec144..0922acc 100644
--- a/aos/events/logging/replay_channels.h
+++ b/aos/events/logging/replay_channels.h
@@ -4,12 +4,10 @@
 #include <string>
 #include <vector>
 
-namespace aos {
-namespace logger {
+namespace aos::logger {
 // Vector of pair of name and type of the channel
 using ReplayChannels = std::vector<std::pair<std::string, std::string>>;
 // Vector of channel indices
 using ReplayChannelIndices = std::vector<size_t>;
-}  // namespace logger
-}  // namespace aos
+}  // namespace aos::logger
 #endif  // AOS_EVENTS_LOGGING_REPLAY_CHANNELS_H_
diff --git a/aos/events/message_counter.h b/aos/events/message_counter.h
index 418c1eb..13d75c5 100644
--- a/aos/events/message_counter.h
+++ b/aos/events/message_counter.h
@@ -3,8 +3,7 @@
 
 #include "aos/events/event_loop.h"
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 // Simple class to count messages on a channel easily.  This only counts
 // messages published while running.
@@ -22,7 +21,6 @@
   size_t count_ = 0;
 };
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // AOS_EVENTS_MESSAGE_COUNTER_H_
diff --git a/aos/events/simulated_network_bridge.h b/aos/events/simulated_network_bridge.h
index faa6398..14a7321 100644
--- a/aos/events/simulated_network_bridge.h
+++ b/aos/events/simulated_network_bridge.h
@@ -8,8 +8,7 @@
 #include "aos/network/remote_message_generated.h"
 #include "aos/network/timestamp_channel.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 class RawMessageDelayer;
 
@@ -235,7 +234,6 @@
   std::vector<std::unique_ptr<DelayersVector>> delayers_list_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_EVENTS_SIMULATED_NETWORK_BRIDGE_H_
diff --git a/aos/events/timing_statistics.h b/aos/events/timing_statistics.h
index 3c8c741..ef07254 100644
--- a/aos/events/timing_statistics.h
+++ b/aos/events/timing_statistics.h
@@ -6,8 +6,7 @@
 #include "aos/events/event_loop_generated.h"
 #include "aos/util/error_counter.h"
 
-namespace aos {
-namespace internal {
+namespace aos::internal {
 
 // Class to compute statistics for the timing report.
 class TimingStatistic {
@@ -113,7 +112,6 @@
   timing::Timer *timer = nullptr;
 };
 
-}  // namespace internal
-}  // namespace aos
+}  // namespace aos::internal
 
 #endif  // AOS_EVENTS_TIMING_STATISTICS_H_
diff --git a/aos/ipc_lib/index.h b/aos/ipc_lib/index.h
index 434da7c..75f1e9b 100644
--- a/aos/ipc_lib/index.h
+++ b/aos/ipc_lib/index.h
@@ -23,8 +23,7 @@
 #endif
 #endif
 
-namespace aos {
-namespace ipc_lib {
+namespace aos::ipc_lib {
 
 struct AtomicQueueIndex;
 class AtomicIndex;
@@ -305,7 +304,6 @@
   ::std::atomic<Index::IndexType> index_;
 };
 
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib
 
 #endif  // AOS_IPC_LIB_INDEX_H_
diff --git a/aos/ipc_lib/lockless_queue.h b/aos/ipc_lib/lockless_queue.h
index 14a11b6..4f867b9 100644
--- a/aos/ipc_lib/lockless_queue.h
+++ b/aos/ipc_lib/lockless_queue.h
@@ -18,8 +18,7 @@
 #include "aos/time/time.h"
 #include "aos/uuid.h"
 
-namespace aos {
-namespace ipc_lib {
+namespace aos::ipc_lib {
 
 // Structure to hold the state required to wake a watcher.
 struct Watcher {
@@ -478,7 +477,6 @@
 // Prints to stdout the data inside the queue for debugging.
 void PrintLocklessQueueMemory(const LocklessQueueMemory *memory);
 
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib
 
 #endif  // AOS_IPC_LIB_LOCKLESS_QUEUE_H_
diff --git a/aos/ipc_lib/lockless_queue_memory.h b/aos/ipc_lib/lockless_queue_memory.h
index 713d9cd..70fc8a8 100644
--- a/aos/ipc_lib/lockless_queue_memory.h
+++ b/aos/ipc_lib/lockless_queue_memory.h
@@ -10,8 +10,7 @@
 #include "aos/ipc_lib/lockless_queue.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace ipc_lib {
+namespace aos::ipc_lib {
 
 struct LocklessQueueMemory {
   // This is held during initialization. Cleanup after dead processes happens
@@ -194,7 +193,6 @@
   }
 };
 
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib
 
 #endif  // AOS_IPC_LIB_LOCKLESS_QUEUE_MEMORY_H_
diff --git a/aos/ipc_lib/lockless_queue_stepping.cc b/aos/ipc_lib/lockless_queue_stepping.cc
index e819795..40d1631 100644
--- a/aos/ipc_lib/lockless_queue_stepping.cc
+++ b/aos/ipc_lib/lockless_queue_stepping.cc
@@ -25,9 +25,7 @@
 
 #ifdef SUPPORTS_SHM_ROBUSTNESS_TEST
 
-namespace aos {
-namespace ipc_lib {
-namespace testing {
+namespace aos::ipc_lib::testing {
 
 namespace {
 pid_t gettid() { return syscall(SYS_gettid); }
@@ -458,8 +456,6 @@
 
 pid_t SharedTid::Get() { return *tid_; }
 
-}  // namespace testing
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib::testing
 
 #endif  // SUPPORTS_SHM_ROBSTNESS_TEST
diff --git a/aos/ipc_lib/lockless_queue_stepping.h b/aos/ipc_lib/lockless_queue_stepping.h
index 7aab193..590534f 100644
--- a/aos/ipc_lib/lockless_queue_stepping.h
+++ b/aos/ipc_lib/lockless_queue_stepping.h
@@ -7,9 +7,7 @@
 #include "aos/ipc_lib/lockless_queue.h"
 #include "aos/ipc_lib/lockless_queue_memory.h"
 
-namespace aos {
-namespace ipc_lib {
-namespace testing {
+namespace aos::ipc_lib::testing {
 
 #if defined(__ARM_EABI__)
 // There are various reasons why we might not actually be able to do this
@@ -142,8 +140,6 @@
 
 #endif
 
-}  // namespace testing
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib::testing
 
 #endif  // AOS_IPC_LIB_LOCKLESS_QUEUE_STEPPING_H_
diff --git a/aos/ipc_lib/memory_mapped_queue.h b/aos/ipc_lib/memory_mapped_queue.h
index 653dc77..bd766c1 100644
--- a/aos/ipc_lib/memory_mapped_queue.h
+++ b/aos/ipc_lib/memory_mapped_queue.h
@@ -6,8 +6,7 @@
 #include "aos/configuration.h"
 #include "aos/ipc_lib/lockless_queue.h"
 
-namespace aos {
-namespace ipc_lib {
+namespace aos::ipc_lib {
 
 std::string ShmFolder(std::string_view shm_base, const Channel *channel);
 
@@ -58,7 +57,6 @@
   const void *const_data_;
 };
 
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib
 
 #endif  //  AOS_IPC_LIB_MEMORY_MAPPED_QUEUE_H_
diff --git a/aos/ipc_lib/queue_racer.h b/aos/ipc_lib/queue_racer.h
index f0a2684..2cbe3ed 100644
--- a/aos/ipc_lib/queue_racer.h
+++ b/aos/ipc_lib/queue_racer.h
@@ -5,8 +5,7 @@
 
 #include "aos/ipc_lib/lockless_queue.h"
 
-namespace aos {
-namespace ipc_lib {
+namespace aos::ipc_lib {
 
 struct ThreadState;
 
@@ -97,7 +96,6 @@
                         size_t) { return true; };
 };
 
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib
 
 #endif  // AOS_IPC_LIB_QUEUE_RACER_H_
diff --git a/aos/ipc_lib/signalfd.h b/aos/ipc_lib/signalfd.h
index a6991de..014ad5c 100644
--- a/aos/ipc_lib/signalfd.h
+++ b/aos/ipc_lib/signalfd.h
@@ -6,8 +6,7 @@
 
 #include <initializer_list>
 
-namespace aos {
-namespace ipc_lib {
+namespace aos::ipc_lib {
 
 // Class to manage a signalfd.
 class SignalFd {
@@ -34,7 +33,6 @@
   sigset_t blocked_mask_;
 };
 
-}  // namespace ipc_lib
-}  // namespace aos
+}  // namespace aos::ipc_lib
 
 #endif  // AOS_IPC_LIB_SIGNALFD_H_
diff --git a/aos/libc/dirname.h b/aos/libc/dirname.h
index fa733d7..c549b3c 100644
--- a/aos/libc/dirname.h
+++ b/aos/libc/dirname.h
@@ -3,13 +3,11 @@
 
 #include <string>
 
-namespace aos {
-namespace libc {
+namespace aos::libc {
 
 // Thread-safe version of dirname(3).
 ::std::string Dirname(const ::std::string &path);
 
-}  // namespace libc
-}  // namespace aos
+}  // namespace aos::libc
 
 #endif  // AOS_LIBC_DIRNAME_H_
diff --git a/aos/logging/dynamic_logging.h b/aos/logging/dynamic_logging.h
index 0dfd181..e3d3a6f 100644
--- a/aos/logging/dynamic_logging.h
+++ b/aos/logging/dynamic_logging.h
@@ -9,8 +9,7 @@
 // and make changes to the log level of the current application based on that
 // message. Currently the only supported command is changing the global vlog
 // level.
-namespace aos {
-namespace logging {
+namespace aos::logging {
 
 class DynamicLogging {
  public:
@@ -23,5 +22,4 @@
   DISALLOW_COPY_AND_ASSIGN(DynamicLogging);
 };
 
-}  // namespace logging
-}  // namespace aos
+}  // namespace aos::logging
diff --git a/aos/logging/log_namer.h b/aos/logging/log_namer.h
index a993d31..0c32d5d 100644
--- a/aos/logging/log_namer.h
+++ b/aos/logging/log_namer.h
@@ -4,8 +4,7 @@
 #include <optional>
 #include <string>
 
-namespace aos {
-namespace logging {
+namespace aos::logging {
 // Returns the correct filename to log to, blocking until the usb drive
 // filesystem mounts, incrementing the number on the end of the filename, and
 // setting up a symlink at basename-current.
@@ -19,7 +18,6 @@
 // the usb drive.
 std::optional<std::string> MaybeGetLogName(const char *basename);
 
-}  // namespace logging
-}  // namespace aos
+}  // namespace aos::logging
 
 #endif  // AOS_LOGGING_LOG_NAMER_H_
diff --git a/aos/network/message_bridge_client_lib.h b/aos/network/message_bridge_client_lib.h
index 2df3599..56d2563 100644
--- a/aos/network/message_bridge_client_lib.h
+++ b/aos/network/message_bridge_client_lib.h
@@ -14,8 +14,7 @@
 #include "aos/network/sctp_config_request_generated.h"
 #include "aos/network/sctp_lib.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // Structure to hold per channel state.
 struct SctpClientChannelState {
@@ -165,7 +164,6 @@
   aos::Sender<SctpConfigRequest> sctp_config_request_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_MESSAGE_BRIDGE_CLIENT_LIB_H_
diff --git a/aos/network/message_bridge_client_status.h b/aos/network/message_bridge_client_status.h
index 033af95..4e6c2c5 100644
--- a/aos/network/message_bridge_client_status.h
+++ b/aos/network/message_bridge_client_status.h
@@ -8,8 +8,7 @@
 #include "aos/network/message_bridge_client_generated.h"
 #include "aos/network/timestamp_filter.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // This class is responsible for publishing the (filtered) client side
 // statistics periodically.
@@ -88,7 +87,6 @@
   bool send_ = true;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_MESSAGE_BRIDGE_CLIENT_STATUS_H_
diff --git a/aos/network/message_bridge_protocol.h b/aos/network/message_bridge_protocol.h
index 23a6e0f..0783466 100644
--- a/aos/network/message_bridge_protocol.h
+++ b/aos/network/message_bridge_protocol.h
@@ -7,8 +7,7 @@
 #include "aos/network/connect_generated.h"
 #include "aos/uuid.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // The protocol between the message_bridge_client and server is pretty simple.
 // The overarching design philosophy is that the server sends data to the
@@ -41,7 +40,6 @@
     std::string_view remote_name, const UUID &boot_uuid,
     std::string_view config_sha256);
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_MESSAGE_BRIDGE_PROTOCOL_H_
diff --git a/aos/network/message_bridge_server_lib.h b/aos/network/message_bridge_server_lib.h
index b8377c6..b47a4e6 100644
--- a/aos/network/message_bridge_server_lib.h
+++ b/aos/network/message_bridge_server_lib.h
@@ -20,8 +20,7 @@
 #include "aos/network/timestamp_channel.h"
 #include "aos/network/timestamp_generated.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // See message_bridge_protocol.h for more details about the protocol.
 
@@ -237,7 +236,6 @@
   aos::Sender<SctpConfigRequest> sctp_config_request_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_MESSAGE_BRIDGE_SERVER_LIB_H_
diff --git a/aos/network/message_bridge_server_status.h b/aos/network/message_bridge_server_status.h
index 3945d57..8bdf4a8 100644
--- a/aos/network/message_bridge_server_status.h
+++ b/aos/network/message_bridge_server_status.h
@@ -13,8 +13,7 @@
 #include "aos/network/timestamp_generated.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // This class encapsulates the server side of sending server statistics and
 // managing timestamp offsets.
@@ -158,7 +157,6 @@
   std::vector<flatbuffers::Offset<ClientOffset>> client_offsets_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_MESSAGE_BRIDGE_SERVER_STATUS_H_
diff --git a/aos/network/multinode_timestamp_filter.h b/aos/network/multinode_timestamp_filter.h
index 828c489..893f816 100644
--- a/aos/network/multinode_timestamp_filter.h
+++ b/aos/network/multinode_timestamp_filter.h
@@ -16,8 +16,7 @@
 #include "aos/network/timestamp_filter.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // Problem description for NewtonSolver.
 class Problem {
@@ -667,7 +666,6 @@
   std::vector<size_t> source_node_index_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_MULTINODE_TIMESTAMP_FILTER_H_
diff --git a/aos/network/rawrtc.h b/aos/network/rawrtc.h
index 7908124..57153f0 100644
--- a/aos/network/rawrtc.h
+++ b/aos/network/rawrtc.h
@@ -13,8 +13,7 @@
 #include "flatbuffers/flatbuffers.h"
 #include "glog/logging.h"
 
-namespace aos {
-namespace web_proxy {
+namespace aos::web_proxy {
 
 // TODO(austin): This doesn't allow streaming data in.
 #define CHECK_RAWRTC(x)                                                     \
@@ -215,7 +214,6 @@
   std::function<void(std::shared_ptr<ScopedDataChannel>)> on_data_channel_;
 };
 
-}  // namespace web_proxy
-}  // namespace aos
+}  // namespace aos::web_proxy
 
 #endif  // AOS_NETWORK_RAWRTC_H_
diff --git a/aos/network/sctp_client.h b/aos/network/sctp_client.h
index 9b9265e..952d0e9 100644
--- a/aos/network/sctp_client.h
+++ b/aos/network/sctp_client.h
@@ -11,8 +11,7 @@
 #include "aos/network/sctp_lib.h"
 #include "aos/unique_malloc_ptr.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // Class to encapsulate everything needed to be a SCTP client.
 class SctpClient {
@@ -73,7 +72,6 @@
   sctp_assoc_t sac_assoc_id_ = 0;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  //  AOS_NETWORK_SCTP_CLIENT_H_
diff --git a/aos/network/sctp_lib.h b/aos/network/sctp_lib.h
index 0d021a9..3430be8 100644
--- a/aos/network/sctp_lib.h
+++ b/aos/network/sctp_lib.h
@@ -19,8 +19,7 @@
 
 #define HAS_SCTP_AUTH LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 constexpr bool HasSctpAuth() { return HAS_SCTP_AUTH; }
 
@@ -202,7 +201,6 @@
 // Returns the max network buffer available for writing for a socket.
 size_t ReadWMemMax();
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_SCTP_LIB_H_
diff --git a/aos/network/sctp_server.h b/aos/network/sctp_server.h
index e641fd8..996645e 100644
--- a/aos/network/sctp_server.h
+++ b/aos/network/sctp_server.h
@@ -19,8 +19,7 @@
 #include "aos/network/sctp_lib.h"
 #include "aos/unique_malloc_ptr.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 class SctpServer {
  public:
@@ -74,7 +73,6 @@
   SctpReadWrite sctp_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_SCTP_SERVER_H_
diff --git a/aos/network/testing_time_converter.h b/aos/network/testing_time_converter.h
index ae85cee..768d0a2 100644
--- a/aos/network/testing_time_converter.h
+++ b/aos/network/testing_time_converter.h
@@ -10,8 +10,7 @@
 #include "aos/network/multinode_timestamp_filter.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // Simple class to which uses InterpolatedTimeConverter to produce an
 // interpolated timeline.  Should only be used for testing.
@@ -77,7 +76,6 @@
   std::map<std::pair<size_t, size_t>, UUID> boot_uuids_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_TESTING_TIME_CONVERTER_H_
diff --git a/aos/network/timestamp_channel.h b/aos/network/timestamp_channel.h
index c8e88d9..7e48a00 100644
--- a/aos/network/timestamp_channel.h
+++ b/aos/network/timestamp_channel.h
@@ -11,8 +11,7 @@
 #include "aos/events/event_loop.h"
 #include "aos/network/remote_message_generated.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // Class to find the corresponding channel where timestamps for a specified data
 // channel and connection will be logged.
@@ -89,7 +88,6 @@
       timestamp_loggers_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_NETWORK_TIMESTAMP_CHANNEL_
diff --git a/aos/network/timestamp_filter.h b/aos/network/timestamp_filter.h
index b1aff86..be9318e 100644
--- a/aos/network/timestamp_filter.h
+++ b/aos/network/timestamp_filter.h
@@ -14,8 +14,7 @@
 #include "aos/events/logging/boot_timestamp.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace message_bridge {
+namespace aos::message_bridge {
 
 // Max velocity to clamp the filter to in seconds/second.
 typedef std::ratio<1, 1000> MaxVelocityRatio;
@@ -951,7 +950,6 @@
   const Node *node_b_;
 };
 
-}  // namespace message_bridge
-}  // namespace aos
+}  // namespace aos::message_bridge
 
 #endif  // AOS_EVENTS_LOGGING_TIMESTAMP_FILTER_H_
diff --git a/aos/network/web_proxy.h b/aos/network/web_proxy.h
index db7fb5b..dec3078 100644
--- a/aos/network/web_proxy.h
+++ b/aos/network/web_proxy.h
@@ -19,8 +19,7 @@
 #include "seasocks/StringUtil.h"
 #include "seasocks/WebSocket.h"
 
-namespace aos {
-namespace web_proxy {
+namespace aos::web_proxy {
 
 class Connection;
 class Subscriber;
@@ -242,7 +241,6 @@
   std::shared_ptr<ScopedDataChannel> channel_;
 };
 
-}  // namespace web_proxy
-}  // namespace aos
+}  // namespace aos::web_proxy
 
 #endif  // AOS_NETWORK_WEB_PROXY_H_
diff --git a/aos/network/web_proxy_utils.h b/aos/network/web_proxy_utils.h
index c5e2716..e35708a 100644
--- a/aos/network/web_proxy_utils.h
+++ b/aos/network/web_proxy_utils.h
@@ -4,8 +4,7 @@
 #include "aos/flatbuffers.h"
 #include "aos/network/web_proxy_generated.h"
 
-namespace aos {
-namespace web_proxy {
+namespace aos::web_proxy {
 
 int GetPacketCount(const Context &context);
 
@@ -24,5 +23,4 @@
 std::vector<FlatbufferDetachedBuffer<MessageHeader>> PackBuffer(
     absl::Span<const uint8_t> span);
 
-}  // namespace web_proxy
-}  // namespace aos
+}  // namespace aos::web_proxy
diff --git a/aos/seasocks/seasocks_logger.h b/aos/seasocks/seasocks_logger.h
index 64f13fa..f60ab48 100644
--- a/aos/seasocks/seasocks_logger.h
+++ b/aos/seasocks/seasocks_logger.h
@@ -3,8 +3,7 @@
 
 #include "seasocks/PrintfLogger.h"
 
-namespace aos {
-namespace seasocks {
+namespace aos::seasocks {
 
 class SeasocksLogger : public ::seasocks::PrintfLogger {
  public:
@@ -13,7 +12,6 @@
   void log(::seasocks::Logger::Level level, const char *message) override;
 };
 
-}  // namespace seasocks
-}  // namespace aos
+}  // namespace aos::seasocks
 
 #endif  // AOS_SEASOCKS_SEASOCKS_LOGGER_H_
diff --git a/aos/starter/mock_starter.h b/aos/starter/mock_starter.h
index a0c1b76..212f1e5 100644
--- a/aos/starter/mock_starter.h
+++ b/aos/starter/mock_starter.h
@@ -6,8 +6,7 @@
 #include "aos/starter/starter_rpc_generated.h"
 #include "aos/starter/starterd_lib.h"
 
-namespace aos {
-namespace starter {
+namespace aos::starter {
 
 // Simple mock of starterd that updates the starter status message to act as
 // though applications are started and stopped when requested.
@@ -50,5 +49,4 @@
   std::vector<std::unique_ptr<MockStarter>> mock_starters_;
 };
 
-}  // namespace starter
-}  // namespace aos
+}  // namespace aos::starter
diff --git a/aos/starter/starter_rpc_lib.h b/aos/starter/starter_rpc_lib.h
index eadf5c6..ae2450c 100644
--- a/aos/starter/starter_rpc_lib.h
+++ b/aos/starter/starter_rpc_lib.h
@@ -11,8 +11,7 @@
 #include "aos/starter/starter_generated.h"
 #include "aos/starter/starter_rpc_generated.h"
 
-namespace aos {
-namespace starter {
+namespace aos::starter {
 
 // Data required to command that starter start/stop/restart a given application.
 struct ApplicationCommand {
@@ -119,7 +118,6 @@
                         const aos::FlatbufferVector<aos::starter::Status>>>
 GetStarterStatus(const aos::Configuration *config, const aos::Node *node);
 
-}  // namespace starter
-}  // namespace aos
+}  // namespace aos::starter
 
 #endif  // AOS_STARTER_STARTER_RPC_LIB_H_
diff --git a/aos/starter/starterd_lib.h b/aos/starter/starterd_lib.h
index 92b20fa..3779c84 100644
--- a/aos/starter/starterd_lib.h
+++ b/aos/starter/starterd_lib.h
@@ -19,8 +19,7 @@
 #include "aos/starter/subprocess.h"
 #include "aos/util/top.h"
 
-namespace aos {
-namespace starter {
+namespace aos::starter {
 
 const aos::Channel *StatusChannelForNode(const aos::Configuration *config,
                                          const aos::Node *node);
@@ -107,7 +106,6 @@
   DISALLOW_COPY_AND_ASSIGN(Starter);
 };
 
-}  // namespace starter
-}  // namespace aos
+}  // namespace aos::starter
 
 #endif  // AOS_STARTER_STARTERD_LIB_H_
diff --git a/aos/testing/flatbuffer_eq.h b/aos/testing/flatbuffer_eq.h
index b560aaa..8a42b5f 100644
--- a/aos/testing/flatbuffer_eq.h
+++ b/aos/testing/flatbuffer_eq.h
@@ -7,8 +7,7 @@
 #include "aos/flatbuffers.h"
 #include "aos/json_to_flatbuffer.h"
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 // Use FlatbufferUnwrapped to instantiate this.
 template <typename T>
@@ -85,7 +84,6 @@
       new FlatbufferEqMatcher(aos::FlatbufferVector<T>(expected))));
 }
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // AOS_TESTING_FLATBUFFER_EQ_H_
diff --git a/aos/testing/path.h b/aos/testing/path.h
index 7f4187d..ebe63fe 100644
--- a/aos/testing/path.h
+++ b/aos/testing/path.h
@@ -4,13 +4,11 @@
 #include <string>
 #include <string_view>
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 // Returns the path to the provided artifact which works
 std::string ArtifactPath(std::string_view path);
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // AOS_TESTING_PATH_H_
diff --git a/aos/testing/test_logging.h b/aos/testing/test_logging.h
index 5e01879..3671aa1 100644
--- a/aos/testing/test_logging.h
+++ b/aos/testing/test_logging.h
@@ -3,8 +3,7 @@
 
 #include "aos/time/time.h"
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 // Enables the logging framework for use during a gtest test.
 // It will print out all WARNING and above messages all of the time. It will
@@ -23,7 +22,6 @@
 // we want to use graphing tools to verify what's happening.
 void ForcePrintLogsDuringTests();
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // AOS_TESTING_TEST_LOGGING_H_
diff --git a/aos/testing/test_shm.h b/aos/testing/test_shm.h
index a1c79ee..658a72d 100644
--- a/aos/testing/test_shm.h
+++ b/aos/testing/test_shm.h
@@ -3,8 +3,7 @@
 
 #include "aos/ipc_lib/shared_mem.h"
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 // Manages creating and cleaning up "shared memory" which works within this
 // process and any that it fork(2)s.
@@ -18,7 +17,6 @@
   struct aos_core global_core_data_;
 };
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // AOS_TESTING_TEST_SHM_H_
diff --git a/aos/testing/tmpdir.h b/aos/testing/tmpdir.h
index 8eabf86..bf8e7d7 100644
--- a/aos/testing/tmpdir.h
+++ b/aos/testing/tmpdir.h
@@ -3,8 +3,7 @@
 
 #include <string>
 
-namespace aos {
-namespace testing {
+namespace aos::testing {
 
 // Returns a usable temporary directory.
 std::string TestTmpDir();
@@ -13,7 +12,6 @@
 // otherwise.
 void SetTestShmBase();
 
-}  // namespace testing
-}  // namespace aos
+}  // namespace aos::testing
 
 #endif  // AOS_TESTING_TMPDIR_H_
diff --git a/aos/time/time.h b/aos/time/time.h
index cd4ecda..1a5cbd1 100644
--- a/aos/time/time.h
+++ b/aos/time/time.h
@@ -118,15 +118,13 @@
 
 #ifdef __linux__
 
-namespace std {
-namespace this_thread {
+namespace std::this_thread {
 // Template specialization for monotonic_clock, since we can use clock_nanosleep
 // with TIMER_ABSTIME and get very precise absolute time sleeps.
 template <>
 void sleep_until(const ::aos::monotonic_clock::time_point &end_time);
 
-}  // namespace this_thread
-}  // namespace std
+}  // namespace std::this_thread
 
 #endif  // __linux__
 
diff --git a/aos/util/death_test_log_implementation.h b/aos/util/death_test_log_implementation.h
index 7765b5b..e35f365 100644
--- a/aos/util/death_test_log_implementation.h
+++ b/aos/util/death_test_log_implementation.h
@@ -6,8 +6,7 @@
 #include "aos/logging/context.h"
 #include "aos/logging/implementations.h"
 
-namespace aos {
-namespace util {
+namespace aos::util {
 
 // Prints all FATAL messages to stderr and then abort(3)s before the regular
 // stuff can print out anything else. Ignores all other messages.
@@ -27,7 +26,6 @@
   }
 };
 
-}  // namespace util
-}  // namespace aos
+}  // namespace aos::util
 
 #endif  // AOS_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
diff --git a/aos/util/file.h b/aos/util/file.h
index e825e4c..e0d5c6b 100644
--- a/aos/util/file.h
+++ b/aos/util/file.h
@@ -17,8 +17,7 @@
 
 #include "aos/scoped/scoped_fd.h"
 
-namespace aos {
-namespace util {
+namespace aos::util {
 
 // Returns the complete contents of filename. LOG(FATAL)s if any errors are
 // encountered.
@@ -122,7 +121,6 @@
   aos::ScopedFD file_;
 };
 
-}  // namespace util
-}  // namespace aos
+}  // namespace aos::util
 
 #endif  // AOS_UTIL_FILE_H_
diff --git a/aos/util/log_interval.h b/aos/util/log_interval.h
index d346852..08d06bb 100644
--- a/aos/util/log_interval.h
+++ b/aos/util/log_interval.h
@@ -6,8 +6,7 @@
 #include "aos/logging/logging.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace util {
+namespace aos::util {
 
 // A class to help with logging things that happen a lot only occasionally.
 //
@@ -91,7 +90,6 @@
   const char *context_ = NULL;
 };
 
-}  // namespace util
-}  // namespace aos
+}  // namespace aos::util
 
 #endif  // AOS_UTIL_LOG_INTERVAL_H_
diff --git a/aos/util/math.h b/aos/util/math.h
index 5efc3c9..5a3df11 100644
--- a/aos/util/math.h
+++ b/aos/util/math.h
@@ -5,8 +5,7 @@
 
 #include "Eigen/Dense"
 
-namespace aos {
-namespace math {
+namespace aos::math {
 
 // Normalizes an angle to be in (-M_PI, M_PI]
 template <typename Scalar>
@@ -64,7 +63,6 @@
   return (C.y() - A.y()) * (B.x() - A.x()) > (B.y() - A.y()) * (C.x() - A.x());
 }
 
-}  // namespace math
-}  // namespace aos
+}  // namespace aos::math
 
 #endif  // AOS_UTIL_MATH_H_
diff --git a/aos/util/phased_loop.h b/aos/util/phased_loop.h
index 64a3302..dc2dc96 100644
--- a/aos/util/phased_loop.h
+++ b/aos/util/phased_loop.h
@@ -5,8 +5,7 @@
 
 #include "aos/time/time.h"
 
-namespace aos {
-namespace time {
+namespace aos::time {
 
 // Handles sleeping until a fixed offset from some time interval.
 class PhasedLoop {
@@ -88,7 +87,6 @@
   monotonic_clock::time_point last_time_ = monotonic_clock::epoch();
 };
 
-}  // namespace time
-}  // namespace aos
+}  // namespace aos::time
 
 #endif  // AOS_UTIL_PHASED_LOOP_H_
diff --git a/aos/util/threaded_consumer.h b/aos/util/threaded_consumer.h
index 95ec79a..3bf4f36 100644
--- a/aos/util/threaded_consumer.h
+++ b/aos/util/threaded_consumer.h
@@ -10,8 +10,7 @@
 #include "aos/mutex/mutex.h"
 #include "aos/realtime.h"
 
-namespace aos {
-namespace util {
+namespace aos::util {
 
 // This class implements a threadpool of a single worker that accepts work
 // from the main thread through a queue and executes it at a different realtime
@@ -96,7 +95,6 @@
   std::thread worker_thread_;
 };
 
-}  // namespace util
-}  // namespace aos
+}  // namespace aos::util
 
 #endif  // AOS_UTIL_THREADWORKER_H_
diff --git a/aos/util/trapezoid_profile.h b/aos/util/trapezoid_profile.h
index 944c423..6669777 100644
--- a/aos/util/trapezoid_profile.h
+++ b/aos/util/trapezoid_profile.h
@@ -6,8 +6,7 @@
 #include "aos/macros.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace util {
+namespace aos::util {
 
 // Calculates a trapezoidal motion profile (like for a control loop's goals).
 // Supports having the end speed and position changed in the middle.
@@ -63,7 +62,6 @@
   DISALLOW_COPY_AND_ASSIGN(TrapezoidProfile);
 };
 
-}  // namespace util
-}  // namespace aos
+}  // namespace aos::util
 
 #endif  // AOS_UTIL_TRAPEZOID_PROFILE_H_
diff --git a/aos/util/wrapping_counter.h b/aos/util/wrapping_counter.h
index ea79ec6..0353e2e 100644
--- a/aos/util/wrapping_counter.h
+++ b/aos/util/wrapping_counter.h
@@ -3,8 +3,7 @@
 
 #include <cstdint>
 
-namespace aos {
-namespace util {
+namespace aos::util {
 
 // Deals correctly with 1-byte counters which wrap.
 // This is only possible if the counter never wraps twice between Update calls.
@@ -28,7 +27,6 @@
   uint8_t last_count_;
 };
 
-}  // namespace util
-}  // namespace aos
+}  // namespace aos::util
 
 #endif  // AOS_UTIL_WRAPPING_COUNTER_H_
diff --git a/aos/vision/blob/codec.h b/aos/vision/blob/codec.h
index b8a8089..5872b44 100644
--- a/aos/vision/blob/codec.h
+++ b/aos/vision/blob/codec.h
@@ -5,8 +5,7 @@
 
 #include "aos/vision/blob/range_image.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 template <typename T>
 struct IntCodec {
@@ -45,7 +44,6 @@
 // Parses a blob from data (Advancing data pointer by the size of the image).
 const char *ParseBlobList(BlobList *blob_list, const char *data);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_BLOB_CODEC_H_
diff --git a/aos/vision/blob/contour.h b/aos/vision/blob/contour.h
index bbd59a9..c192a75 100644
--- a/aos/vision/blob/contour.h
+++ b/aos/vision/blob/contour.h
@@ -4,8 +4,7 @@
 #include "aos/vision/blob/range_image.h"
 #include "aos/vision/blob/region_alloc.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Countour nodes are slingly linked list chains of pixels that go around
 // the boundary of a blob.
@@ -35,7 +34,6 @@
 ContourNode *RangeImgToContour(const RangeImage &rimg,
                                AnalysisAllocator *alloc);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  //  _AOS_VIISON_BLOB_CONTOUR_H_
diff --git a/aos/vision/blob/disjoint_set.h b/aos/vision/blob/disjoint_set.h
index 38cca1d..6343e9f 100644
--- a/aos/vision/blob/disjoint_set.h
+++ b/aos/vision/blob/disjoint_set.h
@@ -3,8 +3,7 @@
 
 #include <vector>
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Disjoint set algorithm, which is similar to what this class does:
 // https://en.wikipedia.org/wiki/Disjoint-set_data_structure
@@ -40,7 +39,6 @@
   std::vector<int> nodes_;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_BLOB_DISJOINT_SET_H_
diff --git a/aos/vision/blob/find_blob.h b/aos/vision/blob/find_blob.h
index d633354..f811749 100644
--- a/aos/vision/blob/find_blob.h
+++ b/aos/vision/blob/find_blob.h
@@ -3,14 +3,12 @@
 
 #include "aos/vision/blob/range_image.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Uses disjoint sets to group ranges into disjoint RangeImage.
 // ranges that overlap are grouped into the same output RangeImage.
 BlobList FindBlobs(const RangeImage &input_image);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_BLOB_FIND_BLOB_H_
diff --git a/aos/vision/blob/hierarchical_contour_merge.h b/aos/vision/blob/hierarchical_contour_merge.h
index 9dd471d..83243bd 100644
--- a/aos/vision/blob/hierarchical_contour_merge.h
+++ b/aos/vision/blob/hierarchical_contour_merge.h
@@ -6,8 +6,7 @@
 #include "aos/vision/blob/contour.h"
 #include "aos/vision/blob/range_image.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 struct FittedLine {
   Point st;
@@ -19,7 +18,6 @@
 void HierarchicalMerge(ContourNode *stval, std::vector<FittedLine> *fit_lines,
                        float merge_rate = 4.0, int min_len = 15);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_BLOB_HIERARCHICAL_CONTOUR_MERGE_H_
diff --git a/aos/vision/blob/move_scale.h b/aos/vision/blob/move_scale.h
index 061da5c..94a9e9d 100644
--- a/aos/vision/blob/move_scale.h
+++ b/aos/vision/blob/move_scale.h
@@ -7,8 +7,7 @@
 #include "aos/vision/blob/range_image.h"
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Sums img into bbox. bbox is constructed empty and grows with each call
 // to GetBBox.
@@ -22,7 +21,6 @@
 
 RangeImage MoveScale(const RangeImage &img, int dx, int dy, int scale);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_BLOB_MOVE_SCALE_H_
diff --git a/aos/vision/blob/range_image.h b/aos/vision/blob/range_image.h
index d962788..10e801f 100644
--- a/aos/vision/blob/range_image.h
+++ b/aos/vision/blob/range_image.h
@@ -5,8 +5,7 @@
 
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 struct Point {
   int x;
@@ -100,7 +99,6 @@
 // Debug print range image as ### for the ranges.
 void DebugPrint(const BlobList &blobl);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_BLOB_RANGE_IMAGE_H_
diff --git a/aos/vision/blob/region_alloc.h b/aos/vision/blob/region_alloc.h
index 3275f3e..101ee6a 100644
--- a/aos/vision/blob/region_alloc.h
+++ b/aos/vision/blob/region_alloc.h
@@ -9,8 +9,7 @@
 #include <utility>
 #include <vector>
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Region based allocator. Used for arena allocations in vision code.
 // Example use: Storing contour nodes.
@@ -52,7 +51,6 @@
   size_t used_size_ = 0;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_IMAGE_REGION_ALLOC_H_
diff --git a/aos/vision/blob/stream_view.h b/aos/vision/blob/stream_view.h
index 0db69e5..9841ca2 100644
--- a/aos/vision/blob/stream_view.h
+++ b/aos/vision/blob/stream_view.h
@@ -7,8 +7,7 @@
 #include "aos/vision/debug/debug_window.h"
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 class BlobStreamViewer : public DebugWindow {
  public:
@@ -85,7 +84,6 @@
   ImageValue image_;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_BLOB_STREAM_VIEW_H_
diff --git a/aos/vision/blob/test_utils.h b/aos/vision/blob/test_utils.h
index e0c706c..92c087c 100644
--- a/aos/vision/blob/test_utils.h
+++ b/aos/vision/blob/test_utils.h
@@ -3,8 +3,7 @@
 
 #include "aos/vision/blob/range_image.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // For tests. Loads a RangeImage from a constant string.
 //
@@ -18,7 +17,6 @@
 // )"
 RangeImage LoadFromTestData(int mini, const char *data);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_BLOB_TEST_UTILS_H_
diff --git a/aos/vision/blob/transpose.h b/aos/vision/blob/transpose.h
index 632f270..7ac6626 100644
--- a/aos/vision/blob/transpose.h
+++ b/aos/vision/blob/transpose.h
@@ -3,8 +3,7 @@
 
 #include "aos/vision/blob/range_image.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 RangeImage Transpose(const RangeImage &img);
 inline std::vector<RangeImage> Transpose(const std::vector<RangeImage> &imgs) {
@@ -14,7 +13,6 @@
   return out;
 }
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _y2017_VISION_ROT90_H_
diff --git a/aos/vision/debug/debug_framework.h b/aos/vision/debug/debug_framework.h
index c2913c2..b9fa166 100644
--- a/aos/vision/debug/debug_framework.h
+++ b/aos/vision/debug/debug_framework.h
@@ -7,8 +7,7 @@
 #include "aos/vision/image/camera_params.pb.h"
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 class BlobStreamViewer;
 
@@ -120,7 +119,6 @@
 void DebugFrameworkMain(int argc, char **argv, FilterHarness *filter,
                         CameraParams camera_params);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_DEBUG_DEBUG_FRAMEWORK_H_
diff --git a/aos/vision/debug/debug_window.h b/aos/vision/debug/debug_window.h
index 573cef5..dcbc5f7 100644
--- a/aos/vision/debug/debug_window.h
+++ b/aos/vision/debug/debug_window.h
@@ -8,8 +8,7 @@
 #include "aos/vision/debug/overlay.h"
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Implement Cairo version of RenderInterface.
 class CairoRender : public RenderInterface {
@@ -84,7 +83,6 @@
   std::unique_ptr<Internals> self;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_DEBUG_DEBUG_WINDOW_H_
diff --git a/aos/vision/debug/overlay.h b/aos/vision/debug/overlay.h
index a2cecd5..3beb9e1 100644
--- a/aos/vision/debug/overlay.h
+++ b/aos/vision/debug/overlay.h
@@ -8,8 +8,7 @@
 #include "aos/vision/math/segment.h"
 #include "aos/vision/math/vector.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Abstract away rendering to avoid compiling gtk for arm.
 // This should match a reduced cairo rendering api.
@@ -239,7 +238,6 @@
   std::vector<std::pair<Vector<2>, double>> circles_;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_IMAGE_DEBUG_OVERLAY_H_
diff --git a/aos/vision/events/epoll_events.h b/aos/vision/events/epoll_events.h
index 7562f41..e3eeb85 100644
--- a/aos/vision/events/epoll_events.h
+++ b/aos/vision/events/epoll_events.h
@@ -11,8 +11,7 @@
 #include "aos/scoped/scoped_fd.h"
 #include "aos/time/time.h"
 
-namespace aos {
-namespace events {
+namespace aos::events {
 
 class EpollLoop;
 
@@ -129,7 +128,6 @@
   ::std::vector<EpollWait *> waits_;
 };
 
-}  // namespace events
-}  // namespace aos
+}  // namespace aos::events
 
 #endif  // AOS_VISION_EVENTS_EPOLL_EVENTS_H_
diff --git a/aos/vision/events/socket_types.h b/aos/vision/events/socket_types.h
index 237bdb1..d3dcf42 100644
--- a/aos/vision/events/socket_types.h
+++ b/aos/vision/events/socket_types.h
@@ -12,8 +12,7 @@
 #include "aos/vision/events/tcp_server.h"
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace events {
+namespace aos::events {
 
 // Simple TCP client connection that sends messages prefixed by length.
 // Useful to broadcast to a message all connected clients.
@@ -89,7 +88,6 @@
   }
 };
 
-}  // namespace events
-}  // namespace aos
+}  // namespace aos::events
 
 #endif  // _AOS_VISION_EVENTS_SOCKET_TYPES_H_
diff --git a/aos/vision/events/tcp_client.h b/aos/vision/events/tcp_client.h
index 8aab2cc..16d7265 100644
--- a/aos/vision/events/tcp_client.h
+++ b/aos/vision/events/tcp_client.h
@@ -6,8 +6,7 @@
 
 #include "aos/vision/events/epoll_events.h"
 
-namespace aos {
-namespace events {
+namespace aos::events {
 
 // Handles the client connection logic to hostname:portno
 class TcpClient : public EpollEvent {
@@ -17,7 +16,6 @@
   // Implement ReadEvent from EpollEvent to use this class.
 };
 
-}  // namespace events
-}  // namespace aos
+}  // namespace aos::events
 
 #endif  // _AOS_VISION_DEBUG_TCP_CLIENT_H_
diff --git a/aos/vision/events/tcp_server.h b/aos/vision/events/tcp_server.h
index 24b4f60..49a5a8c 100644
--- a/aos/vision/events/tcp_server.h
+++ b/aos/vision/events/tcp_server.h
@@ -7,8 +7,7 @@
 #include "aos/vision/events/epoll_events.h"
 #include "aos/vision/events/intrusive_free_list.h"
 
-namespace aos {
-namespace events {
+namespace aos::events {
 
 // Non-templatized base class of TCP server.
 // TCPServer implements Construct which specializes the client connection
@@ -71,7 +70,6 @@
   }
 };
 
-}  // namespace events
-}  // namespace aos
+}  // namespace aos::events
 
 #endif  // _AOS_VISION_EVENTS_TCP_SERVER_H_
diff --git a/aos/vision/events/udp.h b/aos/vision/events/udp.h
index 3c16b28..4acb04d 100644
--- a/aos/vision/events/udp.h
+++ b/aos/vision/events/udp.h
@@ -12,8 +12,7 @@
 #include "aos/macros.h"
 #include "aos/scoped/scoped_fd.h"
 
-namespace aos {
-namespace events {
+namespace aos::events {
 
 // Simple wrapper around a transmitting UDP socket.
 //
@@ -67,7 +66,6 @@
   DISALLOW_COPY_AND_ASSIGN(RXUdpSocket);
 };
 
-}  // namespace events
-}  // namespace aos
+}  // namespace aos::events
 
 #endif  // AOS_VISION_EVENTS_UDP_H_
diff --git a/aos/vision/image/image_dataset.h b/aos/vision/image/image_dataset.h
index 7801cec..10ea13e 100644
--- a/aos/vision/image/image_dataset.h
+++ b/aos/vision/image/image_dataset.h
@@ -4,8 +4,7 @@
 #include <string>
 #include <vector>
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 struct DatasetFrame {
   // TODO: These should be V4L formats ideally.
@@ -17,7 +16,6 @@
 
 DatasetFrame LoadFile(const std::string &jpeg_filename);
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_IMAGE_IMAGE_DATASET_H_
diff --git a/aos/vision/image/image_stream.h b/aos/vision/image/image_stream.h
index 60e71b2..5a45c6f 100644
--- a/aos/vision/image/image_stream.h
+++ b/aos/vision/image/image_stream.h
@@ -7,8 +7,7 @@
 #include "aos/vision/image/camera_params.pb.h"
 #include "aos/vision/image/reader.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Converts a camera reader into a virtual base class that calls ProcessImage
 // on each new image.
@@ -45,7 +44,6 @@
   std::unique_ptr<::camera::Reader> reader_;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_IMAGE_IMAGE_STREAM_H_
diff --git a/aos/vision/image/image_types.h b/aos/vision/image/image_types.h
index ee56f7d..80b802e 100644
--- a/aos/vision/image/image_types.h
+++ b/aos/vision/image/image_types.h
@@ -8,8 +8,7 @@
 #include <sstream>
 #include <string_view>
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Bounding box for a RangeImage.
 struct ImageBBox {
@@ -106,7 +105,6 @@
 using ImagePtr = Array2dPtr<PixelRef>;
 using ImageValue = ValueArray2d<PixelRef>;
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_IMAGE_IMAGE_TYPES_H_
diff --git a/aos/vision/image/jpeg_routines.h b/aos/vision/image/jpeg_routines.h
index 59ad296..4bac976 100644
--- a/aos/vision/image/jpeg_routines.h
+++ b/aos/vision/image/jpeg_routines.h
@@ -8,8 +8,7 @@
 
 #include "aos/vision/image/image_types.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Returns true if successful false if an error was encountered.
 // Will decompress data into out. Out must be of the right size
@@ -32,7 +31,6 @@
   return ProcessJpeg(data, value->data());
 }
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // _AOS_VISION_IMAGE_JPEGROUTINES_H_
diff --git a/aos/vision/math/segment.h b/aos/vision/math/segment.h
index d6927cb..8ae91e3 100644
--- a/aos/vision/math/segment.h
+++ b/aos/vision/math/segment.h
@@ -5,8 +5,7 @@
 
 #include "aos/vision/math/vector.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 template <int Size>
 class Segment {
@@ -76,7 +75,6 @@
   Vector<Size> B_;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_COMP_GEO_VECTOR_H_
diff --git a/aos/vision/math/vector.h b/aos/vision/math/vector.h
index 5e7520f..ce29901 100644
--- a/aos/vision/math/vector.h
+++ b/aos/vision/math/vector.h
@@ -5,8 +5,7 @@
 
 #include "Eigen/Dense"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 // Represents an n-dimensional vector of doubles with various convenient
 // shortcuts for common operations.
@@ -222,7 +221,6 @@
   return nv;
 }
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // AOS_VISION_MATH_VECTOR_H_
diff --git a/frc971/analysis/in_process_plotter.h b/frc971/analysis/in_process_plotter.h
index 6dab308..df81041 100644
--- a/frc971/analysis/in_process_plotter.h
+++ b/frc971/analysis/in_process_plotter.h
@@ -7,8 +7,7 @@
 #include "aos/network/web_proxy.h"
 #include "frc971/analysis/plot_data_generated.h"
 
-namespace frc971 {
-namespace analysis {
+namespace frc971::analysis {
 
 // This class wraps the WebProxy class to provide a convenient C++ interface to
 // dynamically generate plots.
@@ -96,6 +95,5 @@
   std::vector<ColorWheelColor> color_wheel_;
 };
 
-}  // namespace analysis
-}  // namespace frc971
+}  // namespace frc971::analysis
 #endif  // FRC971_ANALYSIS_IN_PROCESS_PLOTTER_H_
diff --git a/frc971/autonomous/base_autonomous_actor.h b/frc971/autonomous/base_autonomous_actor.h
index 403854f..15c88d4 100644
--- a/frc971/autonomous/base_autonomous_actor.h
+++ b/frc971/autonomous/base_autonomous_actor.h
@@ -13,8 +13,7 @@
 #include "frc971/control_loops/drivetrain/drivetrain_status_generated.h"
 #include "y2019/control_loops/drivetrain/target_selector_generated.h"
 
-namespace frc971 {
-namespace autonomous {
+namespace frc971::autonomous {
 
 class BaseAutonomousActor : public ::aos::common::actions::ActorBase<Goal> {
  public:
@@ -156,7 +155,6 @@
   int32_t goal_spline_handle_ = 0;
 };
 
-}  // namespace autonomous
-}  // namespace frc971
+}  // namespace frc971::autonomous
 
 #endif  // FRC971_AUTONOMOUS_BASE_AUTONOMOUS_ACTOR_H_
diff --git a/frc971/autonomous/user_button_localized_autonomous_actor.cc b/frc971/autonomous/user_button_localized_autonomous_actor.cc
index 5358a28..21fb42a 100644
--- a/frc971/autonomous/user_button_localized_autonomous_actor.cc
+++ b/frc971/autonomous/user_button_localized_autonomous_actor.cc
@@ -5,8 +5,7 @@
 namespace this_thread = ::std::this_thread;
 namespace drivetrain = frc971::control_loops::drivetrain;
 
-namespace frc971 {
-namespace autonomous {
+namespace frc971::autonomous {
 
 UserButtonLocalizedAutonomousActor::UserButtonLocalizedAutonomousActor(
     ::aos::EventLoop *event_loop,
@@ -109,5 +108,4 @@
   return Run(params);
 }
 
-}  // namespace autonomous
-}  // namespace frc971
+}  // namespace frc971::autonomous
diff --git a/frc971/autonomous/user_button_localized_autonomous_actor.h b/frc971/autonomous/user_button_localized_autonomous_actor.h
index 07d083a..3f6503d 100644
--- a/frc971/autonomous/user_button_localized_autonomous_actor.h
+++ b/frc971/autonomous/user_button_localized_autonomous_actor.h
@@ -14,8 +14,7 @@
 #include "frc971/control_loops/drivetrain/drivetrain_status_generated.h"
 #include "y2019/control_loops/drivetrain/target_selector_generated.h"
 
-namespace frc971 {
-namespace autonomous {
+namespace frc971::autonomous {
 
 class UserButtonLocalizedAutonomousActor : public BaseAutonomousActor {
  public:
@@ -54,7 +53,6 @@
   bool user_indicated_safe_to_reset_ = false;
 };
 
-}  // namespace autonomous
-}  // namespace frc971
+}  // namespace frc971::autonomous
 
 #endif  // FRC971_AUTONOMOUS_EXTENDED_AUTONOMOUS_ACTOR_H_
diff --git a/frc971/can_logger/asc_logger.h b/frc971/can_logger/asc_logger.h
index 19a1cb9..2be2eb2 100644
--- a/frc971/can_logger/asc_logger.h
+++ b/frc971/can_logger/asc_logger.h
@@ -10,8 +10,7 @@
 #include "aos/events/event_loop.h"
 #include "frc971/can_logger/can_logging_generated.h"
 
-namespace frc971 {
-namespace can_logger {
+namespace frc971::can_logger {
 
 class AscLogger {
  public:
@@ -33,7 +32,6 @@
   aos::EventLoop *event_loop_;
 };
 
-}  // namespace can_logger
-}  // namespace frc971
+}  // namespace frc971::can_logger
 
 #endif  // FRC971_CAN_LOGGER_ASC_LOGGER_H_
diff --git a/frc971/can_logger/can_logger.h b/frc971/can_logger/can_logger.h
index 432bac8..a144265 100644
--- a/frc971/can_logger/can_logger.h
+++ b/frc971/can_logger/can_logger.h
@@ -16,8 +16,7 @@
 #include "aos/scoped/scoped_fd.h"
 #include "frc971/can_logger/can_logging_generated.h"
 
-namespace frc971 {
-namespace can_logger {
+namespace frc971::can_logger {
 
 // This class listens to all the traffic on a SocketCAN interface and sends it
 // on the aos event loop so it can be logged with the aos logging
@@ -45,7 +44,6 @@
   aos::Sender<CanFrame> frames_sender_;
 };
 
-}  // namespace can_logger
-}  // namespace frc971
+}  // namespace frc971::can_logger
 
 #endif  // FRC971_CAN_LOGGER_CAN_LOGGER_H_
diff --git a/frc971/codelab/basic.h b/frc971/codelab/basic.h
index 3aac567..6439d84 100644
--- a/frc971/codelab/basic.h
+++ b/frc971/codelab/basic.h
@@ -8,8 +8,7 @@
 #include "frc971/codelab/basic_status_generated.h"
 #include "frc971/control_loops/control_loop.h"
 
-namespace frc971 {
-namespace codelab {
+namespace frc971::codelab {
 
 class Basic
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -23,7 +22,6 @@
                     aos::Sender<Status>::Builder *status) override;
 };
 
-}  // namespace codelab
-}  // namespace frc971
+}  // namespace frc971::codelab
 
 #endif  // FRC971_CODELAB_BASIC_H_
diff --git a/frc971/control_loops/c2d.h b/frc971/control_loops/c2d.h
index 7c1bf81..f80f88f 100644
--- a/frc971/control_loops/c2d.h
+++ b/frc971/control_loops/c2d.h
@@ -9,8 +9,7 @@
 // We need to include MatrixFunctions for the matrix exponential.
 #include "unsupported/Eigen/MatrixFunctions"
 
-namespace frc971 {
-namespace controls {
+namespace frc971::controls {
 
 template <typename Scalar, int num_states, int num_inputs>
 void C2D(const ::Eigen::Matrix<Scalar, num_states, num_states> &A_continuous,
@@ -116,7 +115,6 @@
   *A_d = phi22t;
 }
 
-}  // namespace controls
-}  // namespace frc971
+}  // namespace frc971::controls
 
 #endif  // FRC971_CONTROL_LOOPS_C2D_H_
diff --git a/frc971/control_loops/capped_test_plant.h b/frc971/control_loops/capped_test_plant.h
index 8b4cefd..4171719 100644
--- a/frc971/control_loops/capped_test_plant.h
+++ b/frc971/control_loops/capped_test_plant.h
@@ -5,8 +5,7 @@
 
 #include "frc971/control_loops/state_feedback_loop.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // Basic state feedback plant for use in tests.
 class CappedTestPlant : public StateFeedbackPlant<2, 1, 1> {
@@ -28,6 +27,5 @@
   double voltage_offset_ = 0.0;
 };
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 #endif  // FRC971_CONTROL_LOOPS_CAPPED_TEST_PLANT_H_
diff --git a/frc971/control_loops/coerce_goal.h b/frc971/control_loops/coerce_goal.h
index 6867540..3d34e94 100644
--- a/frc971/control_loops/coerce_goal.h
+++ b/frc971/control_loops/coerce_goal.h
@@ -5,8 +5,7 @@
 
 #include "frc971/control_loops/polytope.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 template <typename Scalar = double>
 Eigen::Matrix<Scalar, 2, 1> DoCoerceGoal(
@@ -127,7 +126,6 @@
   }
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_COERCE_GOAL_H_
diff --git a/frc971/control_loops/control_loop-tmpl.h b/frc971/control_loops/control_loop-tmpl.h
index 7e20227..d86c97c 100644
--- a/frc971/control_loops/control_loop-tmpl.h
+++ b/frc971/control_loops/control_loop-tmpl.h
@@ -3,8 +3,7 @@
 
 #include "aos/logging/logging.h"
 
-namespace frc971 {
-namespace controls {
+namespace frc971::controls {
 
 // TODO(aschuh): Tests.
 
@@ -91,5 +90,4 @@
   status.CheckSent();
 }
 
-}  // namespace controls
-}  // namespace frc971
+}  // namespace frc971::controls
diff --git a/frc971/control_loops/control_loop.h b/frc971/control_loops/control_loop.h
index c02d094..500c81c 100644
--- a/frc971/control_loops/control_loop.h
+++ b/frc971/control_loops/control_loop.h
@@ -10,8 +10,7 @@
 #include "frc971/input/joystick_state_generated.h"
 #include "frc971/input/robot_state_generated.h"
 
-namespace frc971 {
-namespace controls {
+namespace frc971::controls {
 
 // Control loops run this often, "starting" at time 0.
 constexpr ::std::chrono::nanoseconds kLoopFrequency =
@@ -132,8 +131,7 @@
       SimpleLogInterval(kStaleLogInterval, ERROR, "no goal");
 };
 
-}  // namespace controls
-}  // namespace frc971
+}  // namespace frc971::controls
 
 #include "frc971/control_loops/control_loop-tmpl.h"  // IWYU pragma: export
 
diff --git a/frc971/control_loops/control_loop_test.h b/frc971/control_loops/control_loop_test.h
index 00062b9..8b6ba09 100644
--- a/frc971/control_loops/control_loop_test.h
+++ b/frc971/control_loops/control_loop_test.h
@@ -16,8 +16,7 @@
 #include "frc971/input/joystick_state_generated.h"
 #include "frc971/input/robot_state_generated.h"
 
-namespace frc971 {
-namespace testing {
+namespace frc971::testing {
 
 // Handles setting up the environment that all control loops need to actually
 // run.
@@ -219,7 +218,6 @@
 constexpr ::std::chrono::milliseconds
     ControlLoopTestTemplated<TestBaseClass>::kDSPacketTime;
 
-}  // namespace testing
-}  // namespace frc971
+}  // namespace frc971::testing
 
 #endif  // AOS_CONTROLS_CONTROL_LOOP_TEST_H_
diff --git a/frc971/control_loops/dlqr.h b/frc971/control_loops/dlqr.h
index 48e8474..57aa88b 100644
--- a/frc971/control_loops/dlqr.h
+++ b/frc971/control_loops/dlqr.h
@@ -3,8 +3,7 @@
 
 #include <Eigen/Dense>
 
-namespace frc971 {
-namespace controls {
+namespace frc971::controls {
 
 template <int num_states, int num_inputs>
 int Controllability(const ::Eigen::Matrix<double, num_states, num_states> &A,
@@ -114,7 +113,6 @@
   return INFO;
 }
 
-}  // namespace controls
-}  // namespace frc971
+}  // namespace frc971::controls
 
 #endif  // FRC971_CONTROL_LOOPS_DLQR_H_
diff --git a/frc971/control_loops/double_jointed_arm/demo_path.h b/frc971/control_loops/double_jointed_arm/demo_path.h
index 9a9d393..691258b 100644
--- a/frc971/control_loops/double_jointed_arm/demo_path.h
+++ b/frc971/control_loops/double_jointed_arm/demo_path.h
@@ -5,15 +5,11 @@
 
 #include "frc971/control_loops/double_jointed_arm/trajectory.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace arm {
+namespace frc971::control_loops::arm {
 
 ::std::unique_ptr<Path> MakeDemoPath();
 ::std::unique_ptr<Path> MakeReversedDemoPath();
 
-}  // namespace arm
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::arm
 
 #endif  // FRC971_CONTROL_LOOPS_DOUBLE_JOINTED_ARM_DEMO_PATH_H_
diff --git a/frc971/control_loops/double_jointed_arm/dynamics.h b/frc971/control_loops/double_jointed_arm/dynamics.h
index c6b078b..c28a20d 100644
--- a/frc971/control_loops/double_jointed_arm/dynamics.h
+++ b/frc971/control_loops/double_jointed_arm/dynamics.h
@@ -8,9 +8,7 @@
 
 DECLARE_bool(gravity);
 
-namespace frc971 {
-namespace control_loops {
-namespace arm {
+namespace frc971::control_loops::arm {
 
 struct ArmConstants {
   // Below, 0 refers to the proximal joint, and 1 refers to the distal joint.
@@ -242,8 +240,6 @@
   const double gamma_;
 };
 
-}  // namespace arm
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::arm
 
 #endif  // FRC971_CONTROL_LOOPS_DOUBLE_JOINTED_ARM_DYNAMICS_H_
diff --git a/frc971/control_loops/double_jointed_arm/ekf.h b/frc971/control_loops/double_jointed_arm/ekf.h
index 45e1641..f815807 100644
--- a/frc971/control_loops/double_jointed_arm/ekf.h
+++ b/frc971/control_loops/double_jointed_arm/ekf.h
@@ -5,9 +5,7 @@
 
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace arm {
+namespace frc971::control_loops::arm {
 
 // An extended kalman filter for the Arm.
 // Our states are:
@@ -48,8 +46,6 @@
   const Dynamics *dynamics_;
 };
 
-}  // namespace arm
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::arm
 
 #endif  // FRC971_CONTROL_LOOPS_DOUBLE_JOINTED_ARM_EKF_H_
diff --git a/frc971/control_loops/double_jointed_arm/graph.h b/frc971/control_loops/double_jointed_arm/graph.h
index 06d396c..c1c09ef 100644
--- a/frc971/control_loops/double_jointed_arm/graph.h
+++ b/frc971/control_loops/double_jointed_arm/graph.h
@@ -8,9 +8,7 @@
 #include <memory>
 #include <vector>
 
-namespace frc971 {
-namespace control_loops {
-namespace arm {
+namespace frc971::control_loops::arm {
 
 // Grr... normal priority queues don't allow modifying the node cost.
 // This relies on pointer stability for the passed in T.
@@ -181,8 +179,6 @@
   size_t last_searched_vertex_ = std::numeric_limits<size_t>::max();
 };
 
-}  // namespace arm
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::arm
 
 #endif  // FRC971_CONTROL_LOOPS_DOUBLE_JOINTED_ARM_GRAPH_H_
diff --git a/frc971/control_loops/double_jointed_arm/test_constants.h b/frc971/control_loops/double_jointed_arm/test_constants.h
index 4ca2293..d71717d 100644
--- a/frc971/control_loops/double_jointed_arm/test_constants.h
+++ b/frc971/control_loops/double_jointed_arm/test_constants.h
@@ -3,10 +3,7 @@
 
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace arm {
-namespace testing {
+namespace frc971::control_loops::arm::testing {
 
 constexpr double kEfficiencyTweak = 0.95;
 constexpr double kStallTorque = 1.41 * kEfficiencyTweak;
@@ -44,9 +41,6 @@
     .num_distal_motors = 2.0,
 };
 
-}  // namespace testing
-}  // namespace arm
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::arm::testing
 
 #endif  // FRC971_CONTROL_LOOPS_DOUBLE_JOINTED_ARM_TEST_CONSTANTS_H_
diff --git a/frc971/control_loops/double_jointed_arm/trajectory.h b/frc971/control_loops/double_jointed_arm/trajectory.h
index ca570d2..82cf2a7 100644
--- a/frc971/control_loops/double_jointed_arm/trajectory.h
+++ b/frc971/control_loops/double_jointed_arm/trajectory.h
@@ -10,9 +10,7 @@
 
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace arm {
+namespace frc971::control_loops::arm {
 
 // This class represents a path in theta0, theta1 space.  It also returns the
 // position, velocity and acceleration of the path as a function of path
@@ -439,8 +437,6 @@
   int failed_solutions_ = 0;
 };
 
-}  // namespace arm
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::arm
 
 #endif  // FRC971_CONTROL_LOOPS_DOUBLE_JOINTED_ARM_TRAJECTORY_H_
diff --git a/frc971/control_loops/drivetrain/camera.h b/frc971/control_loops/drivetrain/camera.h
index e1d4b76..6e87357 100644
--- a/frc971/control_loops/drivetrain/camera.h
+++ b/frc971/control_loops/drivetrain/camera.h
@@ -6,8 +6,7 @@
 #include "aos/containers/sized_array.h"
 #include "frc971/control_loops/pose.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // Represents a target on the field. Currently just consists of a pose and a
 // indicator for whether it is occluded (occlusion is only used by the simulator
@@ -366,7 +365,6 @@
   views->push_back(view);
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // Y2019_CONTROL_LOOPS_DRIVETRAIN_CAMERA_H_
diff --git a/frc971/control_loops/drivetrain/distance_spline.h b/frc971/control_loops/drivetrain/distance_spline.h
index 63156fe..5c404a0 100644
--- a/frc971/control_loops/drivetrain/distance_spline.h
+++ b/frc971/control_loops/drivetrain/distance_spline.h
@@ -11,9 +11,7 @@
 #include "frc971/control_loops/drivetrain/trajectory_generated.h"
 #include "frc971/control_loops/fixed_quadrature.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 std::vector<Spline> FlatbufferToSplines(const MultiSpline *fb);
 
@@ -127,8 +125,6 @@
   absl::Span<const float> distances_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_DISTANCE_SPLINE_H_
diff --git a/frc971/control_loops/drivetrain/drivetrain.h b/frc971/control_loops/drivetrain/drivetrain.h
index c92b7d7..87266f1 100644
--- a/frc971/control_loops/drivetrain/drivetrain.h
+++ b/frc971/control_loops/drivetrain/drivetrain.h
@@ -25,9 +25,7 @@
 #include "frc971/wpilib/imu_batch_generated.h"
 #include "frc971/zeroing/imu_zeroer.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 namespace chrono = std::chrono;
 
@@ -195,8 +193,6 @@
   aos::SendFailureCounter status_failure_counter_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_H_
diff --git a/frc971/control_loops/drivetrain/drivetrain_config.h b/frc971/control_loops/drivetrain/drivetrain_config.h
index 31c911a..8e0a58d 100644
--- a/frc971/control_loops/drivetrain/drivetrain_config.h
+++ b/frc971/control_loops/drivetrain/drivetrain_config.h
@@ -13,9 +13,7 @@
 #include "frc971/control_loops/state_feedback_loop_converters.h"
 #include "frc971/shifter_hall_effect.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 // Configuration for line-following mode.
 struct LineFollowConfig {
@@ -236,8 +234,6 @@
     };
   }
 };
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_CONSTANTS_H_
diff --git a/frc971/control_loops/drivetrain/drivetrain_test_lib.h b/frc971/control_loops/drivetrain/drivetrain_test_lib.h
index 4368b00..a79ba72 100644
--- a/frc971/control_loops/drivetrain/drivetrain_test_lib.h
+++ b/frc971/control_loops/drivetrain/drivetrain_test_lib.h
@@ -15,10 +15,7 @@
 #include "frc971/queues/gyro_generated.h"
 #include "frc971/wpilib/imu_batch_generated.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
-namespace testing {
+namespace frc971::control_loops::drivetrain::testing {
 
 const DrivetrainConfig<double> &GetTestDrivetrainConfig();
 
@@ -174,9 +171,6 @@
   double accel_sin_wave_magnitude_ = 0.0;
 };
 
-}  // namespace testing
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain::testing
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_TEST_LIB_H_
diff --git a/frc971/control_loops/drivetrain/drivetrain_uc.q.h b/frc971/control_loops/drivetrain/drivetrain_uc.q.h
index 95a2000..5b0bb83 100644
--- a/frc971/control_loops/drivetrain/drivetrain_uc.q.h
+++ b/frc971/control_loops/drivetrain/drivetrain_uc.q.h
@@ -4,8 +4,7 @@
 
 #include "aos/macros.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 struct GearLogging {
   GearLogging();
@@ -111,7 +110,6 @@
   DrivetrainQueue_Status status;
 };
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_Q_H_
diff --git a/frc971/control_loops/drivetrain/hybrid_ekf.h b/frc971/control_loops/drivetrain/hybrid_ekf.h
index 743e494..f784f2e 100644
--- a/frc971/control_loops/drivetrain/hybrid_ekf.h
+++ b/frc971/control_loops/drivetrain/hybrid_ekf.h
@@ -12,17 +12,11 @@
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 #include "frc971/control_loops/runge_kutta.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace testing {
+namespace y2019::control_loops::testing {
 class ParameterizedLocalizerTest;
-}  // namespace testing
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::testing
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 namespace testing {
 class HybridEkfTest;
@@ -934,8 +928,6 @@
   P_.setZero();
 }
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_HYBRID_EKF_H_
diff --git a/frc971/control_loops/drivetrain/improved_down_estimator.h b/frc971/control_loops/drivetrain/improved_down_estimator.h
index b5cc509..c778ad5 100644
--- a/frc971/control_loops/drivetrain/improved_down_estimator.h
+++ b/frc971/control_loops/drivetrain/improved_down_estimator.h
@@ -12,9 +12,7 @@
 #include "frc971/control_loops/quaternion_utils.h"
 #include "frc971/control_loops/runge_kutta.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 // Generates the sigma points to use in the UKF given the current estimate and
 // covariance.
@@ -256,8 +254,6 @@
       aos::monotonic_clock::time_point now);
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_IMPROVED_DOWN_ESTIMATOR_H_
diff --git a/frc971/control_loops/drivetrain/line_follow_drivetrain.h b/frc971/control_loops/drivetrain/line_follow_drivetrain.h
index bb2f7ae..245d0e9 100644
--- a/frc971/control_loops/drivetrain/line_follow_drivetrain.h
+++ b/frc971/control_loops/drivetrain/line_follow_drivetrain.h
@@ -12,9 +12,7 @@
 #include "frc971/control_loops/profiled_subsystem_generated.h"
 #include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 namespace testing {
 class LineFollowDrivetrainTest;
@@ -93,8 +91,6 @@
   friend class testing::LineFollowDrivetrainTest;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_LINE_FOLLOW_DRIVETRAIN_H_
diff --git a/frc971/control_loops/drivetrain/localization/puppet_localizer.h b/frc971/control_loops/drivetrain/localization/puppet_localizer.h
index 9b348a7..a3ebe1d 100644
--- a/frc971/control_loops/drivetrain/localization/puppet_localizer.h
+++ b/frc971/control_loops/drivetrain/localization/puppet_localizer.h
@@ -9,9 +9,7 @@
 #include "frc971/control_loops/drivetrain/localization/localizer_output_generated.h"
 #include "frc971/control_loops/drivetrain/localizer.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 // This class handles the localization for the 2022/2023 robots. Rather than
 // actually doing any work on the roborio, we farm all the localization out to a
@@ -104,8 +102,6 @@
       target_selector_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_LOCALIZATION_PUPPET_LOCALIZER_H_
diff --git a/frc971/control_loops/drivetrain/localizer.h b/frc971/control_loops/drivetrain/localizer.h
index 867b3c0..6f5bf3d 100644
--- a/frc971/control_loops/drivetrain/localizer.h
+++ b/frc971/control_loops/drivetrain/localizer.h
@@ -7,9 +7,7 @@
 #include "frc971/control_loops/drivetrain/hybrid_ekf.h"
 #include "frc971/control_loops/pose.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 // An interface for target selection. This provides an object that will take in
 // state updates and then determine what poes we should be driving to.
@@ -214,8 +212,6 @@
   TrivialTargetSelector target_selector_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_FIELD_ESTIMATOR_H_
diff --git a/frc971/control_loops/drivetrain/polydrivetrain.h b/frc971/control_loops/drivetrain/polydrivetrain.h
index a9dea7e..f4c608d 100644
--- a/frc971/control_loops/drivetrain/polydrivetrain.h
+++ b/frc971/control_loops/drivetrain/polydrivetrain.h
@@ -23,9 +23,7 @@
 #include "frc971/control_loops/drivetrain/drivetrain_states.h"
 #include "frc971/control_loops/state_feedback_loop.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 template <typename Scalar = double>
 class PolyDrivetrain {
@@ -457,8 +455,6 @@
   return builder.Finish();
 }
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_POLYDRIVETRAIN_H_
diff --git a/frc971/control_loops/drivetrain/spline.h b/frc971/control_loops/drivetrain/spline.h
index 2c000bf..af42040 100644
--- a/frc971/control_loops/drivetrain/spline.h
+++ b/frc971/control_loops/drivetrain/spline.h
@@ -5,9 +5,7 @@
 
 #include "frc971/control_loops/binomial.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 // Class to hold a spline as a function of alpha.  Alpha can only range between
 // 0.0 and 1.0.
@@ -190,8 +188,6 @@
   return ans;
 }
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_SPLINE_H_
diff --git a/frc971/control_loops/drivetrain/splinedrivetrain.h b/frc971/control_loops/drivetrain/splinedrivetrain.h
index c528733..f02a5b6 100644
--- a/frc971/control_loops/drivetrain/splinedrivetrain.h
+++ b/frc971/control_loops/drivetrain/splinedrivetrain.h
@@ -17,9 +17,7 @@
 #include "frc971/control_loops/drivetrain/spline.h"
 #include "frc971/control_loops/drivetrain/trajectory.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 class SplineDrivetrain {
  public:
@@ -111,8 +109,6 @@
   bool output_was_capped_ = false;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_SPLINEDRIVETRAIN_H_
diff --git a/frc971/control_loops/drivetrain/ssdrivetrain.h b/frc971/control_loops/drivetrain/ssdrivetrain.h
index 77f1e25..7059f15 100644
--- a/frc971/control_loops/drivetrain/ssdrivetrain.h
+++ b/frc971/control_loops/drivetrain/ssdrivetrain.h
@@ -15,9 +15,7 @@
 #include "frc971/control_loops/polytope.h"
 #include "frc971/control_loops/state_feedback_loop.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 class DrivetrainMotorsSS {
  public:
@@ -70,8 +68,6 @@
   LocalizerInterface *localizer_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_SSDRIVETRAIN_H_
diff --git a/frc971/control_loops/drivetrain/trajectory.h b/frc971/control_loops/drivetrain/trajectory.h
index b2cecc0..a9f14f6 100644
--- a/frc971/control_loops/drivetrain/trajectory.h
+++ b/frc971/control_loops/drivetrain/trajectory.h
@@ -14,9 +14,7 @@
 #include "frc971/control_loops/runge_kutta.h"
 #include "frc971/control_loops/state_feedback_loop.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 template <typename F>
 double IntegrateAccelForDistance(const F &fn, double v, double x, double dx) {
@@ -423,8 +421,6 @@
       .finished();
 }
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_TRAJECTORY_H_
diff --git a/frc971/control_loops/drivetrain/trajectory_generator.h b/frc971/control_loops/drivetrain/trajectory_generator.h
index 234d386..5d638d3 100644
--- a/frc971/control_loops/drivetrain/trajectory_generator.h
+++ b/frc971/control_loops/drivetrain/trajectory_generator.h
@@ -6,9 +6,7 @@
 #include "frc971/control_loops/drivetrain/spline_goal_generated.h"
 #include "frc971/control_loops/drivetrain/trajectory.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace drivetrain {
+namespace frc971::control_loops::drivetrain {
 
 class TrajectoryGenerator {
  public:
@@ -22,8 +20,6 @@
   aos::Sender<fb::Trajectory> trajectory_sender_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::drivetrain
 
 #endif  // FRC971_CONTROL_LOOPS_DRIVETRAIN_TRAJECTORY_GENERATOR_H_
diff --git a/frc971/control_loops/fixed_quadrature.h b/frc971/control_loops/fixed_quadrature.h
index 53bb0dc..88d52e8 100644
--- a/frc971/control_loops/fixed_quadrature.h
+++ b/frc971/control_loops/fixed_quadrature.h
@@ -5,8 +5,7 @@
 
 #include <Eigen/Dense>
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // Implements Gaussian Quadrature integration (5th order).  fn is the function
 // to integrate.  It must take 1 argument of type T.  The integration is between
@@ -57,7 +56,6 @@
   return answer;
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_FIXED_QUADRATURE_H_
diff --git a/frc971/control_loops/flywheel/flywheel_controller.h b/frc971/control_loops/flywheel/flywheel_controller.h
index db8baeb..49a4385 100644
--- a/frc971/control_loops/flywheel/flywheel_controller.h
+++ b/frc971/control_loops/flywheel/flywheel_controller.h
@@ -9,9 +9,7 @@
 #include "frc971/control_loops/hybrid_state_feedback_loop.h"
 #include "frc971/control_loops/state_feedback_loop.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace flywheel {
+namespace frc971::control_loops::flywheel {
 
 class CurrentLimitedStateFeedbackController;
 
@@ -73,8 +71,6 @@
   DISALLOW_COPY_AND_ASSIGN(FlywheelController);
 };
 
-}  // namespace flywheel
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::flywheel
 
 #endif  // FRC971_CONTROL_LOOPS_SHOOTER_FLYWHEEL_CONTROLLER_H_
diff --git a/frc971/control_loops/flywheel/flywheel_controller_test.cc b/frc971/control_loops/flywheel/flywheel_controller_test.cc
index 26aabc9..eaac6e6 100644
--- a/frc971/control_loops/flywheel/flywheel_controller_test.cc
+++ b/frc971/control_loops/flywheel/flywheel_controller_test.cc
@@ -9,10 +9,7 @@
 #include "frc971/control_loops/flywheel/flywheel_test_plant.h"
 #include "frc971/control_loops/flywheel/integral_flywheel_controller_test_plant.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace flywheel {
-namespace testing {
+namespace frc971::control_loops::flywheel::testing {
 class FlywheelTest : public ::frc971::testing::ControlLoopTest {
  public:
   FlywheelTest()
@@ -97,7 +94,4 @@
   RunFor(std::chrono::seconds(8));
   VerifyNearGoal();
 }
-}  // namespace testing
-}  // namespace flywheel
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::flywheel::testing
diff --git a/frc971/control_loops/flywheel/flywheel_test_plant.h b/frc971/control_loops/flywheel/flywheel_test_plant.h
index 01e347d..269e147 100644
--- a/frc971/control_loops/flywheel/flywheel_test_plant.h
+++ b/frc971/control_loops/flywheel/flywheel_test_plant.h
@@ -3,9 +3,7 @@
 
 #include "frc971/control_loops/flywheel/flywheel_controller.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace flywheel {
+namespace frc971::control_loops::flywheel {
 
 class FlywheelPlant : public StateFeedbackPlant<2, 1, 1> {
  public:
@@ -40,8 +38,6 @@
   double resistance_;
 };
 
-}  // namespace flywheel
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::flywheel
 
 #endif  // FRC971_CONTROL_LOOPS_FLYWHEEL_FLYWHEEL_TEST_PLANT_H_
diff --git a/frc971/control_loops/gaussian_noise.h b/frc971/control_loops/gaussian_noise.h
index dce60fb..a784df0 100644
--- a/frc971/control_loops/gaussian_noise.h
+++ b/frc971/control_loops/gaussian_noise.h
@@ -6,8 +6,7 @@
 #include <memory>
 #include <random>
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 class GaussianNoise {
  public:
@@ -28,7 +27,6 @@
   std::normal_distribution<double> distribution_;
 };
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_GAUSSIAN_NOISE_H_
diff --git a/frc971/control_loops/jacobian.h b/frc971/control_loops/jacobian.h
index 0940c6c..5442ec8 100644
--- a/frc971/control_loops/jacobian.h
+++ b/frc971/control_loops/jacobian.h
@@ -3,8 +3,7 @@
 
 #include <Eigen/Dense>
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 template <int num_states, int num_inputs, typename F>
 ::Eigen::Matrix<double, num_states, num_inputs> NumericalJacobian(
@@ -46,7 +45,6 @@
       U);
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_JACOBIAN_H_
diff --git a/frc971/control_loops/polytope.h b/frc971/control_loops/polytope.h
index 794219b..cba25f6 100644
--- a/frc971/control_loops/polytope.h
+++ b/frc971/control_loops/polytope.h
@@ -14,8 +14,7 @@
 #include "glog/logging.h"
 #endif  // __linux__
 
-namespace frc971 {
-namespace controls {
+namespace frc971::controls {
 
 // A number_of_dimensions dimensional polytope.
 // This represents the region consisting of all points X such that H * X <= k.
@@ -238,7 +237,6 @@
 }
 #endif  // __linux__
 
-}  // namespace controls
-}  // namespace frc971
+}  // namespace frc971::controls
 
 #endif  // AOS_CONTROLS_POLYTOPE_H_
diff --git a/frc971/control_loops/pose.h b/frc971/control_loops/pose.h
index 1eccf28..6570e9c 100644
--- a/frc971/control_loops/pose.h
+++ b/frc971/control_loops/pose.h
@@ -7,8 +7,7 @@
 
 #include "aos/util/math.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // Constructs a homogeneous transformation matrix for rotating about the Z axis.
 template <typename Scalar>
@@ -231,7 +230,6 @@
 
 typedef TypedLineSegment<double> LineSegment;
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_POSE_H_
diff --git a/frc971/control_loops/position_sensor_sim.h b/frc971/control_loops/position_sensor_sim.h
index fae0e7d..a2d765e 100644
--- a/frc971/control_loops/position_sensor_sim.h
+++ b/frc971/control_loops/position_sensor_sim.h
@@ -7,8 +7,7 @@
 #include "frc971/control_loops/control_loops_generated.h"
 #include "frc971/control_loops/gaussian_noise.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // NOTE: All potentiometer and encoder values in this class are assumed to be in
 // translated SI units.
@@ -211,7 +210,6 @@
   double negedge_value_;
 };
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif /* FRC971_CONTROL_LOOPS_POSITION_SENSOR_SIM_H_ */
diff --git a/frc971/control_loops/profiled_subsystem.h b/frc971/control_loops/profiled_subsystem.h
index 2a15201..7a0b7fa 100644
--- a/frc971/control_loops/profiled_subsystem.h
+++ b/frc971/control_loops/profiled_subsystem.h
@@ -18,8 +18,7 @@
 #include "frc971/zeroing/pot_and_index.h"
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // TODO(Brian): Use a tuple instead of an array to support heterogeneous zeroing
 // styles.
@@ -466,7 +465,6 @@
       internal::UseUnlessZero(max_angular_acceleration, default_acceleration_));
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_PROFILED_SUBSYSTEM_H_
diff --git a/frc971/control_loops/quaternion_utils.h b/frc971/control_loops/quaternion_utils.h
index e97935c..e96f5f1 100644
--- a/frc971/control_loops/quaternion_utils.h
+++ b/frc971/control_loops/quaternion_utils.h
@@ -5,8 +5,7 @@
 #include "Eigen/Geometry"
 #include "glog/logging.h"
 
-namespace frc971 {
-namespace controls {
+namespace frc971::controls {
 
 // Function to compute the quaternion average of a bunch of quaternions. Each
 // column in the input matrix is a quaternion (optionally scaled by it's
@@ -93,7 +92,6 @@
   return QuaternionDerivativeDerivitive(q.coeffs());
 }
 
-}  // namespace controls
-}  // namespace frc971
+}  // namespace frc971::controls
 
 #endif  // AOS_CONTROLS_QUATERNION_UTILS_H_
diff --git a/frc971/control_loops/runge_kutta.h b/frc971/control_loops/runge_kutta.h
index 7fa3f3e..ed5a359 100644
--- a/frc971/control_loops/runge_kutta.h
+++ b/frc971/control_loops/runge_kutta.h
@@ -3,8 +3,7 @@
 
 #include <Eigen/Dense>
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // Implements Runge Kutta integration (4th order).  fn is the function to
 // integrate.  It must take 1 argument of type T.  The integration starts at an
@@ -67,7 +66,6 @@
   return X + dt / 6.0 * (k1 + 2.0 * k2 + 2.0 * k3 + k4);
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_RUNGE_KUTTA_H_
diff --git a/frc971/control_loops/simple_capped_state_feedback_loop.h b/frc971/control_loops/simple_capped_state_feedback_loop.h
index b2049a6..c159e15 100644
--- a/frc971/control_loops/simple_capped_state_feedback_loop.h
+++ b/frc971/control_loops/simple_capped_state_feedback_loop.h
@@ -5,8 +5,7 @@
 
 #include "frc971/control_loops/state_feedback_loop.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // A StateFeedbackLoop which implements CapU based on a simple set of maximum
 // absolute values for each element of U.
@@ -74,7 +73,6 @@
   ::Eigen::Array<double, number_of_inputs, 1> max_voltages_;
 };
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_SIMPLE_CAPPED_STATE_FEEDBACK_LOOP_H_
diff --git a/frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h b/frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h
index b26f69c..82017a4 100644
--- a/frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h
+++ b/frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h
@@ -5,8 +5,7 @@
 #include "frc971/control_loops/profiled_subsystem.h"
 #include "frc971/control_loops/state_feedback_loop_converters.h"
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 template <typename ZeroingEstimator>
 struct StaticZeroingSingleDOFProfiledSubsystemParams {
@@ -426,7 +425,6 @@
   return status_builder.Finish();
 }
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_STATIC_ZEROING_SINGLE_DOF_PROFILED_SUBSYSTEM_H_
diff --git a/frc971/control_loops/team_number_test_environment.h b/frc971/control_loops/team_number_test_environment.h
index 5c95c28..6e7dea8 100644
--- a/frc971/control_loops/team_number_test_environment.h
+++ b/frc971/control_loops/team_number_test_environment.h
@@ -3,9 +3,7 @@
 
 #include "gtest/gtest.h"
 
-namespace frc971 {
-namespace control_loops {
-namespace testing {
+namespace frc971::control_loops::testing {
 
 // The team number we use for tests.
 static const int kTeamNumber = 1;
@@ -23,8 +21,6 @@
 __attribute__((unused)) static ::testing::Environment *const team_number_env =
     ::testing::AddGlobalTestEnvironment(new TeamNumberEnvironment());
 
-}  // namespace testing
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops::testing
 
 #endif  // FRC971_CONTROL_LOOPS_TEAM_NUMBER_TEST_ENVIRONMENT_H_
diff --git a/frc971/control_loops/voltage_cap/voltage_cap.h b/frc971/control_loops/voltage_cap/voltage_cap.h
index ad4e4c6c..f30d5af 100644
--- a/frc971/control_loops/voltage_cap/voltage_cap.h
+++ b/frc971/control_loops/voltage_cap/voltage_cap.h
@@ -3,8 +3,7 @@
 
 #include <cstdio>
 
-namespace frc971 {
-namespace control_loops {
+namespace frc971::control_loops {
 
 // This function maintains the difference of power between two voltages passed
 // in that are outside of our range of possible voltage output.
@@ -27,7 +26,6 @@
 void VoltageCap(double voltage_one, double voltage_two, double *out_voltage_one,
                 double *out_voltage_two);
 
-}  // namespace control_loops
-}  // namespace frc971
+}  // namespace frc971::control_loops
 
 #endif  // FRC971_CONTROL_LOOPS_VOLTAGE_CAP_VOLTAGE_CAP_H_
diff --git a/frc971/input/action_joystick_input.h b/frc971/input/action_joystick_input.h
index f77f416..ac37c2a 100644
--- a/frc971/input/action_joystick_input.h
+++ b/frc971/input/action_joystick_input.h
@@ -8,8 +8,7 @@
 #include "frc971/input/drivetrain_input.h"
 #include "frc971/input/joystick_input.h"
 
-namespace frc971 {
-namespace input {
+namespace frc971::input {
 
 // Class to abstract out managing actions, autonomous mode, and drivetrains.
 // Turns out we do the same thing every year, so let's stop copying it.
@@ -139,7 +138,6 @@
   ::aos::Fetcher<::frc971::autonomous::AutonomousMode> autonomous_mode_fetcher_;
 };
 
-}  // namespace input
-}  // namespace frc971
+}  // namespace frc971::input
 
 #endif  // AOS_INPUT_ACTION_JOYSTICK_INPUT_H_
diff --git a/frc971/input/driver_station_data.h b/frc971/input/driver_station_data.h
index 5ebf8f4..7d8dc3e 100644
--- a/frc971/input/driver_station_data.h
+++ b/frc971/input/driver_station_data.h
@@ -9,9 +9,7 @@
 
 #include "frc971/input/joystick_state_generated.h"
 
-namespace frc971 {
-namespace input {
-namespace driver_station {
+namespace frc971::input::driver_station {
 
 // Represents a feature of a joystick (a button or an axis).
 // All indices are 1-based.
@@ -126,8 +124,6 @@
   SavedJoystickState current_values_, old_values_;
 };
 
-}  // namespace driver_station
-}  // namespace input
-}  // namespace frc971
+}  // namespace frc971::input::driver_station
 
 #endif  // AOS_INPUT_DRIVER_STATION_DATA_H_
diff --git a/frc971/input/drivetrain_input.h b/frc971/input/drivetrain_input.h
index 0cb724d..173c551 100644
--- a/frc971/input/drivetrain_input.h
+++ b/frc971/input/drivetrain_input.h
@@ -13,8 +13,7 @@
 #include "frc971/control_loops/drivetrain/drivetrain_status_generated.h"
 #include "frc971/input/driver_station_data.h"
 
-namespace frc971 {
-namespace input {
+namespace frc971::input {
 
 using control_loops::drivetrain::PistolBottomButtonUse;
 using control_loops::drivetrain::PistolSecondButtonUse;
@@ -271,7 +270,6 @@
       const ::frc971::input::driver_station::Data &data) override;
 };
 
-}  // namespace input
-}  // namespace frc971
+}  // namespace frc971::input
 
 #endif  // AOS_INPUT_DRIVETRAIN_INPUT_H_
diff --git a/frc971/input/joystick_input.h b/frc971/input/joystick_input.h
index 074908d..b6d0ceb 100644
--- a/frc971/input/joystick_input.h
+++ b/frc971/input/joystick_input.h
@@ -6,8 +6,7 @@
 #include "aos/events/event_loop.h"
 #include "frc971/input/driver_station_data.h"
 
-namespace frc971 {
-namespace input {
+namespace frc971::input {
 
 // A class for handling joystick packet values.
 // It will call RunIteration each time a new packet is received.
@@ -40,7 +39,6 @@
   int mode_;
 };
 
-}  // namespace input
-}  // namespace frc971
+}  // namespace frc971::input
 
 #endif  // AOS_INPUT_JOYSTICK_INPUT_H_
diff --git a/frc971/input/redundant_joystick_data.h b/frc971/input/redundant_joystick_data.h
index c6cdb78..56fc6b5 100644
--- a/frc971/input/redundant_joystick_data.h
+++ b/frc971/input/redundant_joystick_data.h
@@ -3,9 +3,7 @@
 
 #include "frc971/input/driver_station_data.h"
 
-namespace frc971 {
-namespace input {
-namespace driver_station {
+namespace frc971::input::driver_station {
 
 // A class to wrap driver_station::Data and map logical joystick numbers to
 // their actual numbers in the order they are on the driverstation.
@@ -51,8 +49,6 @@
   const Data &data_;
 };
 
-}  // namespace driver_station
-}  // namespace input
-}  // namespace frc971
+}  // namespace frc971::input::driver_station
 
 #endif  // AOS_INPUT_REDUNDANT_JOYSTICK_DATA_H_
diff --git a/frc971/orin/apriltag.h b/frc971/orin/apriltag.h
index f87e107..d3e041b 100644
--- a/frc971/orin/apriltag.h
+++ b/frc971/orin/apriltag.h
@@ -12,8 +12,7 @@
 #include "frc971/orin/line_fit_filter.h"
 #include "frc971/orin/points.h"
 
-namespace frc971 {
-namespace apriltag {
+namespace frc971::apriltag {
 
 // Class to find the blob index of a point in a point vector.
 class BlobExtentsIndexFinder {
@@ -326,7 +325,6 @@
   zarray_t *detections_ = nullptr;
 };
 
-}  // namespace apriltag
-}  // namespace frc971
+}  // namespace frc971::apriltag
 
 #endif  // FRC971_ORIN_APRILTAG_H_
diff --git a/frc971/orin/cuda.h b/frc971/orin/cuda.h
index 2cc8f44..0e44fb4 100644
--- a/frc971/orin/cuda.h
+++ b/frc971/orin/cuda.h
@@ -17,8 +17,7 @@
   LOG(FATAL) << "Check failed: " #condition " (" << cudaGetErrorString(c) \
              << ") "
 
-namespace frc971 {
-namespace apriltag {
+namespace frc971::apriltag {
 
 // Class to manage the lifetime of a Cuda stream.  This is used to provide
 // relative ordering between kernels on the same stream.
@@ -205,7 +204,6 @@
 void MaybeCheckAndSynchronize();
 void MaybeCheckAndSynchronize(std::string_view message);
 
-}  // namespace apriltag
-}  // namespace frc971
+}  // namespace frc971::apriltag
 
 #endif  // FRC971_ORIN_CUDA_H_
diff --git a/frc971/orin/line_fit_filter.h b/frc971/orin/line_fit_filter.h
index 0c37f0b..7ecc553 100644
--- a/frc971/orin/line_fit_filter.h
+++ b/frc971/orin/line_fit_filter.h
@@ -8,8 +8,7 @@
 #include "device_launch_parameters.h"
 #include "frc971/orin/cuda.h"
 
-namespace frc971 {
-namespace apriltag {
+namespace frc971::apriltag {
 
 // Class to hold the extents of a blob of points.
 struct MinMaxExtents {
@@ -160,7 +159,6 @@
 // The max number of work elements for a max maxes of 10.
 constexpr size_t MaxRankedIndex() { return 210; }
 
-}  // namespace apriltag
-}  // namespace frc971
+}  // namespace frc971::apriltag
 
 #endif  // FRC971_ORIN_LINE_FIT_FILTER_H_
diff --git a/frc971/orin/points.h b/frc971/orin/points.h
index d530a17..745e151 100644
--- a/frc971/orin/points.h
+++ b/frc971/orin/points.h
@@ -11,8 +11,7 @@
 #include "cuda_runtime.h"
 #include "device_launch_parameters.h"
 
-namespace frc971 {
-namespace apriltag {
+namespace frc971::apriltag {
 
 // Class to hold the 2 adjacent blob IDs, a point in decimated image space, the
 // half pixel offset, and the gradient.
@@ -297,7 +296,6 @@
   }
 };
 
-}  // namespace apriltag
-}  // namespace frc971
+}  // namespace frc971::apriltag
 
 #endif  // FRC971_ORIN_POINTS_H_
diff --git a/frc971/orin/threshold.h b/frc971/orin/threshold.h
index 5cdc3a2..03eb59a 100644
--- a/frc971/orin/threshold.h
+++ b/frc971/orin/threshold.h
@@ -5,8 +5,7 @@
 
 #include "frc971/orin/cuda.h"
 
-namespace frc971 {
-namespace apriltag {
+namespace frc971::apriltag {
 
 // Converts to grayscale, decimates, and thresholds an image on the provided
 // stream.
@@ -16,7 +15,6 @@
     uint8_t *thresholded_image, size_t width, size_t height,
     size_t min_white_black_diff, CudaStream *stream);
 
-}  // namespace apriltag
-}  // namespace frc971
+}  // namespace frc971::apriltag
 
 #endif  // FRC971_ORIN_THRESHOLD_H_
diff --git a/frc971/shooter_interpolation/interpolation.h b/frc971/shooter_interpolation/interpolation.h
index bce532f..26b141f 100644
--- a/frc971/shooter_interpolation/interpolation.h
+++ b/frc971/shooter_interpolation/interpolation.h
@@ -5,8 +5,7 @@
 #include <utility>
 #include <vector>
 
-namespace frc971 {
-namespace shooter_interpolation {
+namespace frc971::shooter_interpolation {
 
 double Blend(double coefficient, double a1, double a2);
 
@@ -79,7 +78,6 @@
   }
 }
 
-}  // namespace shooter_interpolation
-}  // namespace frc971
+}  // namespace frc971::shooter_interpolation
 
 #endif  // FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_
diff --git a/frc971/solvers/convex.h b/frc971/solvers/convex.h
index 3de357c..d8989d8 100644
--- a/frc971/solvers/convex.h
+++ b/frc971/solvers/convex.h
@@ -10,8 +10,7 @@
 #include "glog/logging.h"
 #include <Eigen/Dense>
 
-namespace frc971 {
-namespace solvers {
+namespace frc971::solvers {
 
 // TODO(austin): Steal JET from Ceres to generate the derivatives easily and
 // quickly?
@@ -379,7 +378,6 @@
   }
 }
 
-};  // namespace solvers
-};  // namespace frc971
+}  // namespace frc971::solvers
 
 #endif  // FRC971_SOLVERS_CONVEX_H_
diff --git a/frc971/solvers/sparse_convex.h b/frc971/solvers/sparse_convex.h
index 9695431..074f2f3 100644
--- a/frc971/solvers/sparse_convex.h
+++ b/frc971/solvers/sparse_convex.h
@@ -9,8 +9,7 @@
 #include "glog/logging.h"
 #include <Eigen/Sparse>
 
-namespace frc971 {
-namespace solvers {
+namespace frc971::solvers {
 
 // TODO(austin): Steal JET from Ceres to generate the derivatives easily and
 // quickly?
@@ -118,7 +117,6 @@
                         std::string_view prefix, int verbosity);
 };
 
-}  // namespace solvers
-}  // namespace frc971
+}  // namespace frc971::solvers
 
 #endif  // FRC971_SOLVERS_SPARSE_CONVEX_H_
diff --git a/frc971/vision/calibration_accumulator.h b/frc971/vision/calibration_accumulator.h
index 9a6f483..550b691 100644
--- a/frc971/vision/calibration_accumulator.h
+++ b/frc971/vision/calibration_accumulator.h
@@ -12,8 +12,7 @@
 #include "frc971/vision/foxglove_image_converter_lib.h"
 #include "frc971/wpilib/imu_batch_generated.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 // This class provides an interface for an application to be notified of all
 // camera and IMU samples in order with the correct timestamps.
@@ -143,7 +142,6 @@
   frc971::IMUValuesT last_value_;
 };
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // FRC971_VISION_CALIBRATION_ACCUMULATOR_H_
diff --git a/frc971/vision/ceres/pose_graph_3d_error_term.h b/frc971/vision/ceres/pose_graph_3d_error_term.h
index 4dd5fbd..217b2a9 100644
--- a/frc971/vision/ceres/pose_graph_3d_error_term.h
+++ b/frc971/vision/ceres/pose_graph_3d_error_term.h
@@ -36,8 +36,7 @@
 
 #include "types.h"
 
-namespace ceres {
-namespace examples {
+namespace ceres::examples {
 
 // Computes the error term for two poses that have a relative pose measurement
 // between them. Let the hat variables be the measurement. We have two poses x_a
@@ -133,7 +132,6 @@
   const double weight_;
 };
 
-}  // namespace examples
-}  // namespace ceres
+}  // namespace ceres::examples
 
 #endif  // EXAMPLES_CERES_POSE_GRAPH_3D_ERROR_TERM_H_
diff --git a/frc971/vision/ceres/read_g2o.h b/frc971/vision/ceres/read_g2o.h
index 69fa16a..c427939 100644
--- a/frc971/vision/ceres/read_g2o.h
+++ b/frc971/vision/ceres/read_g2o.h
@@ -38,8 +38,7 @@
 
 #include "glog/logging.h"
 
-namespace ceres {
-namespace examples {
+namespace ceres::examples {
 
 // Reads a single pose from the input and inserts it into the map. Returns false
 // if there is a duplicate entry.
@@ -136,7 +135,6 @@
   return true;
 }
 
-}  // namespace examples
-}  // namespace ceres
+}  // namespace ceres::examples
 
 #endif  // EXAMPLES_CERES_READ_G2O_H_
diff --git a/frc971/vision/ceres/types.h b/frc971/vision/ceres/types.h
index 17e9bd3..9c1e495 100644
--- a/frc971/vision/ceres/types.h
+++ b/frc971/vision/ceres/types.h
@@ -39,8 +39,7 @@
 #include "Eigen/Core"
 #include "Eigen/Geometry"
 
-namespace ceres {
-namespace examples {
+namespace ceres::examples {
 
 struct Pose3d {
   Eigen::Vector3d p;
@@ -104,7 +103,6 @@
 typedef std::vector<Constraint3d, Eigen::aligned_allocator<Constraint3d>>
     VectorOfConstraints;
 
-}  // namespace examples
-}  // namespace ceres
+}  // namespace ceres::examples
 
 #endif  // EXAMPLES_CERES_TYPES_H_
diff --git a/frc971/vision/charuco_lib.h b/frc971/vision/charuco_lib.h
index 62923db..aac25ee 100644
--- a/frc971/vision/charuco_lib.h
+++ b/frc971/vision/charuco_lib.h
@@ -17,8 +17,7 @@
 
 DECLARE_bool(visualize);
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 // Class to find extrinsics for a specified pi's camera using the provided
 // training data.
@@ -211,7 +210,6 @@
     const foxglove::PointsAnnotationType line_type =
         foxglove::PointsAnnotationType::POINTS);
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // Y2020_VISION_CHARUCO_LIB_H_
diff --git a/frc971/vision/extrinsics_calibration.h b/frc971/vision/extrinsics_calibration.h
index f6c3ccc..97d719f 100644
--- a/frc971/vision/extrinsics_calibration.h
+++ b/frc971/vision/extrinsics_calibration.h
@@ -6,8 +6,7 @@
 
 #include "frc971/vision/calibration_accumulator.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 struct CalibrationParameters {
   Eigen::Quaternion<double> initial_orientation =
@@ -55,7 +54,6 @@
 void Visualize(const CalibrationData &data,
                const CalibrationParameters &calibration_parameters);
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // FRC971_VISION_EXTRINSICS_CALIBRATION_H_
diff --git a/frc971/vision/intrinsics_calibration_lib.h b/frc971/vision/intrinsics_calibration_lib.h
index 3076ed9..7f08138 100644
--- a/frc971/vision/intrinsics_calibration_lib.h
+++ b/frc971/vision/intrinsics_calibration_lib.h
@@ -16,8 +16,7 @@
 #include "aos/util/file.h"
 #include "frc971/vision/charuco_lib.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 class IntrinsicsCalibration {
  public:
@@ -76,6 +75,5 @@
   aos::ExitHandle *exit_handle_;
 };
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 #endif  // FRC971_VISION_CALIBRATION_LIB_H_
diff --git a/frc971/vision/media_device.h b/frc971/vision/media_device.h
index a2a86fe..31d0882 100644
--- a/frc971/vision/media_device.h
+++ b/frc971/vision/media_device.h
@@ -16,8 +16,7 @@
 
 #include "aos/scoped/scoped_fd.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 class MediaDevice;
 class Pad;
@@ -254,7 +253,6 @@
 // nullopt otherwise.
 std::optional<MediaDevice> FindMediaDevice(std::string_view device);
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // FRC971_VISION_MEDIA_DEVICE_H_
diff --git a/frc971/vision/v4l2_reader.h b/frc971/vision/v4l2_reader.h
index 6338ba5..a3d6252 100644
--- a/frc971/vision/v4l2_reader.h
+++ b/frc971/vision/v4l2_reader.h
@@ -16,8 +16,7 @@
 #include "aos/util/threaded_consumer.h"
 #include "frc971/vision/vision_generated.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 // Reads images from a V4L2 capture device (aka camera).
 class V4L2ReaderBase {
@@ -199,7 +198,6 @@
   aos::util::ThreadedConsumer<int, kNumberBuffers> buffer_requeuer_;
 };
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // FRC971_VISION_V4L2_READER_H_
diff --git a/frc971/vision/visualize_robot.h b/frc971/vision/visualize_robot.h
index c679dba..af2dcef 100644
--- a/frc971/vision/visualize_robot.h
+++ b/frc971/vision/visualize_robot.h
@@ -7,8 +7,7 @@
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 // Helper class to visualize the coordinate frames associated with
 // the robot Based on a virtual camera viewpoint, and camera model,
@@ -80,7 +79,6 @@
                            // DrawFrameAxes
   cv::Size default_size_;  // Default image size
 };
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // FRC971_VISION_VISUALIZE_ROBOT_H_
diff --git a/frc971/wpilib/ADIS16448.h b/frc971/wpilib/ADIS16448.h
index 6d5eb28..ed8e091 100644
--- a/frc971/wpilib/ADIS16448.h
+++ b/frc971/wpilib/ADIS16448.h
@@ -17,8 +17,7 @@
 #include "frc971/wpilib/imu_generated.h"
 #include "frc971/wpilib/spi_rx_clearer.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Handles interfacing with an Analog Devices ADIS16448 Inertial Sensor over
 // SPI and sending values out on a queue.
@@ -100,7 +99,6 @@
   FpgaTimeConverter time_converter_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_ADIS16448_H_
diff --git a/frc971/wpilib/ADIS16470.h b/frc971/wpilib/ADIS16470.h
index 35bcb06..c15ca5b 100644
--- a/frc971/wpilib/ADIS16470.h
+++ b/frc971/wpilib/ADIS16470.h
@@ -12,8 +12,7 @@
 #include "frc971/wpilib/imu_batch_generated.h"
 #include "frc971/wpilib/imu_generated.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Handles interfacing with an Analog Devices ADIS16470 over SPI and sending the
 // resulting values out on a channel.
@@ -93,7 +92,6 @@
   FpgaTimeConverter time_converter_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_ADIS16470_H_
diff --git a/frc971/wpilib/buffered_pcm.h b/frc971/wpilib/buffered_pcm.h
index f743371..4933c25 100644
--- a/frc971/wpilib/buffered_pcm.h
+++ b/frc971/wpilib/buffered_pcm.h
@@ -7,8 +7,7 @@
 
 #include "frc971/wpilib/buffered_solenoid.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Manages setting values for all solenoids for a single PCM in a single CAN
 // message.
@@ -43,7 +42,6 @@
   friend class BufferedSolenoid;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_BUFFERED_PCM_H_
diff --git a/frc971/wpilib/can_drivetrain_writer.h b/frc971/wpilib/can_drivetrain_writer.h
index 1c0ba95..987605d 100644
--- a/frc971/wpilib/can_drivetrain_writer.h
+++ b/frc971/wpilib/can_drivetrain_writer.h
@@ -3,8 +3,7 @@
 #include "frc971/wpilib/loop_output_handler.h"
 #include "frc971/wpilib/talonfx.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class CANDrivetrainWriter : public ::frc971::wpilib::LoopOutputHandler<
                                 ::frc971::control_loops::drivetrain::Output> {
@@ -30,5 +29,4 @@
   std::vector<std::shared_ptr<TalonFX>> left_talonfxs_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
diff --git a/frc971/wpilib/can_sensor_reader.h b/frc971/wpilib/can_sensor_reader.h
index 8ef5fd1..8eddfca 100644
--- a/frc971/wpilib/can_sensor_reader.h
+++ b/frc971/wpilib/can_sensor_reader.h
@@ -9,8 +9,7 @@
 #include "aos/realtime.h"
 #include "frc971/wpilib/talonfx.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 class CANSensorReader {
  public:
   CANSensorReader(
@@ -37,6 +36,5 @@
   // Callback used to send the CANPosition flatbuffer
   std::function<void(ctre::phoenix::StatusCode status)> flatbuffer_callback_;
 };
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 #endif  // FRC971_WPILIB_CAN_SENSOR_READER_H_
diff --git a/frc971/wpilib/dma_edge_counting.h b/frc971/wpilib/dma_edge_counting.h
index f51318d..eda77f0 100644
--- a/frc971/wpilib/dma_edge_counting.h
+++ b/frc971/wpilib/dma_edge_counting.h
@@ -14,8 +14,7 @@
 #include "frc971/wpilib/dma.h"
 #undef ERROR
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Generic interface for classes that do something with DMA samples and also
 // poll current sensor values.
@@ -280,7 +279,6 @@
   DISALLOW_COPY_AND_ASSIGN(DMASynchronizer);
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_DMA_EDGE_COUNTING_H_
diff --git a/frc971/wpilib/drivetrain_writer.h b/frc971/wpilib/drivetrain_writer.h
index 195b5a3..e83585e 100644
--- a/frc971/wpilib/drivetrain_writer.h
+++ b/frc971/wpilib/drivetrain_writer.h
@@ -6,8 +6,7 @@
 #include "frc971/wpilib/ahal/PWM.h"
 #include "frc971/wpilib/loop_output_handler.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class DrivetrainWriter : public ::frc971::wpilib::LoopOutputHandler<
                              ::frc971::control_loops::drivetrain::Output> {
@@ -56,7 +55,6 @@
   bool reversed_right0_, reversed_left0_, reversed_right1_, reversed_left1_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_DRIVETRAIN_WRITER_H_
diff --git a/frc971/wpilib/encoder_and_potentiometer.h b/frc971/wpilib/encoder_and_potentiometer.h
index 7ee85e1..a5eac24 100644
--- a/frc971/wpilib/encoder_and_potentiometer.h
+++ b/frc971/wpilib/encoder_and_potentiometer.h
@@ -14,8 +14,7 @@
 #include "frc971/wpilib/dma.h"
 #include "frc971/wpilib/dma_edge_counting.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Latches values from an encoder on positive edges from another input using
 // DMA.
@@ -244,7 +243,6 @@
   ::std::unique_ptr<frc::Encoder> encoder_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_ENCODER_AND_POTENTIOMETER_H_
diff --git a/frc971/wpilib/fpga_time_conversion.h b/frc971/wpilib/fpga_time_conversion.h
index 51cc7a9..c279089 100644
--- a/frc971/wpilib/fpga_time_conversion.h
+++ b/frc971/wpilib/fpga_time_conversion.h
@@ -9,8 +9,7 @@
 #include "aos/time/time.h"
 #include "hal/cpp/fpga_clock.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Returns the offset from the monotonic clock to the FPGA time. This is defined
 // as `fpga_time - monotonic_time`.
@@ -51,7 +50,6 @@
   std::chrono::nanoseconds offset_ = std::chrono::nanoseconds::min();
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_FPGA_TIME_CONVERSION_H_
diff --git a/frc971/wpilib/generic_can_writer.h b/frc971/wpilib/generic_can_writer.h
index 7d6dd1a..d339324 100644
--- a/frc971/wpilib/generic_can_writer.h
+++ b/frc971/wpilib/generic_can_writer.h
@@ -5,8 +5,7 @@
 #include "frc971/wpilib/loop_output_handler.h"
 #include "frc971/wpilib/talonfx.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 /// This class uses a callback whenever it writes so that the caller can use any
 /// flatbuffer to write to the talonfx motor.
@@ -70,5 +69,4 @@
       write_callback_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
\ No newline at end of file
+}  // namespace frc971::wpilib
diff --git a/frc971/wpilib/gyro_interface.h b/frc971/wpilib/gyro_interface.h
index 3568a47..0c6b519 100644
--- a/frc971/wpilib/gyro_interface.h
+++ b/frc971/wpilib/gyro_interface.h
@@ -6,8 +6,7 @@
 #include "frc971/wpilib/ahal/SPI.h"
 #undef ERROR
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class GyroInterface {
  public:
@@ -50,7 +49,6 @@
   ::std::unique_ptr<frc::SPI> gyro_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_GYRO_INTERFACE_H_
diff --git a/frc971/wpilib/gyro_sender.h b/frc971/wpilib/gyro_sender.h
index 4abfeaa..1c3f5d6 100644
--- a/frc971/wpilib/gyro_sender.h
+++ b/frc971/wpilib/gyro_sender.h
@@ -12,8 +12,7 @@
 #include "frc971/wpilib/gyro_interface.h"
 #include "frc971/zeroing/averager.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Handles reading the gyro over SPI and sending out angles on a queue.
 //
@@ -56,7 +55,6 @@
   bool zeroed_ = false;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_GYRO_H_
diff --git a/frc971/wpilib/interrupt_edge_counting.h b/frc971/wpilib/interrupt_edge_counting.h
index 5ea8df5..5d64582 100644
--- a/frc971/wpilib/interrupt_edge_counting.h
+++ b/frc971/wpilib/interrupt_edge_counting.h
@@ -12,8 +12,7 @@
 #include "frc971/wpilib/ahal/DigitalInput.h"
 #include "frc971/wpilib/ahal/Encoder.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class InterruptSynchronizer;
 
@@ -226,7 +225,6 @@
   DISALLOW_COPY_AND_ASSIGN(InterruptSynchronizer);
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_INTERRUPT_EDGE_COUNTING_H_
diff --git a/frc971/wpilib/joystick_sender.h b/frc971/wpilib/joystick_sender.h
index c9eb4cd..0591a8e 100644
--- a/frc971/wpilib/joystick_sender.h
+++ b/frc971/wpilib/joystick_sender.h
@@ -6,8 +6,7 @@
 #include "aos/events/shm_event_loop.h"
 #include "frc971/input/joystick_state_generated.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class JoystickSender {
  public:
@@ -19,7 +18,6 @@
   const uint16_t team_id_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_JOYSTICK_SENDER_H_
diff --git a/frc971/wpilib/loop_output_handler.h b/frc971/wpilib/loop_output_handler.h
index 5f66a4c..1fb46b2 100644
--- a/frc971/wpilib/loop_output_handler.h
+++ b/frc971/wpilib/loop_output_handler.h
@@ -9,8 +9,7 @@
 #include "aos/time/time.h"
 #include "aos/util/log_interval.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Handles sending the output from a single control loop to the hardware.
 //
@@ -64,7 +63,6 @@
   ::aos::TimerHandler *timer_handler_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_LOOP_OUTPUT_HANDLER_H_
diff --git a/frc971/wpilib/pdp_fetcher.h b/frc971/wpilib/pdp_fetcher.h
index 72f6745..38c4a5b 100644
--- a/frc971/wpilib/pdp_fetcher.h
+++ b/frc971/wpilib/pdp_fetcher.h
@@ -12,8 +12,7 @@
 class PowerDistributionPanel;
 }  // namespace frc
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Handles fetching values from the PDP.
 class PDPFetcher {
@@ -32,7 +31,6 @@
   ::std::unique_ptr<::frc::PowerDistributionPanel> pdp_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_PDP_FETCHER_H_
diff --git a/frc971/wpilib/sensor_reader.h b/frc971/wpilib/sensor_reader.h
index bf8c96a..455ed0e 100644
--- a/frc971/wpilib/sensor_reader.h
+++ b/frc971/wpilib/sensor_reader.h
@@ -21,8 +21,7 @@
 using ::aos::monotonic_clock;
 namespace chrono = ::std::chrono;
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class SensorReader {
  public:
@@ -264,7 +263,6 @@
   chrono::microseconds period_ = chrono::microseconds(5000);
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_SENSOR_READER_H_
diff --git a/frc971/wpilib/spi_rx_clearer.h b/frc971/wpilib/spi_rx_clearer.h
index e385d21..733cf6f 100644
--- a/frc971/wpilib/spi_rx_clearer.h
+++ b/frc971/wpilib/spi_rx_clearer.h
@@ -3,8 +3,7 @@
 
 #include <cstdint>
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Allows clearing the RX FIFO of the roboRIO's SPI peripheral on demand. This
 // is necessary to work around a driver bug. See
@@ -35,7 +34,6 @@
   bool RxFifoIsEmpty() { return !(ReadRegister(4) & (1 << 4)); }
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_SPI_RX_CLEARER_H_
diff --git a/frc971/wpilib/swerve/swerve_drivetrain_writer.h b/frc971/wpilib/swerve/swerve_drivetrain_writer.h
index d02d4dc..8e9e616 100644
--- a/frc971/wpilib/swerve/swerve_drivetrain_writer.h
+++ b/frc971/wpilib/swerve/swerve_drivetrain_writer.h
@@ -9,9 +9,7 @@
 #include "frc971/wpilib/swerve/swerve_module.h"
 #include "frc971/wpilib/talonfx.h"
 
-namespace frc971 {
-namespace wpilib {
-namespace swerve {
+namespace frc971::wpilib::swerve {
 
 // Reads from the swerve output flatbuffer and uses wpilib to set the current
 // for each motor.
@@ -45,8 +43,6 @@
   double max_voltage_;
 };
 
-}  // namespace swerve
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib::swerve
 
 #endif  // FRC971_WPILIB_SWERVE_DRIVETRAIN_WRITER_H_
diff --git a/frc971/wpilib/swerve/swerve_module.h b/frc971/wpilib/swerve/swerve_module.h
index d65547a..c373a31 100644
--- a/frc971/wpilib/swerve/swerve_module.h
+++ b/frc971/wpilib/swerve/swerve_module.h
@@ -3,9 +3,7 @@
 
 #include "frc971/wpilib/talonfx.h"
 
-namespace frc971 {
-namespace wpilib {
-namespace swerve {
+namespace frc971::wpilib::swerve {
 
 struct SwerveModule {
   SwerveModule(TalonFXParams rotation_params, TalonFXParams translation_params,
@@ -39,7 +37,5 @@
   std::shared_ptr<TalonFX> translation;
 };
 
-}  // namespace swerve
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib::swerve
 #endif  // FRC971_WPILIB_SWERVE_SWERVE_MODULE_H_
diff --git a/frc971/wpilib/talonfx.h b/frc971/wpilib/talonfx.h
index c25fa81..a3e3066 100644
--- a/frc971/wpilib/talonfx.h
+++ b/frc971/wpilib/talonfx.h
@@ -15,8 +15,7 @@
 
 namespace control_loops = ::frc971::control_loops;
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 struct TalonFXParams {
   int device_id;
@@ -100,6 +99,5 @@
   double stator_current_limit_;
   double supply_current_limit_;
 };
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 #endif  // FRC971_WPILIB_TALONFX_MOTOR_H_
diff --git a/frc971/wpilib/wpilib_interface.h b/frc971/wpilib/wpilib_interface.h
index b992aa3..1d64d2c 100644
--- a/frc971/wpilib/wpilib_interface.h
+++ b/frc971/wpilib/wpilib_interface.h
@@ -6,14 +6,12 @@
 #include "aos/events/event_loop.h"
 #include "frc971/input/robot_state_generated.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Sends out a message on ::aos::robot_state.
 flatbuffers::Offset<aos::RobotState> PopulateRobotState(
     aos::Sender<::aos::RobotState>::Builder *builder, int32_t my_pid);
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_WPILIB_INTERFACE_H_
diff --git a/frc971/wpilib/wpilib_robot_base.h b/frc971/wpilib/wpilib_robot_base.h
index 6b9e5c5..27c1bcd 100644
--- a/frc971/wpilib/wpilib_robot_base.h
+++ b/frc971/wpilib/wpilib_robot_base.h
@@ -6,8 +6,7 @@
 #include "aos/logging/logging.h"
 #include "frc971/wpilib/ahal/RobotBase.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 class WPILibRobotBase {
  public:
@@ -81,7 +80,6 @@
   T robot_;
 };
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_NEWROBOTBASE_H_
diff --git a/frc971/wpilib/wpilib_utils.h b/frc971/wpilib/wpilib_utils.h
index 78dd262..0600f66 100644
--- a/frc971/wpilib/wpilib_utils.h
+++ b/frc971/wpilib/wpilib_utils.h
@@ -5,8 +5,7 @@
 
 #include "frc971/constants.h"
 
-namespace frc971 {
-namespace wpilib {
+namespace frc971::wpilib {
 
 // Convert min and max angle positions from range to voltage and compare to
 // min and max potentiometer voltage to check if in range.
@@ -22,7 +21,6 @@
                          ::std::function<double(double)> pot_translate_inverse,
                          bool reverse, double limit_buffer = 0.05);
 
-}  // namespace wpilib
-}  // namespace frc971
+}  // namespace frc971::wpilib
 
 #endif  // FRC971_WPILIB_WPILIB_UTILS_H_
\ No newline at end of file
diff --git a/frc971/zeroing/absolute_and_absolute_encoder.h b/frc971/zeroing/absolute_and_absolute_encoder.h
index 509d5c5..90c8468 100644
--- a/frc971/zeroing/absolute_and_absolute_encoder.h
+++ b/frc971/zeroing/absolute_and_absolute_encoder.h
@@ -8,8 +8,7 @@
 #include "aos/containers/error_list.h"
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Estimates the position with an absolute encoder which also reports
 // incremental counts and an absolute encoder that's not allowed to turn more
@@ -113,7 +112,6 @@
   double position_ = 0.0;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_ABSOLUTE_AND_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/absolute_encoder.h b/frc971/zeroing/absolute_encoder.h
index 9d730f2..b6fd579 100644
--- a/frc971/zeroing/absolute_encoder.h
+++ b/frc971/zeroing/absolute_encoder.h
@@ -8,8 +8,7 @@
 #include "aos/containers/error_list.h"
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Estimates the position with an absolute encoder which also reports
 // incremental counts.  The absolute encoder can't spin more than one
@@ -91,7 +90,6 @@
   aos::ErrorList<ZeroingError> errors_;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/averager.h b/frc971/zeroing/averager.h
index 0e15d13..370533f 100644
--- a/frc971/zeroing/averager.h
+++ b/frc971/zeroing/averager.h
@@ -8,8 +8,7 @@
 #include "Eigen/Dense"
 #include "glog/logging.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Averages a set of given numbers. Numbers are given one at a time. Once full
 // the average may be requested.
@@ -89,7 +88,6 @@
   size_t num_data_points_ = 0;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_AVERAGER_H_
diff --git a/frc971/zeroing/continuous_absolute_encoder.h b/frc971/zeroing/continuous_absolute_encoder.h
index e11d866..4994280 100644
--- a/frc971/zeroing/continuous_absolute_encoder.h
+++ b/frc971/zeroing/continuous_absolute_encoder.h
@@ -8,8 +8,7 @@
 #include "aos/containers/error_list.h"
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Estimates the position with an absolute encoder which spins continuously. The
 // absolute encoder must have a 1:1 ratio to the output.
@@ -93,7 +92,6 @@
   aos::ErrorList<ZeroingError> errors_;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_CONTINUOUS_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/hall_effect_and_position.h b/frc971/zeroing/hall_effect_and_position.h
index f03a442..d9f743f 100644
--- a/frc971/zeroing/hall_effect_and_position.h
+++ b/frc971/zeroing/hall_effect_and_position.h
@@ -5,8 +5,7 @@
 
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Estimates the position with an incremental encoder and a hall effect sensor.
 class HallEffectAndPositionZeroingEstimator
@@ -84,7 +83,6 @@
   double first_start_pos_;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_HALL_EFFECT_AND_POSITION_H_
diff --git a/frc971/zeroing/pot_and_absolute_encoder.h b/frc971/zeroing/pot_and_absolute_encoder.h
index d250a50..f18e589 100644
--- a/frc971/zeroing/pot_and_absolute_encoder.h
+++ b/frc971/zeroing/pot_and_absolute_encoder.h
@@ -8,8 +8,7 @@
 #include "aos/containers/error_list.h"
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Estimates the position with an absolute encoder which also reports
 // incremental counts, and a potentiometer.
@@ -98,7 +97,6 @@
   aos::ErrorList<ZeroingError> errors_;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_POT_AND_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/pot_and_index.h b/frc971/zeroing/pot_and_index.h
index 473c674..cb28fe4 100644
--- a/frc971/zeroing/pot_and_index.h
+++ b/frc971/zeroing/pot_and_index.h
@@ -7,8 +7,7 @@
 
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Estimates the position with an incremental encoder with an index pulse and a
 // potentiometer.
@@ -97,7 +96,6 @@
   double first_start_pos_;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_POT_AND_INDEX_H_
diff --git a/frc971/zeroing/pulse_index.h b/frc971/zeroing/pulse_index.h
index 4bcf210..9c17371 100644
--- a/frc971/zeroing/pulse_index.h
+++ b/frc971/zeroing/pulse_index.h
@@ -5,8 +5,7 @@
 
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 // Zeros by seeing all the index pulses in the range of motion of the mechanism
 // and using that to figure out which index pulse is which.
@@ -78,7 +77,6 @@
   double position_;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_PULSE_INDEX_H_
diff --git a/frc971/zeroing/zeroing.h b/frc971/zeroing/zeroing.h
index 5d5b6eb..8fe381d 100644
--- a/frc971/zeroing/zeroing.h
+++ b/frc971/zeroing/zeroing.h
@@ -20,8 +20,7 @@
 // TODO(pschrader): Watch the offset over long periods of time and flag if it
 // gets too far away from the initial value.
 
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
 
 template <typename TPosition, typename TZeroingConstants, typename TState>
 class ZeroingEstimator {
@@ -169,7 +168,6 @@
   bool error_ = false;
 };
 
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing
 
 #endif  // FRC971_ZEROING_ZEROING_H_
diff --git a/frc971/zeroing/zeroing_test.h b/frc971/zeroing/zeroing_test.h
index cadbe6c..497f833 100644
--- a/frc971/zeroing/zeroing_test.h
+++ b/frc971/zeroing/zeroing_test.h
@@ -4,9 +4,7 @@
 #include "frc971/control_loops/position_sensor_sim.h"
 #include "frc971/zeroing/zeroing.h"
 
-namespace frc971 {
-namespace zeroing {
-namespace testing {
+namespace frc971::zeroing::testing {
 
 using control_loops::PositionSensorSimulator;
 using FBB = flatbuffers::FlatBufferBuilder;
@@ -27,6 +25,4 @@
   }
 };
 
-}  // namespace testing
-}  // namespace zeroing
-}  // namespace frc971
+}  // namespace frc971::zeroing::testing
diff --git a/motors/algorithms.h b/motors/algorithms.h
index 20dcbe8..95fa772 100644
--- a/motors/algorithms.h
+++ b/motors/algorithms.h
@@ -5,8 +5,7 @@
 
 #include <array>
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 struct ReadingsToBalance {
   // Adds a single reading at index.
@@ -57,7 +56,6 @@
   return r;
 }
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_ALGORITHMS_H_
diff --git a/motors/big/motor_controls.h b/motors/big/motor_controls.h
index 8aae5d1..6644ea4 100644
--- a/motors/big/motor_controls.h
+++ b/motors/big/motor_controls.h
@@ -9,8 +9,7 @@
 #include "motors/math.h"
 #include "motors/motor.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 class MotorControlsImplementation : public MotorControls {
  public:
@@ -67,7 +66,6 @@
   int16_t debug_[9];
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_MOTOR_CONTROLS_H_
diff --git a/motors/core/semihosting.h b/motors/core/semihosting.h
index 3b7ba46..57af6e7 100644
--- a/motors/core/semihosting.h
+++ b/motors/core/semihosting.h
@@ -5,9 +5,7 @@
 
 #include "absl/types/span.h"
 
-namespace frc971 {
-namespace motors {
-namespace semihosting {
+namespace frc971::motors::semihosting {
 
 inline uint32_t integer_operation(const uint32_t operation, void *const block) {
   register uint32_t operation_register asm("r0") = operation;
@@ -165,8 +163,6 @@
   }
 };
 
-}  // namespace semihosting
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors::semihosting
 
 #endif  // MOTORS_CORE_SEMIHOSTING_H_
diff --git a/motors/fet12/motor_controls.h b/motors/fet12/motor_controls.h
index 482eeaf..7f495f1 100644
--- a/motors/fet12/motor_controls.h
+++ b/motors/fet12/motor_controls.h
@@ -9,8 +9,7 @@
 #include "motors/math.h"
 #include "motors/motor.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 class MotorControlsImplementation : public MotorControls {
  public:
@@ -62,7 +61,6 @@
   int16_t debug_[9];
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_MOTOR_CONTROLS_H_
diff --git a/motors/math.h b/motors/math.h
index 5151714..b9aba4a 100644
--- a/motors/math.h
+++ b/motors/math.h
@@ -10,8 +10,7 @@
 // This file has some specialized math functions useful for implementing our
 // controls in a minimal number of cycles.
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 inline constexpr unsigned int Log2RoundUp(unsigned int x) {
   return (x < 2) ? x : (1 + Log2RoundUp(x / 2));
@@ -213,7 +212,6 @@
 // This must be called before any of the other functions.
 void MathInit();
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_MATH_H_
diff --git a/motors/motor.h b/motors/motor.h
index 3f7b132..20f60fc 100644
--- a/motors/motor.h
+++ b/motors/motor.h
@@ -13,8 +13,7 @@
 #include "motors/print/print.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 class MotorControls {
  public:
@@ -189,7 +188,6 @@
   PrintingImplementation *printing_implementation_ = nullptr;
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_MOTOR_H_
diff --git a/motors/peripheral/adc.h b/motors/peripheral/adc.h
index c22a856..22db93a 100644
--- a/motors/peripheral/adc.h
+++ b/motors/peripheral/adc.h
@@ -5,8 +5,7 @@
 
 #include "motors/util.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 enum class AdcChannels {
   kA,
@@ -15,7 +14,6 @@
 void AdcInitCommon(AdcChannels adc0_channels = AdcChannels::kB,
                    AdcChannels adc1_channels = AdcChannels::kB);
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PERIPHERAL_ADC_H_
diff --git a/motors/peripheral/adc_dma.h b/motors/peripheral/adc_dma.h
index a00b730..f04f5ce 100644
--- a/motors/peripheral/adc_dma.h
+++ b/motors/peripheral/adc_dma.h
@@ -9,8 +9,7 @@
 #include "motors/peripheral/configuration.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // This class manages configuring the hardware to automatically capture various
 // sensor values periodically with tight timing. Currently it's only 4 samples
@@ -108,7 +107,6 @@
   ::std::array<volatile uint32_t *, 2> ftm_delays_{nullptr, nullptr};
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_PERIPHERAL_ADC_DMA_H_
diff --git a/motors/peripheral/spi.h b/motors/peripheral/spi.h
index f865703..c5a1b64 100644
--- a/motors/peripheral/spi.h
+++ b/motors/peripheral/spi.h
@@ -7,8 +7,7 @@
 #include "motors/peripheral/uart_buffer.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // Simple synchronous interface to a SPI peripheral.
 class Spi {
@@ -112,7 +111,6 @@
   int frames_to_receive_ = 0;
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_PERIPHERAL_SPI_H_
diff --git a/motors/peripheral/uart.h b/motors/peripheral/uart.h
index bfd630b..f8e7e7e 100644
--- a/motors/peripheral/uart.h
+++ b/motors/peripheral/uart.h
@@ -8,8 +8,7 @@
 #include "motors/peripheral/uart_buffer.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // Simple synchronous interface to a UART.
 class Uart {
@@ -121,7 +120,6 @@
   UartBuffer<1024> transmit_buffer_, receive_buffer_;
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_PERIPHERAL_UART_H_
diff --git a/motors/peripheral/uart_buffer.h b/motors/peripheral/uart_buffer.h
index 9266465..714cfe8 100644
--- a/motors/peripheral/uart_buffer.h
+++ b/motors/peripheral/uart_buffer.h
@@ -6,8 +6,7 @@
 
 #include "absl/types/span.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // Manages a circular buffer of data to send out.
 template <int kSize>
@@ -90,7 +89,6 @@
   ++size_;
 }
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_PERIPHERAL_UART_BUFFER_H_
diff --git a/motors/pistol_grip/controller_adc.h b/motors/pistol_grip/controller_adc.h
index 867807c..b29bbcf 100644
--- a/motors/pistol_grip/controller_adc.h
+++ b/motors/pistol_grip/controller_adc.h
@@ -3,8 +3,7 @@
 
 #include "motors/util.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 struct SmallAdcReadings {
   uint16_t currents[3];
@@ -28,7 +27,6 @@
 // Reads the absolute encoder values for initialization.
 SmallInitReadings AdcReadSmallInit(const DisableInterrupts &);
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PISTOL_GRIP_CONTROLLER_ADC_H_
diff --git a/motors/pistol_grip/motor_controls.h b/motors/pistol_grip/motor_controls.h
index 253da4b..63d2c12 100644
--- a/motors/pistol_grip/motor_controls.h
+++ b/motors/pistol_grip/motor_controls.h
@@ -9,8 +9,7 @@
 #include "motors/math.h"
 #include "motors/motor.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 class LittleMotorControlsImplementation : public MotorControls {
  public:
@@ -68,7 +67,6 @@
   int16_t debug_[9];
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PISTOL_GRIP_MOTOR_CONTROLS_H_
diff --git a/motors/print/itm.h b/motors/print/itm.h
index 64e3092..05ffb2c 100644
--- a/motors/print/itm.h
+++ b/motors/print/itm.h
@@ -5,8 +5,7 @@
 
 #include "motors/print/print.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 // A printing implementation via the SWO (trace output) pin. This requires an
 // attached debugger which is in SWD (Single Wire Debug) mode, has the SWO
@@ -28,7 +27,6 @@
   int WriteDebug(absl::Span<const char> buffer) override;
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PRINT_ITM_
diff --git a/motors/print/semihosting.h b/motors/print/semihosting.h
index 6094a67..e04a4e5 100644
--- a/motors/print/semihosting.h
+++ b/motors/print/semihosting.h
@@ -5,8 +5,7 @@
 
 #include "motors/print/print.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 // A printing implementation which uses the ARM semihosting interface. This
 // requries an attached debugger with software support.
@@ -31,7 +30,6 @@
   // file if the name is filled out in the parameters.
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PRINT_SEMIHOSTING_H_
diff --git a/motors/print/uart.h b/motors/print/uart.h
index 7d81577..e223ae7 100644
--- a/motors/print/uart.h
+++ b/motors/print/uart.h
@@ -4,8 +4,7 @@
 #include "motors/peripheral/uart.h"
 #include "motors/print/print.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 // A printing implementation using a hardware UART. This has a reasonably sized
 // buffer in memory and uses interrupts to keep the hardware busy. It could
@@ -28,7 +27,6 @@
 // Could easily create a subclass of UartPrinting that also implements
 // WriteDebug on a second UART, and conditionally instantiate that.
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PRINT_UART_H_
diff --git a/motors/print/usb.h b/motors/print/usb.h
index c2224d2..5e811b3 100644
--- a/motors/print/usb.h
+++ b/motors/print/usb.h
@@ -5,8 +5,7 @@
 #include "motors/usb/cdc.h"
 #include "motors/usb/usb.h"
 
-namespace frc971 {
-namespace motors {
+namespace frc971::motors {
 
 // A printing implementation which uses externally-created functions. The stdout
 // one is required, while the debug one is optional.
@@ -68,7 +67,6 @@
   teensy::AcmTty debug_tty_;
 };
 
-}  // namespace motors
-}  // namespace frc971
+}  // namespace frc971::motors
 
 #endif  // MOTORS_PRINT_USB_H_
diff --git a/motors/seems_reasonable/spring.h b/motors/seems_reasonable/spring.h
index 90c9cd1..0847b3c 100644
--- a/motors/seems_reasonable/spring.h
+++ b/motors/seems_reasonable/spring.h
@@ -3,8 +3,7 @@
 
 #include <cmath>
 
-namespace motors {
-namespace seems_reasonable {
+namespace motors::seems_reasonable {
 
 float NextGoal(float current_goal, float goal);
 float PreviousGoal(float current_goal, float goal);
@@ -104,7 +103,6 @@
   float last_error_ = 0.0f;
 };
 
-}  // namespace seems_reasonable
-}  // namespace motors
+}  // namespace motors::seems_reasonable
 
 #endif  //  MOTORS_SEEMS_REASONABLE_SPRING_H_
diff --git a/motors/usb/cdc.h b/motors/usb/cdc.h
index f8f084b..e10dbf0 100644
--- a/motors/usb/cdc.h
+++ b/motors/usb/cdc.h
@@ -13,8 +13,7 @@
 // lot of formats. The only commonality across the "class" seems to be some
 // constants and a few descriptors.
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 struct CdcLineCoding {
   static constexpr uint8_t stop_bits_1() { return 0; }
@@ -129,7 +128,6 @@
   uint16_t control_line_state_ = 0;
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_USB_CDC_H_
diff --git a/motors/usb/hid.h b/motors/usb/hid.h
index 924cf37..b1d843c 100644
--- a/motors/usb/hid.h
+++ b/motors/usb/hid.h
@@ -9,8 +9,7 @@
 #include "motors/usb/usb.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // Implements an HID class device.
 // TODO(Brian): Make this way more generic.
@@ -95,7 +94,6 @@
   UsbDescriptorList hid_descriptor_list_;
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_USB_HID_H_
diff --git a/motors/usb/interrupt_out.h b/motors/usb/interrupt_out.h
index 31852f9..96409b0 100644
--- a/motors/usb/interrupt_out.h
+++ b/motors/usb/interrupt_out.h
@@ -7,8 +7,7 @@
 #include "motors/usb/usb.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // A simple function that just has an interrupt out endpoint and exposes the
 // data received.
@@ -58,7 +57,6 @@
   const ::std::string name_;
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_USB_INTERRUPT_OUT_H_
diff --git a/motors/usb/queue.h b/motors/usb/queue.h
index f7a7e77..2142213 100644
--- a/motors/usb/queue.h
+++ b/motors/usb/queue.h
@@ -4,8 +4,7 @@
 #include <atomic>
 #include <memory>
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // A FIFO queue which reads/writes variable-sized chunks.
 //
@@ -61,7 +60,6 @@
   ::std::atomic<size_t> write_cursor_{0};
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_USB_QUEUE_H_
diff --git a/motors/usb/usb.h b/motors/usb/usb.h
index 2475220..2b0cf17 100644
--- a/motors/usb/usb.h
+++ b/motors/usb/usb.h
@@ -13,8 +13,7 @@
 #include "motors/usb/constants.h"
 #include "motors/util.h"
 
-namespace frc971 {
-namespace teensy {
+namespace frc971::teensy {
 
 // A sufficient memory barrier between writing some data and telling the USB
 // hardware to read it or having the USB hardware say some data is readable and
@@ -584,7 +583,6 @@
   friend class UsbDevice;
 };
 
-}  // namespace teensy
-}  // namespace frc971
+}  // namespace frc971::teensy
 
 #endif  // MOTORS_USB_USB_H_
diff --git a/y2014/actors/autonomous_actor.h b/y2014/actors/autonomous_actor.h
index f1b06bf..3ec82fa 100644
--- a/y2014/actors/autonomous_actor.h
+++ b/y2014/actors/autonomous_actor.h
@@ -13,8 +13,7 @@
 #include "y2014/queues/auto_mode_generated.h"
 #include "y2014/queues/hot_goal_generated.h"
 
-namespace y2014 {
-namespace actors {
+namespace y2014::actors {
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
  public:
@@ -48,7 +47,6 @@
   actors::ShootActor::Factory shoot_action_factory_;
 };
 
-}  // namespace actors
-}  // namespace y2014
+}  // namespace y2014::actors
 
 #endif  // Y2014_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2014/actors/shoot_actor.h b/y2014/actors/shoot_actor.h
index 37dc0c7..1280409 100644
--- a/y2014/actors/shoot_actor.h
+++ b/y2014/actors/shoot_actor.h
@@ -10,8 +10,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 {
 
 class ShootActor
     : public ::aos::common::actions::ActorBase<aos::common::actions::Goal> {
@@ -62,7 +61,6 @@
   int previous_shots_;
 };
 
-}  // namespace actors
-}  // namespace y2014
+}  // namespace y2014::actors
 
 #endif  // Y2014_ACTORS_SHOOT_ACTOR_H_
diff --git a/y2014/constants.h b/y2014/constants.h
index aa4ac26..4baeb24 100644
--- a/y2014/constants.h
+++ b/y2014/constants.h
@@ -6,8 +6,7 @@
 #include "frc971/control_loops/state_feedback_loop.h"
 #include "frc971/shifter_hall_effect.h"
 
-namespace y2014 {
-namespace constants {
+namespace y2014::constants {
 
 using ::frc971::constants::DualHallShifterHallEffect;
 
@@ -138,7 +137,6 @@
 // them.
 const Values &GetValuesForTeam(uint16_t team_number);
 
-}  // namespace constants
-}  // namespace y2014
+}  // namespace y2014::constants
 
 #endif  // Y2014_CONSTANTS_H_
diff --git a/y2014/control_loops/drivetrain/drivetrain_base.h b/y2014/control_loops/drivetrain/drivetrain_base.h
index 48143c3..4822f67 100644
--- a/y2014/control_loops/drivetrain/drivetrain_base.h
+++ b/y2014/control_loops/drivetrain/drivetrain_base.h
@@ -3,13 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2014 {
-namespace control_loops {
+namespace y2014::control_loops {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace control_loops
-}  // namespace y2014
+}  // namespace y2014::control_loops
 
 #endif  // Y2014_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2014_bot3/actors/autonomous_actor.h b/y2014_bot3/actors/autonomous_actor.h
index e4dfe53..844e5a0 100644
--- a/y2014_bot3/actors/autonomous_actor.h
+++ b/y2014_bot3/actors/autonomous_actor.h
@@ -9,8 +9,7 @@
 #include "aos/events/event_loop.h"
 #include "frc971/autonomous/base_autonomous_actor.h"
 
-namespace y2014_bot3 {
-namespace actors {
+namespace y2014_bot3::actors {
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
  public:
@@ -26,7 +25,6 @@
   }
 };
 
-}  // namespace actors
-}  // namespace y2014_bot3
+}  // namespace y2014_bot3::actors
 
 #endif  // Y2014_BOT3_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2014_bot3/control_loops/drivetrain/drivetrain_base.h b/y2014_bot3/control_loops/drivetrain/drivetrain_base.h
index 98cb31d..914088a 100644
--- a/y2014_bot3/control_loops/drivetrain/drivetrain_base.h
+++ b/y2014_bot3/control_loops/drivetrain/drivetrain_base.h
@@ -3,9 +3,7 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2014_bot3 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2014_bot3::control_loops::drivetrain {
 
 const double kDrivetrainEncoderRatio =
     (17.0 / 50.0) /*output reduction*/ * (64.0 / 24.0) /*encoder gears*/;
@@ -13,8 +11,6 @@
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2014_bot3
+}  // namespace y2014_bot3::control_loops::drivetrain
 
 #endif  // Y2014_BOT3_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2014_bot3/control_loops/rollers/rollers.h b/y2014_bot3/control_loops/rollers/rollers.h
index 3d08f59..675acef 100644
--- a/y2014_bot3/control_loops/rollers/rollers.h
+++ b/y2014_bot3/control_loops/rollers/rollers.h
@@ -7,9 +7,7 @@
 #include "y2014_bot3/control_loops/rollers/rollers_position_generated.h"
 #include "y2014_bot3/control_loops/rollers/rollers_status_generated.h"
 
-namespace y2014_bot3 {
-namespace control_loops {
-namespace rollers {
+namespace y2014_bot3::control_loops::rollers {
 
 class Rollers
     : public frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -26,8 +24,6 @@
                     aos::Sender<Status>::Builder *status) override;
 };
 
-}  // namespace rollers
-}  // namespace control_loops
-}  // namespace y2014_bot3
+}  // namespace y2014_bot3::control_loops::rollers
 
 #endif  // Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_
diff --git a/y2016/actors/autonomous_actor.h b/y2016/actors/autonomous_actor.h
index 538322b..2e24638 100644
--- a/y2016/actors/autonomous_actor.h
+++ b/y2016/actors/autonomous_actor.h
@@ -16,8 +16,7 @@
 #include "y2016/control_loops/superstructure/superstructure_status_generated.h"
 #include "y2016/queues/ball_detector_generated.h"
 
-namespace y2016 {
-namespace actors {
+namespace y2016::actors {
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
  public:
@@ -100,7 +99,6 @@
       superstructure_goal_sender_;
 };
 
-}  // namespace actors
-}  // namespace y2016
+}  // namespace y2016::actors
 
 #endif  // Y2016_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2016/actors/superstructure_actor.h b/y2016/actors/superstructure_actor.h
index f1ae1fe..3f28c7e 100644
--- a/y2016/actors/superstructure_actor.h
+++ b/y2016/actors/superstructure_actor.h
@@ -9,8 +9,7 @@
 #include "y2016/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2016/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2016 {
-namespace actors {
+namespace y2016::actors {
 
 class SuperstructureActor
     : public ::aos::common::actions::ActorBase<superstructure_action::Goal> {
@@ -46,7 +45,6 @@
   bool SuperstructureDone();
 };
 
-}  // namespace actors
-}  // namespace y2016
+}  // namespace y2016::actors
 
 #endif  // Y2016_ACTORS_SUPERSTRUCTURE_ACTOR_H_
diff --git a/y2016/actors/vision_align_actor.h b/y2016/actors/vision_align_actor.h
index ac25439..9e604ae 100644
--- a/y2016/actors/vision_align_actor.h
+++ b/y2016/actors/vision_align_actor.h
@@ -10,8 +10,7 @@
 #include "y2016/actors/vision_align_action_generated.h"
 #include "y2016/vision/vision_generated.h"
 
-namespace y2016 {
-namespace actors {
+namespace y2016::actors {
 
 class VisionAlignActor
     : public ::aos::common::actions::ActorBase<vision_align_action::Goal> {
@@ -34,7 +33,6 @@
       drivetrain_goal_sender_;
 };
 
-}  // namespace actors
-}  // namespace y2016
+}  // namespace y2016::actors
 
 #endif
diff --git a/y2016/constants.h b/y2016/constants.h
index f332e37..c3bf681 100644
--- a/y2016/constants.h
+++ b/y2016/constants.h
@@ -7,8 +7,7 @@
 #include "frc971/control_loops/state_feedback_loop.h"
 #include "frc971/shifter_hall_effect.h"
 
-namespace y2016 {
-namespace constants {
+namespace y2016::constants {
 
 using ::frc971::constants::PotAndIndexPulseZeroingConstants;
 using ::frc971::constants::ShifterHallEffect;
@@ -111,7 +110,6 @@
 // them.
 const Values &GetValuesForTeam(uint16_t team_number);
 
-}  // namespace constants
-}  // namespace y2016
+}  // namespace y2016::constants
 
 #endif  // Y2016_CONSTANTS_H_
diff --git a/y2016/control_loops/drivetrain/drivetrain_base.h b/y2016/control_loops/drivetrain/drivetrain_base.h
index 0186a6c..b0a4bda 100644
--- a/y2016/control_loops/drivetrain/drivetrain_base.h
+++ b/y2016/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2016 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2016::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2016
+}  // namespace y2016::control_loops::drivetrain
 
 #endif  // Y2016_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2016/control_loops/shooter/shooter.h b/y2016/control_loops/shooter/shooter.h
index 5aaa1c0..b83ed24 100644
--- a/y2016/control_loops/shooter/shooter.h
+++ b/y2016/control_loops/shooter/shooter.h
@@ -13,9 +13,7 @@
 #include "y2016/control_loops/shooter/shooter_position_generated.h"
 #include "y2016/control_loops/shooter/shooter_status_generated.h"
 
-namespace y2016 {
-namespace control_loops {
-namespace shooter {
+namespace y2016::control_loops::shooter {
 
 namespace {
 constexpr double kTolerance = 10.0;
@@ -94,8 +92,6 @@
   DISALLOW_COPY_AND_ASSIGN(Shooter);
 };
 
-}  // namespace shooter
-}  // namespace control_loops
-}  // namespace y2016
+}  // namespace y2016::control_loops::shooter
 
 #endif  // Y2016_CONTROL_LOOPS_SHOOTER_SHOOTER_H_
diff --git a/y2016/dashboard/dashboard.h b/y2016/dashboard/dashboard.h
index 9b6414e..5152777 100644
--- a/y2016/dashboard/dashboard.h
+++ b/y2016/dashboard/dashboard.h
@@ -21,8 +21,7 @@
 #include "y2016/queues/ball_detector_generated.h"
 #include "y2016/vision/vision_generated.h"
 
-namespace y2016 {
-namespace dashboard {
+namespace y2016::dashboard {
 
 // Dashboard is a webserver that opens a socket and stream data from the robot
 // to the client. It is divided between the DataCollector, which polls
@@ -105,7 +104,6 @@
   void log(Level level, const char *message) override;
 };
 
-}  // namespace dashboard
-}  // namespace y2016
+}  // namespace y2016::dashboard
 
 #endif  // Y2016_DASHBOARD_DASHBOARD_H_
diff --git a/y2016/vision/blob_filters.h b/y2016/vision/blob_filters.h
index 85d2c94..e23c820 100644
--- a/y2016/vision/blob_filters.h
+++ b/y2016/vision/blob_filters.h
@@ -10,8 +10,7 @@
 #include "aos/vision/math/segment.h"
 #include "aos/vision/math/vector.h"
 
-namespace aos {
-namespace vision {
+namespace aos::vision {
 
 struct SelectedBlob {
   SelectedBlob(const RangeImage &blob_inp) : blob(blob_inp) {}
@@ -196,7 +195,6 @@
   ImagePtr *image_ = NULL;
 };
 
-}  // namespace vision
-}  // namespace aos
+}  // namespace aos::vision
 
 #endif  // Y2016_VISION_BLOB_FILTERS_H_
diff --git a/y2016/vision/stereo_geometry.h b/y2016/vision/stereo_geometry.h
index c18abc5..e2ed92e 100644
--- a/y2016/vision/stereo_geometry.h
+++ b/y2016/vision/stereo_geometry.h
@@ -7,8 +7,7 @@
 #include "aos/vision/math/vector.h"
 #include "y2016/vision/calibration.pb.h"
 
-namespace y2016 {
-namespace vision {
+namespace y2016::vision {
 
 // Returns the contents of the calibration file which are embedded into the
 // code.
@@ -61,7 +60,6 @@
   Calibration calibration_;
 };
 
-}  // namespace vision
-}  // namespace y2016
+}  // namespace y2016::vision
 
 #endif  // Y2016_VISION_STEREO_GEOMETRY_H_
diff --git a/y2017/actors/autonomous_actor.h b/y2017/actors/autonomous_actor.h
index ac60f23..e9aac84 100644
--- a/y2017/actors/autonomous_actor.h
+++ b/y2017/actors/autonomous_actor.h
@@ -11,8 +11,7 @@
 #include "y2017/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2017/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2017 {
-namespace actors {
+namespace y2017::actors {
 using ::frc971::ProfileParameters;
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
@@ -169,7 +168,6 @@
   }
 };
 
-}  // namespace actors
-}  // namespace y2017
+}  // namespace y2017::actors
 
 #endif  // Y2017_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2017/constants.h b/y2017/constants.h
index 9c0f3c2..c70b0ea 100644
--- a/y2017/constants.h
+++ b/y2017/constants.h
@@ -12,8 +12,7 @@
 #include "y2017/control_loops/superstructure/intake/intake_plant.h"
 #include "y2017/control_loops/superstructure/shooter/shooter_plant.h"
 
-namespace y2017 {
-namespace constants {
+namespace y2017::constants {
 
 // Has all of our "constants", except the ones that come from other places. The
 // ones which change between robots are put together with a workable way to
@@ -143,7 +142,6 @@
 // them.
 const Values &GetValuesForTeam(uint16_t team_number);
 
-}  // namespace constants
-}  // namespace y2017
+}  // namespace y2017::constants
 
 #endif  // Y2017_CONSTANTS_H_
diff --git a/y2017/control_loops/drivetrain/drivetrain_base.h b/y2017/control_loops/drivetrain/drivetrain_base.h
index c84934f..e0343d9 100644
--- a/y2017/control_loops/drivetrain/drivetrain_base.h
+++ b/y2017/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2017::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::drivetrain
 
 #endif  // Y2017_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2017/control_loops/superstructure/column/column.h b/y2017/control_loops/superstructure/column/column.h
index 615565f..f76450e 100644
--- a/y2017/control_loops/superstructure/column/column.h
+++ b/y2017/control_loops/superstructure/column/column.h
@@ -19,10 +19,7 @@
 #include "y2017/control_loops/superstructure/vision_time_adjuster.h"
 #include "y2017/vision/vision_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
-namespace column {
+namespace y2017::control_loops::superstructure::column {
 
 class ColumnProfiledSubsystem
     : public ::frc971::control_loops::ProfiledSubsystem<
@@ -208,9 +205,6 @@
   const double vision_error_;
 };
 
-}  // namespace column
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure::column
 
 #endif  // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_COLUMN_COLUMN_H_
diff --git a/y2017/control_loops/superstructure/column/column_zeroing.h b/y2017/control_loops/superstructure/column/column_zeroing.h
index c07a504..bb4fb76 100644
--- a/y2017/control_loops/superstructure/column/column_zeroing.h
+++ b/y2017/control_loops/superstructure/column/column_zeroing.h
@@ -8,10 +8,7 @@
 #include "y2017/control_loops/superstructure/superstructure_position_generated.h"
 #include "y2017/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
-namespace column {
+namespace y2017::control_loops::superstructure::column {
 
 class ColumnZeroingEstimator {
  public:
@@ -66,9 +63,6 @@
   const double turret_zeroed_distance_;
 };
 
-}  // namespace column
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure::column
 
 #endif  // y2017_CONTROL_LOOPS_SUPERSTRUCTURE_COLUMN_H_
diff --git a/y2017/control_loops/superstructure/hood/hood.h b/y2017/control_loops/superstructure/hood/hood.h
index 47ace6e..9f6f120 100644
--- a/y2017/control_loops/superstructure/hood/hood.h
+++ b/y2017/control_loops/superstructure/hood/hood.h
@@ -6,10 +6,7 @@
 #include "y2017/constants.h"
 #include "y2017/control_loops/superstructure/superstructure_goal_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
-namespace hood {
+namespace y2017::control_loops::superstructure::hood {
 
 // Profiled subsystem class with significantly relaxed limits while zeroing.  We
 // need relaxed limits, because if you start at the top of the range, you need
@@ -75,9 +72,6 @@
       ::aos::monotonic_clock::min_time;
 };
 
-}  // namespace hood
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure::hood
 
 #endif  // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_HOOD_HOOD_H_
diff --git a/y2017/control_loops/superstructure/intake/intake.h b/y2017/control_loops/superstructure/intake/intake.h
index 29899fb..f88393d 100644
--- a/y2017/control_loops/superstructure/intake/intake.h
+++ b/y2017/control_loops/superstructure/intake/intake.h
@@ -6,10 +6,7 @@
 #include "y2017/constants.h"
 #include "y2017/control_loops/superstructure/superstructure_goal_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
-namespace intake {
+namespace y2017::control_loops::superstructure::intake {
 
 class Intake {
  public:
@@ -64,9 +61,6 @@
       profiled_subsystem_;
 };
 
-}  // namespace intake
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure::intake
 
 #endif  // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_INTAKE_INTAKE_H_
diff --git a/y2017/control_loops/superstructure/shooter/shooter.h b/y2017/control_loops/superstructure/shooter/shooter.h
index 44da1dc..9cc515f 100644
--- a/y2017/control_loops/superstructure/shooter/shooter.h
+++ b/y2017/control_loops/superstructure/shooter/shooter.h
@@ -13,10 +13,7 @@
 #include "y2017/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2017/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
-namespace shooter {
+namespace y2017::control_loops::superstructure::shooter {
 
 class ShooterController {
  public:
@@ -109,9 +106,6 @@
   DISALLOW_COPY_AND_ASSIGN(Shooter);
 };
 
-}  // namespace shooter
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure::shooter
 
 #endif  // Y2017_CONTROL_LOOPS_SHOOTER_SHOOTER_H_
diff --git a/y2017/control_loops/superstructure/superstructure.h b/y2017/control_loops/superstructure/superstructure.h
index c10ebbd..9403d06 100644
--- a/y2017/control_loops/superstructure/superstructure.h
+++ b/y2017/control_loops/superstructure/superstructure.h
@@ -16,9 +16,7 @@
 #include "y2017/control_loops/superstructure/superstructure_status_generated.h"
 #include "y2017/control_loops/superstructure/vision_distance_average.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
+namespace y2017::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -63,8 +61,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure
 
 #endif  // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2017/control_loops/superstructure/vision_distance_average.h b/y2017/control_loops/superstructure/vision_distance_average.h
index 5f81586..6d1bdb6 100644
--- a/y2017/control_loops/superstructure/vision_distance_average.h
+++ b/y2017/control_loops/superstructure/vision_distance_average.h
@@ -8,9 +8,7 @@
 #include "aos/time/time.h"
 #include "y2017/vision/vision_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
+namespace y2017::control_loops::superstructure {
 
 namespace chrono = ::std::chrono;
 
@@ -61,8 +59,6 @@
   ::aos::RingBuffer<DistanceEvent, 25> data_;
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure
 
 #endif  // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_VISION_DISTANCE_AVERAGE_H_
diff --git a/y2017/control_loops/superstructure/vision_time_adjuster.h b/y2017/control_loops/superstructure/vision_time_adjuster.h
index 45dd8bb..b38876f 100644
--- a/y2017/control_loops/superstructure/vision_time_adjuster.h
+++ b/y2017/control_loops/superstructure/vision_time_adjuster.h
@@ -9,9 +9,7 @@
 #include "frc971/control_loops/drivetrain/drivetrain_status_generated.h"
 #include "y2017/vision/vision_generated.h"
 
-namespace y2017 {
-namespace control_loops {
-namespace superstructure {
+namespace y2017::control_loops::superstructure {
 
 class VisionTimeAdjuster {
  public:
@@ -74,8 +72,6 @@
   bool valid_ = false;
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2017
+}  // namespace y2017::control_loops::superstructure
 
 #endif  // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_VISION_TIME_ADJUSTER_H_
diff --git a/y2017/vision/target_finder.h b/y2017/vision/target_finder.h
index 34fd90d..5c89a6d 100644
--- a/y2017/vision/target_finder.h
+++ b/y2017/vision/target_finder.h
@@ -11,8 +11,7 @@
 using aos::vision::RangeImage;
 using aos::vision::Vector;
 
-namespace y2017 {
-namespace vision {
+namespace y2017::vision {
 
 // This polynomial exists in transpose space.
 struct TargetComponent {
@@ -84,7 +83,6 @@
   aos::vision::PixelLinesOverlay overlay_;
 };
 
-}  // namespace vision
-}  // namespace y2017
+}  // namespace y2017::vision
 
 #endif  // _Y2017_VISION_TARGET_FINDER_H_
diff --git a/y2018/actors/autonomous_actor.h b/y2018/actors/autonomous_actor.h
index 3e6be9f..dbeb621 100644
--- a/y2018/actors/autonomous_actor.h
+++ b/y2018/actors/autonomous_actor.h
@@ -14,8 +14,7 @@
 #include "y2018/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2018/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2018 {
-namespace actors {
+namespace y2018::actors {
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
  public:
@@ -226,7 +225,6 @@
   }
 };
 
-}  // namespace actors
-}  // namespace y2018
+}  // namespace y2018::actors
 
 #endif  // Y2018_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2018/constants.h b/y2018/constants.h
index 8bc5fbc..c0f0d7d 100644
--- a/y2018/constants.h
+++ b/y2018/constants.h
@@ -10,8 +10,7 @@
 #include "y2018/control_loops/superstructure/arm/arm_constants.h"
 #include "y2018/control_loops/superstructure/intake/intake_plant.h"
 
-namespace y2018 {
-namespace constants {
+namespace y2018::constants {
 
 // Has all of our "constants", except the ones that come from other places. The
 // ones which change between robots are put together with a workable way to
@@ -122,7 +121,6 @@
 // them.
 const Values &GetValuesForTeam(uint16_t team_number);
 
-}  // namespace constants
-}  // namespace y2018
+}  // namespace y2018::constants
 
 #endif  // Y2018_CONSTANTS_H_
diff --git a/y2018/control_loops/drivetrain/drivetrain_base.h b/y2018/control_loops/drivetrain/drivetrain_base.h
index 0592a25..85e60e7 100644
--- a/y2018/control_loops/drivetrain/drivetrain_base.h
+++ b/y2018/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2018 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2018::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2018
+}  // namespace y2018::control_loops::drivetrain
 
 #endif  // Y2018_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2018/control_loops/python/arm_bounds.h b/y2018/control_loops/python/arm_bounds.h
index c175616..f9645d5 100644
--- a/y2018/control_loops/python/arm_bounds.h
+++ b/y2018/control_loops/python/arm_bounds.h
@@ -13,8 +13,7 @@
 
 // Prototype level code to find the nearest point and distance to a polygon.
 
-namespace y2018 {
-namespace control_loops {
+namespace y2018::control_loops {
 
 typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
 typedef K::Point_2 Point;
@@ -239,7 +238,6 @@
 BoundsCheck MakeClippedArmSpace();
 BoundsCheck MakeFullArmSpace();
 
-}  // namespace control_loops
-}  // namespace y2018
+}  // namespace y2018::control_loops
 
 #endif  // Y2018_CONTORL_LOOPS_PYTHON_ARM_BOUNDS_H_
diff --git a/y2018/control_loops/superstructure/arm/arm.h b/y2018/control_loops/superstructure/arm/arm.h
index a9cf614..095ef1d 100644
--- a/y2018/control_loops/superstructure/arm/arm.h
+++ b/y2018/control_loops/superstructure/arm/arm.h
@@ -16,10 +16,7 @@
 using frc971::control_loops::arm::EKF;
 using frc971::control_loops::arm::TrajectoryFollower;
 
-namespace y2018 {
-namespace control_loops {
-namespace superstructure {
-namespace arm {
+namespace y2018::control_loops::superstructure::arm {
 
 class Arm {
  public:
@@ -141,9 +138,6 @@
   EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
 };
 
-}  // namespace arm
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2018
+}  // namespace y2018::control_loops::superstructure::arm
 
 #endif  // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_H_
diff --git a/y2018/control_loops/superstructure/arm/arm_constants.h b/y2018/control_loops/superstructure/arm/arm_constants.h
index 932da7a..12c1584 100644
--- a/y2018/control_loops/superstructure/arm/arm_constants.h
+++ b/y2018/control_loops/superstructure/arm/arm_constants.h
@@ -3,10 +3,7 @@
 
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 
-namespace y2018 {
-namespace control_loops {
-namespace superstructure {
-namespace arm {
+namespace y2018::control_loops::superstructure::arm {
 
 constexpr double kEfficiencyTweak = 0.95;
 constexpr double kStallTorque = 1.41 * kEfficiencyTweak;
@@ -44,9 +41,6 @@
     .num_distal_motors = 2.0,
 };
 
-}  // namespace arm
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2018
+}  // namespace y2018::control_loops::superstructure::arm
 
 #endif  // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_CONSTANTS_H_
diff --git a/y2018/control_loops/superstructure/intake/intake.h b/y2018/control_loops/superstructure/intake/intake.h
index bec5ff6..3b5c840 100644
--- a/y2018/control_loops/superstructure/intake/intake.h
+++ b/y2018/control_loops/superstructure/intake/intake.h
@@ -15,10 +15,7 @@
 #include "y2018/control_loops/superstructure/superstructure_position_generated.h"
 #include "y2018/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2018 {
-namespace control_loops {
-namespace superstructure {
-namespace intake {
+namespace y2018::control_loops::superstructure::intake {
 
 class IntakeController {
  public:
@@ -130,9 +127,6 @@
   double intake_last_position_ = 0.0;
 };
 
-}  // namespace intake
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2018
+}  // namespace y2018::control_loops::superstructure::intake
 
 #endif  // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_INTAKE_INTAKE_H_
diff --git a/y2018/control_loops/superstructure/superstructure.h b/y2018/control_loops/superstructure/superstructure.h
index 6621794..6abefa4 100644
--- a/y2018/control_loops/superstructure/superstructure.h
+++ b/y2018/control_loops/superstructure/superstructure.h
@@ -17,9 +17,7 @@
 #include "y2018/status_light_generated.h"
 #include "y2018/vision/vision_generated.h"
 
-namespace y2018 {
-namespace control_loops {
-namespace superstructure {
+namespace y2018::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -75,8 +73,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2018
+}  // namespace y2018::control_loops::superstructure
 
 #endif  // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2019/actors/auto_splines.h b/y2019/actors/auto_splines.h
index 7b56c11..4d6fbc1 100644
--- a/y2019/actors/auto_splines.h
+++ b/y2019/actors/auto_splines.h
@@ -11,8 +11,7 @@
 
 */
 
-namespace y2019 {
-namespace actors {
+namespace y2019::actors {
 
 class AutonomousSplines {
  public:
@@ -88,7 +87,6 @@
           *builder);
 };
 
-}  // namespace actors
-}  // namespace y2019
+}  // namespace y2019::actors
 
 #endif  // Y2019_ACTORS_AUTO_SPLINES_H_
diff --git a/y2019/actors/autonomous_actor.h b/y2019/actors/autonomous_actor.h
index 99b1364..53aa9de 100644
--- a/y2019/actors/autonomous_actor.h
+++ b/y2019/actors/autonomous_actor.h
@@ -13,8 +13,7 @@
 #include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2019/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2019 {
-namespace actors {
+namespace y2019::actors {
 
 using ::frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemGoal;
 
@@ -250,7 +249,6 @@
       superstructure_status_fetcher_;
 };
 
-}  // namespace actors
-}  // namespace y2019
+}  // namespace y2019::actors
 
 #endif  // Y2019_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2019/constants.h b/y2019/constants.h
index a36e4b3..0555d4e 100644
--- a/y2019/constants.h
+++ b/y2019/constants.h
@@ -17,8 +17,7 @@
 #include "y2019/control_loops/superstructure/stilts/stilts_plant.h"
 #include "y2019/control_loops/superstructure/wrist/wrist_plant.h"
 
-namespace y2019 {
-namespace constants {
+namespace y2019::constants {
 
 // Has all of our "constants", except the ones that come from other places. The
 // ones which change between robots are put together with a workable way to
@@ -215,7 +214,6 @@
 // them.
 const Values &GetValuesForTeam(uint16_t team_number);
 
-}  // namespace constants
-}  // namespace y2019
+}  // namespace y2019::constants
 
 #endif  // Y2019_CONSTANTS_H_
diff --git a/y2019/control_loops/drivetrain/drivetrain_base.h b/y2019/control_loops/drivetrain/drivetrain_base.h
index 3a8bd6b..80aa1a8 100644
--- a/y2019/control_loops/drivetrain/drivetrain_base.h
+++ b/y2019/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::drivetrain
 
 #endif  // Y2019_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2019/control_loops/drivetrain/event_loop_localizer.h b/y2019/control_loops/drivetrain/event_loop_localizer.h
index 0847479..61caf87 100644
--- a/y2019/control_loops/drivetrain/event_loop_localizer.h
+++ b/y2019/control_loops/drivetrain/event_loop_localizer.h
@@ -7,9 +7,7 @@
 #include "y2019/control_loops/drivetrain/localizer.h"
 #include "y2019/control_loops/drivetrain/target_selector.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
 
 // Wrap the localizer to allow it to fetch camera frames from the queues.
 // TODO(james): Provide a way of resetting the current position and
@@ -89,7 +87,5 @@
 ::std::array<EventLoopLocalizer::Camera, constants::Values::kNumCameras>
 MakeCameras(EventLoopLocalizer::Pose *pose);
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::drivetrain
 #endif  // Y2019_CONTROL_LOOPS_DRIVETRAIN_EVENT_LOOP_LOCALIZER_H_
diff --git a/y2019/control_loops/drivetrain/localizer.h b/y2019/control_loops/drivetrain/localizer.h
index 2e7c3a5..f4c7a8a 100644
--- a/y2019/control_loops/drivetrain/localizer.h
+++ b/y2019/control_loops/drivetrain/localizer.h
@@ -17,8 +17,7 @@
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
 
-namespace y2019 {
-namespace control_loops {
+namespace y2019::control_loops {
 
 template <int num_cameras, int num_targets, int num_obstacles,
           int max_targets_per_frame, typename Scalar = double>
@@ -576,7 +575,6 @@
 #pragma GCC diagnostic pop
 #endif
 
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops
 
 #endif  // Y2019_CONTROL_LOOPS_DRIVETRAIN_LOCALIZATER_H_
diff --git a/y2019/control_loops/drivetrain/target_selector.h b/y2019/control_loops/drivetrain/target_selector.h
index b8d89c7..ba6d970 100644
--- a/y2019/control_loops/drivetrain/target_selector.h
+++ b/y2019/control_loops/drivetrain/target_selector.h
@@ -8,8 +8,7 @@
 #include "y2019/control_loops/drivetrain/target_selector_generated.h"
 #include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
 
-namespace y2019 {
-namespace control_loops {
+namespace y2019::control_loops {
 
 // A class to identify which target the driver is currently driving towards so
 // that we can guide them into the target.
@@ -75,7 +74,6 @@
   drivetrain::SelectionHint target_hint_ = drivetrain::SelectionHint::NONE;
 };
 
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops
 
 #endif  // Y2019_CONTROL_LOOPS_DRIVETRAIN_TARGET_SELECTOR_H_
diff --git a/y2019/control_loops/superstructure/collision_avoidance.h b/y2019/control_loops/superstructure/collision_avoidance.h
index ac88cec..e872e8c 100644
--- a/y2019/control_loops/superstructure/collision_avoidance.h
+++ b/y2019/control_loops/superstructure/collision_avoidance.h
@@ -9,9 +9,7 @@
 #include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2019/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace superstructure {
+namespace y2019::control_loops::superstructure {
 
 // CollisionAvoidance computes the min and max allowable ranges for various
 // subsystems to avoid collisions.  It also shoves the elevator up to let the
@@ -108,8 +106,6 @@
   double max_intake_goal_;
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::superstructure
 
 #endif  // Y2019_CONTROL_LOOPS_SUPERSTRUCTURE_COLLISION_AVOIDANCE_H_
diff --git a/y2019/control_loops/superstructure/superstructure.h b/y2019/control_loops/superstructure/superstructure.h
index 4d59132..ab80eb4 100644
--- a/y2019/control_loops/superstructure/superstructure.h
+++ b/y2019/control_loops/superstructure/superstructure.h
@@ -16,9 +16,7 @@
 #include "y2019/control_loops/superstructure/vacuum.h"
 #include "y2019/status_light_generated.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace superstructure {
+namespace y2019::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -68,8 +66,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::superstructure
 
 #endif  // Y2019_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2019/control_loops/superstructure/vacuum.h b/y2019/control_loops/superstructure/vacuum.h
index c4671ab..58ad109 100644
--- a/y2019/control_loops/superstructure/vacuum.h
+++ b/y2019/control_loops/superstructure/vacuum.h
@@ -7,9 +7,7 @@
 #include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2019/control_loops/superstructure/superstructure_output_generated.h"
 
-namespace y2019 {
-namespace control_loops {
-namespace superstructure {
+namespace y2019::control_loops::superstructure {
 
 class Vacuum {
  public:
@@ -55,8 +53,6 @@
   DISALLOW_COPY_AND_ASSIGN(Vacuum);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2019
+}  // namespace y2019::control_loops::superstructure
 
 #endif  // Y2019_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2019/jevois/camera/image_stream.h b/y2019/jevois/camera/image_stream.h
index f1ab0af..5b29070 100644
--- a/y2019/jevois/camera/image_stream.h
+++ b/y2019/jevois/camera/image_stream.h
@@ -7,8 +7,7 @@
 #include "aos/vision/image/camera_params.pb.h"
 #include "y2019/jevois/camera/reader.h"
 
-namespace y2019 {
-namespace camera {
+namespace y2019::camera {
 
 // Converts a camera reader into a virtual base class that calls ProcessImage
 // on each new image.
@@ -48,7 +47,6 @@
   std::unique_ptr<Reader> reader_;
 };
 
-}  // namespace camera
-}  // namespace y2019
+}  // namespace y2019::camera
 
 #endif  // Y2019_JEVOIS_CAMERA_IMAGE_STREAM_H_
diff --git a/y2019/jevois/camera/reader.h b/y2019/jevois/camera/reader.h
index ef4f34d..77f0799 100644
--- a/y2019/jevois/camera/reader.h
+++ b/y2019/jevois/camera/reader.h
@@ -10,8 +10,7 @@
 #include "aos/vision/image/camera_params.pb.h"
 #include "aos/vision/image/image_types.h"
 
-namespace y2019 {
-namespace camera {
+namespace y2019::camera {
 
 aos::vision::CameraParams MakeCameraParams(int32_t width, int32_t height,
                                            int32_t exposure, int32_t brightness,
@@ -65,7 +64,6 @@
   aos::vision::CameraParams params_;
 };
 
-}  // namespace camera
-}  // namespace y2019
+}  // namespace y2019::camera
 
 #endif  // AOS_VISION_IMAGE_READER_H_
diff --git a/y2019/jevois/cobs.h b/y2019/jevois/cobs.h
index c429622..271a41f 100644
--- a/y2019/jevois/cobs.h
+++ b/y2019/jevois/cobs.h
@@ -11,8 +11,7 @@
 // Stuffing data. <http://www.stuartcheshire.org/papers/cobsforton.pdf> has
 // details on what this entails and why it's a good idea.
 
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
 
 constexpr size_t CobsMaxEncodedSize(size_t decoded_size) {
   return decoded_size + ((decoded_size + 253) / 254);
@@ -213,7 +212,6 @@
   }
 }
 
-}  // namespace jevois
-}  // namespace frc971
+}  // namespace frc971::jevois
 
 #endif  // Y2019_JEVOIS_COBS_H_
diff --git a/y2019/jevois/spi.h b/y2019/jevois/spi.h
index 62e5ea7..fd999de 100644
--- a/y2019/jevois/spi.h
+++ b/y2019/jevois/spi.h
@@ -14,8 +14,7 @@
 //
 // Our SPI transfers are fixed-size to simplify everything.
 
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
 
 constexpr size_t spi_transfer_size() {
   // The teensy->RoboRIO side is way bigger, so just calculate that.
@@ -33,7 +32,6 @@
 std::optional<RoborioToTeensy> SpiUnpackToTeensy(
     absl::Span<const char> transfer);
 
-}  // namespace jevois
-}  // namespace frc971
+}  // namespace frc971::jevois
 
 #endif  // Y2019_JEVOIS_SPI_H_
diff --git a/y2019/jevois/structures.h b/y2019/jevois/structures.h
index 85cca21..a8d2843 100644
--- a/y2019/jevois/structures.h
+++ b/y2019/jevois/structures.h
@@ -11,8 +11,7 @@
 #include "aos/containers/sized_array.h"
 #include "aos/time/time.h"
 
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
 
 // The overall flow to get data to the roboRIO consists of:
 //  1.  Camera captures a frame and grabs an absolute timestamp.
@@ -233,7 +232,6 @@
   CameraCommand camera_command;
 };
 
-}  // namespace jevois
-}  // namespace frc971
+}  // namespace frc971::jevois
 
 #endif  // Y2019_JEVOIS_STRUCTURES_H_
diff --git a/y2019/jevois/uart.h b/y2019/jevois/uart.h
index d3eebee..7bacbd1 100644
--- a/y2019/jevois/uart.h
+++ b/y2019/jevois/uart.h
@@ -12,8 +12,7 @@
 // This file manages serializing and deserializing the various structures for
 // transport via UART.
 
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
 
 constexpr size_t uart_to_teensy_size() {
   return 1 /* number of targets */ +
@@ -38,7 +37,6 @@
 std::optional<CameraCalibration> UartUnpackToCamera(
     absl::Span<const char> buffer);
 
-}  // namespace jevois
-}  // namespace frc971
+}  // namespace frc971::jevois
 
 #endif  // Y2019_JEVOIS_UART_H_
diff --git a/y2019/joystick_angle.h b/y2019/joystick_angle.h
index dfd8bb9..2dad968 100644
--- a/y2019/joystick_angle.h
+++ b/y2019/joystick_angle.h
@@ -6,9 +6,7 @@
 using ::frc971::input::driver_station::Data;
 using ::frc971::input::driver_station::JoystickAxis;
 
-namespace y2019 {
-namespace input {
-namespace joysticks {
+namespace y2019::input::joysticks {
 bool AngleCloseTo(double angle, double near, double range);
 
 enum class JoystickAngle {
@@ -25,8 +23,6 @@
                                   const JoystickAxis &y_axis, const Data &data);
 JoystickAngle GetJoystickPosition(float x_axis, float y_axis);
 
-}  // namespace joysticks
-}  // namespace input
-}  // namespace y2019
+}  // namespace y2019::input::joysticks
 
 #endif  // Y2019_JOYSTICK_ANGLE_H_
diff --git a/y2019/vision/constants.h b/y2019/vision/constants.h
index 959f5b7..7078d6b 100644
--- a/y2019/vision/constants.h
+++ b/y2019/vision/constants.h
@@ -6,8 +6,7 @@
 #include <cstdint>
 #include <string>
 
-namespace y2019 {
-namespace vision {
+namespace y2019::vision {
 
 // Position of the idealized camera in 3d space.
 struct CameraGeometry {
@@ -107,7 +106,6 @@
 void DumpCameraConstants(const char *fname, int camera_id,
                          const CameraCalibration &value);
 
-}  // namespace vision
-}  // namespace y2019
+}  // namespace y2019::vision
 
 #endif  // _Y2019_VISION_CONSTANTS_H_
diff --git a/y2019/vision/image_writer.h b/y2019/vision/image_writer.h
index 1192368..27dcb4a 100644
--- a/y2019/vision/image_writer.h
+++ b/y2019/vision/image_writer.h
@@ -5,8 +5,7 @@
 
 #include "aos/vision/image/image_types.h"
 
-namespace y2019 {
-namespace vision {
+namespace y2019::vision {
 
 class ImageWriter {
  public:
@@ -23,7 +22,6 @@
   unsigned int image_count_ = 0;
 };
 
-}  // namespace vision
-}  // namespace y2019
+}  // namespace y2019::vision
 
 #endif  // Y2019_VISION_IMAGE_WRITER_H_
diff --git a/y2019/vision/target_finder.h b/y2019/vision/target_finder.h
index fdcfbde..20bf87a 100644
--- a/y2019/vision/target_finder.h
+++ b/y2019/vision/target_finder.h
@@ -16,8 +16,7 @@
 class Context;
 
 }  // namespace ceres
-namespace y2019 {
-namespace vision {
+namespace y2019::vision {
 
 using aos::vision::BlobList;
 using aos::vision::ContourNode;
@@ -115,7 +114,6 @@
   int current_exposure_ = 0;
 };
 
-}  // namespace vision
-}  // namespace y2019
+}  // namespace y2019::vision
 
 #endif
diff --git a/y2019/vision/target_types.h b/y2019/vision/target_types.h
index 5019646..fb57b71 100644
--- a/y2019/vision/target_types.h
+++ b/y2019/vision/target_types.h
@@ -7,8 +7,7 @@
 #include "aos/vision/math/vector.h"
 #include "y2019/vision/constants.h"
 
-namespace y2019 {
-namespace vision {
+namespace y2019::vision {
 
 // This polynomial exists in transpose space.
 struct TargetComponent {
@@ -239,7 +238,6 @@
                                   240.0 - res.y() * scale);
 }
 
-}  // namespace vision
-}  // namespace y2019
+}  // namespace y2019::vision
 
 #endif
diff --git a/y2020/actors/auto_splines.h b/y2020/actors/auto_splines.h
index e7bef0a..396fe4b 100644
--- a/y2020/actors/auto_splines.h
+++ b/y2020/actors/auto_splines.h
@@ -13,8 +13,7 @@
 
 */
 
-namespace y2020 {
-namespace actors {
+namespace y2020::actors {
 
 class AutonomousSplines {
  public:
@@ -89,7 +88,6 @@
   aos::FlatbufferDetachedBuffer<frc971::MultiSpline> far_side_fender_;
 };
 
-}  // namespace actors
-}  // namespace y2020
+}  // namespace y2020::actors
 
 #endif  // y2020_ACTORS_AUTO_SPLINES_H_
diff --git a/y2020/actors/autonomous_actor.h b/y2020/actors/autonomous_actor.h
index abf9ea0..9368a8e 100644
--- a/y2020/actors/autonomous_actor.h
+++ b/y2020/actors/autonomous_actor.h
@@ -11,8 +11,7 @@
 #include "y2020/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2020/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2020 {
-namespace actors {
+namespace y2020::actors {
 
 using frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemGoal;
 
@@ -104,7 +103,6 @@
   std::optional<Eigen::Vector3d> starting_position_;
 };
 
-}  // namespace actors
-}  // namespace y2020
+}  // namespace y2020::actors
 
 #endif  // y2020_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2020/constants.h b/y2020/constants.h
index 7332b4f..efae264 100644
--- a/y2020/constants.h
+++ b/y2020/constants.h
@@ -21,8 +21,7 @@
 
 using ::frc971::shooter_interpolation::InterpolationTable;
 
-namespace y2020 {
-namespace constants {
+namespace y2020::constants {
 
 struct Values {
   static const uint16_t kCompTeamNumber = 971;
@@ -241,7 +240,6 @@
 // InitValues() before calling this.
 const Values &GetValues();
 
-}  // namespace constants
-}  // namespace y2020
+}  // namespace y2020::constants
 
 #endif  // y2020_CONSTANTS_H_
diff --git a/y2020/control_loops/drivetrain/drivetrain_base.h b/y2020/control_loops/drivetrain/drivetrain_base.h
index e35c2af..321e7cc 100644
--- a/y2020/control_loops/drivetrain/drivetrain_base.h
+++ b/y2020/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2020 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2020::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2020
+}  // namespace y2020::control_loops::drivetrain
 
 #endif  // y2020_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2020/control_loops/drivetrain/localizer.h b/y2020/control_loops/drivetrain/localizer.h
index de57091..bc12fd6 100644
--- a/y2020/control_loops/drivetrain/localizer.h
+++ b/y2020/control_loops/drivetrain/localizer.h
@@ -13,9 +13,7 @@
 #include "y2020/control_loops/superstructure/superstructure_status_generated.h"
 #include "y2020/vision/sift/sift_generated.h"
 
-namespace y2020 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2020::control_loops::drivetrain {
 
 // This class handles the localization for the 2020 robot. In order to handle
 // camera updates, we get the ImageMatchResult message from the cameras and then
@@ -164,8 +162,6 @@
   Statistics statistics_;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2020
+}  // namespace y2020::control_loops::drivetrain
 
 #endif  // Y2020_CONTROL_LOOPS_DRIVETRAIN_LOCALIZER_H_
diff --git a/y2020/control_loops/superstructure/shooter/shooter.h b/y2020/control_loops/superstructure/shooter/shooter.h
index a1d7be3..3280c69 100644
--- a/y2020/control_loops/superstructure/shooter/shooter.h
+++ b/y2020/control_loops/superstructure/shooter/shooter.h
@@ -9,10 +9,7 @@
 #include "y2020/control_loops/superstructure/superstructure_position_generated.h"
 #include "y2020/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2020 {
-namespace control_loops {
-namespace superstructure {
-namespace shooter {
+namespace y2020::control_loops::superstructure::shooter {
 
 // Handles all flywheels together.
 class Shooter {
@@ -60,9 +57,6 @@
   DISALLOW_COPY_AND_ASSIGN(Shooter);
 };
 
-}  // namespace shooter
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2020
+}  // namespace y2020::control_loops::superstructure::shooter
 
 #endif  // Y2020_CONTROL_LOOPS_SHOOTER_SHOOTER_H_
diff --git a/y2020/control_loops/superstructure/superstructure.h b/y2020/control_loops/superstructure/superstructure.h
index 8a00bf0..ff38770 100644
--- a/y2020/control_loops/superstructure/superstructure.h
+++ b/y2020/control_loops/superstructure/superstructure.h
@@ -17,9 +17,7 @@
 #include "y2020/control_loops/superstructure/superstructure_status_generated.h"
 #include "y2020/control_loops/superstructure/turret/aiming.h"
 
-namespace y2020 {
-namespace control_loops {
-namespace superstructure {
+namespace y2020::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -88,8 +86,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2020
+}  // namespace y2020::control_loops::superstructure
 
 #endif  // y2020_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2020/control_loops/superstructure/turret/aiming.h b/y2020/control_loops/superstructure/turret/aiming.h
index 45f690f..98ebb2f 100644
--- a/y2020/control_loops/superstructure/turret/aiming.h
+++ b/y2020/control_loops/superstructure/turret/aiming.h
@@ -9,10 +9,7 @@
 #include "frc971/input/joystick_state_generated.h"
 #include "y2020/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2020 {
-namespace control_loops {
-namespace superstructure {
-namespace turret {
+namespace y2020::control_loops::superstructure::turret {
 
 // Returns the port that we want to score on given our current alliance. The yaw
 // of the port will be such that the positive x axis points out the back of the
@@ -68,8 +65,5 @@
   Eigen::Matrix<double, 2, 2> Tlr_to_la_;
 };
 
-}  // namespace turret
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2020
+}  // namespace y2020::control_loops::superstructure::turret
 #endif  // y2020_CONTROL_LOOPS_SUPERSTRUCTURE_TURRET_AIMING_H_
diff --git a/y2020/vision/camera_reader.h b/y2020/vision/camera_reader.h
index 9a8cf6f..81dfa1a 100644
--- a/y2020/vision/camera_reader.h
+++ b/y2020/vision/camera_reader.h
@@ -17,8 +17,7 @@
 #include "y2020/vision/sift/sift_training_generated.h"
 #include "y2020/vision/tools/python_code/sift_training_data.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 class CameraReader {
  public:
@@ -170,6 +169,5 @@
       new frc971::vision::SIFT971_Impl()};
 };
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 #endif  // Y2020_VISION_CAMERA_READER_H_
diff --git a/y2020/vision/sift/fast_gaussian.h b/y2020/vision/sift/fast_gaussian.h
index f243e53..d9a5f07 100644
--- a/y2020/vision/sift/fast_gaussian.h
+++ b/y2020/vision/sift/fast_gaussian.h
@@ -8,8 +8,7 @@
 
 #include "HalideBuffer.h"
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 // Returns a Halide buffer representing the data in mat.
 template <typename T>
@@ -39,7 +38,6 @@
 void FastGaussianAndSubtract(const cv::Mat &source, cv::Mat *blurred,
                              cv::Mat *difference, double sigma);
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // Y2020_VISION_SIFT_FAST_GAUSSIAN_H_
diff --git a/y2020/vision/sift/get_gaussian_kernel.h b/y2020/vision/sift/get_gaussian_kernel.h
index c13c588..9252e24 100644
--- a/y2020/vision/sift/get_gaussian_kernel.h
+++ b/y2020/vision/sift/get_gaussian_kernel.h
@@ -4,8 +4,7 @@
 #include <cmath>
 #include <vector>
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 // A reimplementation of cv::getGaussianKernel for CV_32F without external
 // dependencies. See fast_gaussian_halide_generator.sh for details why we want
@@ -24,7 +23,6 @@
   return result;
 }
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // Y2020_VISION_SIFT_GET_GAUSSIAN_KERNEL_H_
diff --git a/y2020/vision/sift/sift971.h b/y2020/vision/sift/sift971.h
index b351d70..a235afb 100644
--- a/y2020/vision/sift/sift971.h
+++ b/y2020/vision/sift/sift971.h
@@ -6,8 +6,7 @@
 #include <opencv2/core/types.hpp>
 #include <opencv2/features2d.hpp>
 
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
 
 /*!
  SIFT implementation.
@@ -66,7 +65,6 @@
   bool use_fast_pyramid_difference_ = true;
 };
 
-}  // namespace vision
-}  // namespace frc971
+}  // namespace frc971::vision
 
 #endif  // Y2020_VISION_SIFT_SIFT971_H_
diff --git a/y2021_bot3/actors/auto_splines.h b/y2021_bot3/actors/auto_splines.h
index 9984c15..9225a49 100644
--- a/y2021_bot3/actors/auto_splines.h
+++ b/y2021_bot3/actors/auto_splines.h
@@ -11,8 +11,7 @@
 
 */
 
-namespace y2021_bot3 {
-namespace actors {
+namespace y2021_bot3::actors {
 
 class AutonomousSplines {
  public:
@@ -22,7 +21,6 @@
       aos::Sender<frc971::control_loops::drivetrain::Goal>::Builder *builder);
 };
 
-}  // namespace actors
-}  // namespace y2021_bot3
+}  // namespace y2021_bot3::actors
 
 #endif  // Y2021_BOT3_ACTORS_AUTO_SPLINES_H_
diff --git a/y2021_bot3/actors/autonomous_actor.h b/y2021_bot3/actors/autonomous_actor.h
index 5fa509b..bcf58ee 100644
--- a/y2021_bot3/actors/autonomous_actor.h
+++ b/y2021_bot3/actors/autonomous_actor.h
@@ -7,8 +7,7 @@
 #include "frc971/control_loops/control_loops_generated.h"
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2021_bot3 {
-namespace actors {
+namespace y2021_bot3::actors {
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
  public:
@@ -21,7 +20,6 @@
   void Reset();
 };
 
-}  // namespace actors
-}  // namespace y2021_bot3
+}  // namespace y2021_bot3::actors
 
 #endif  // Y2021_BOT3_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2021_bot3/constants.h b/y2021_bot3/constants.h
index f0cbacb..a6d7957 100644
--- a/y2021_bot3/constants.h
+++ b/y2021_bot3/constants.h
@@ -10,8 +10,7 @@
 #include "frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h"
 #include "y2021_bot3/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 
-namespace y2021_bot3 {
-namespace constants {
+namespace y2021_bot3::constants {
 
 struct Values {
   static const int kZeroingSampleSize = 200;
@@ -42,7 +41,6 @@
 // them.
 const Values &GetValuesForTeam(uint16_t team_number);
 
-}  // namespace constants
-}  // namespace y2021_bot3
+}  // namespace y2021_bot3::constants
 
 #endif  // Y2021_BOT3_CONSTANTS_H_
diff --git a/y2021_bot3/control_loops/drivetrain/drivetrain_base.h b/y2021_bot3/control_loops/drivetrain/drivetrain_base.h
index f796d4e..c9a06c6 100644
--- a/y2021_bot3/control_loops/drivetrain/drivetrain_base.h
+++ b/y2021_bot3/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2021_bot3 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2021_bot3::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2021_bot3
+}  // namespace y2021_bot3::control_loops::drivetrain
 
 #endif  // Y2021_BOT3_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2021_bot3/control_loops/superstructure/superstructure.h b/y2021_bot3/control_loops/superstructure/superstructure.h
index 23dd801..4a0d701 100644
--- a/y2021_bot3/control_loops/superstructure/superstructure.h
+++ b/y2021_bot3/control_loops/superstructure/superstructure.h
@@ -9,9 +9,7 @@
 #include "y2021_bot3/control_loops/superstructure/superstructure_position_generated.h"
 #include "y2021_bot3/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2021_bot3 {
-namespace control_loops {
-namespace superstructure {
+namespace y2021_bot3::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -28,8 +26,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2021_bot3
+}  // namespace y2021_bot3::control_loops::superstructure
 
 #endif  // Y2021_BOT3_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2022/actors/auto_splines.h b/y2022/actors/auto_splines.h
index 2f5c399..42760e5 100644
--- a/y2022/actors/auto_splines.h
+++ b/y2022/actors/auto_splines.h
@@ -13,8 +13,7 @@
 
 */
 
-namespace y2022 {
-namespace actors {
+namespace y2022::actors {
 
 class AutonomousSplines {
  public:
@@ -73,7 +72,6 @@
   aos::FlatbufferDetachedBuffer<frc971::MultiSpline> spline_two2_;
 };
 
-}  // namespace actors
-}  // namespace y2022
+}  // namespace y2022::actors
 
 #endif  // Y2022_ACTORS_AUTO_SPLINES_H_
diff --git a/y2022/actors/autonomous_actor.h b/y2022/actors/autonomous_actor.h
index b36e010..1dfdcdf 100644
--- a/y2022/actors/autonomous_actor.h
+++ b/y2022/actors/autonomous_actor.h
@@ -11,8 +11,7 @@
 #include "y2022/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2022/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2022 {
-namespace actors {
+namespace y2022::actors {
 
 using control_loops::superstructure::RequestedIntake;
 using frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemGoal;
@@ -106,7 +105,6 @@
   std::optional<Eigen::Vector3d> starting_position_;
 };
 
-}  // namespace actors
-}  // namespace y2022
+}  // namespace y2022::actors
 
 #endif  // Y2022_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2022/constants.h b/y2022/constants.h
index f27b6cd..b89613f 100644
--- a/y2022/constants.h
+++ b/y2022/constants.h
@@ -18,8 +18,7 @@
 
 using ::frc971::shooter_interpolation::InterpolationTable;
 
-namespace y2022 {
-namespace constants {
+namespace y2022::constants {
 
 constexpr uint16_t kCompTeamNumber = 971;
 constexpr uint16_t kPracticeTeamNumber = 9971;
@@ -276,7 +275,6 @@
 // Calls MakeValues with aos::network::GetTeamNumber()
 Values MakeValues();
 
-}  // namespace constants
-}  // namespace y2022
+}  // namespace y2022::constants
 
 #endif  // Y2022_CONSTANTS_H_
diff --git a/y2022/control_loops/drivetrain/drivetrain_base.h b/y2022/control_loops/drivetrain/drivetrain_base.h
index 1f4cfe4..5568698 100644
--- a/y2022/control_loops/drivetrain/drivetrain_base.h
+++ b/y2022/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2022 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2022::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2022
+}  // namespace y2022::control_loops::drivetrain
 
 #endif  // Y2022_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2022/control_loops/superstructure/collision_avoidance.h b/y2022/control_loops/superstructure/collision_avoidance.h
index 1d6f89c..034f72f 100644
--- a/y2022/control_loops/superstructure/collision_avoidance.h
+++ b/y2022/control_loops/superstructure/collision_avoidance.h
@@ -8,9 +8,7 @@
 #include "y2022/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2022/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2022 {
-namespace control_loops {
-namespace superstructure {
+namespace y2022::control_loops::superstructure {
 
 // Returns the wrapped angle as well as number of wraps (positive or negative).
 // The returned angle will be inside [0.0, 2 * M_PI).
@@ -146,8 +144,6 @@
   double max_turret_goal_;
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2022
+}  // namespace y2022::control_loops::superstructure
 
 #endif
diff --git a/y2022/control_loops/superstructure/superstructure.h b/y2022/control_loops/superstructure/superstructure.h
index 3e10956..f081589 100644
--- a/y2022/control_loops/superstructure/superstructure.h
+++ b/y2022/control_loops/superstructure/superstructure.h
@@ -18,9 +18,7 @@
 #include "y2022/control_loops/superstructure/turret/aiming.h"
 #include "y2022/vision/ball_color_generated.h"
 
-namespace y2022 {
-namespace control_loops {
-namespace superstructure {
+namespace y2022::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -113,8 +111,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2022
+}  // namespace y2022::control_loops::superstructure
 
 #endif  // Y2022_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2022/vision/ball_color.h b/y2022/vision/ball_color.h
index 695d2e3..824cf30 100644
--- a/y2022/vision/ball_color.h
+++ b/y2022/vision/ball_color.h
@@ -9,8 +9,7 @@
 #include "y2022/constants.h"
 #include "y2022/vision/ball_color_generated.h"
 
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
 
 using namespace frc971::vision;
 
@@ -62,6 +61,5 @@
   const cv::Rect reference_blue_;
   const cv::Rect ball_location_;
 };
-}  // namespace vision
-}  // namespace y2022
+}  // namespace y2022::vision
 #endif
diff --git a/y2022/vision/blob_detector.h b/y2022/vision/blob_detector.h
index a60316a..93bba09 100644
--- a/y2022/vision/blob_detector.h
+++ b/y2022/vision/blob_detector.h
@@ -4,8 +4,7 @@
 #include <opencv2/features2d.hpp>
 #include <opencv2/imgproc.hpp>
 
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
 
 class BlobDetector {
  public:
@@ -52,7 +51,6 @@
 
   static void ExtractBlobs(cv::Mat bgr_image, BlobResult *blob_result);
 };
-}  // namespace vision
-}  // namespace y2022
+}  // namespace y2022::vision
 
 #endif  // Y2022_BLOB_DETECTOR_H_
diff --git a/y2022/vision/camera_reader.h b/y2022/vision/camera_reader.h
index 8782886..54fcb30 100644
--- a/y2022/vision/camera_reader.h
+++ b/y2022/vision/camera_reader.h
@@ -20,8 +20,7 @@
 #include "y2022/vision/target_estimate_generated.h"
 #include "y2022/vision/target_estimator.h"
 
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
 
 using namespace frc971::vision;
 using frc971::controls::LedOutput;
@@ -163,6 +162,5 @@
   GPIOControl gpio_disable_control_;
 };
 
-}  // namespace vision
-}  // namespace y2022
+}  // namespace y2022::vision
 #endif  // Y2022_VISION_CAMERA_READER_H_
diff --git a/y2022/vision/gpio.h b/y2022/vision/gpio.h
index 6ed7328..d7b44d4 100644
--- a/y2022/vision/gpio.h
+++ b/y2022/vision/gpio.h
@@ -14,8 +14,7 @@
 
 #include "aos/init.h"
 
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
 
 using namespace frc971::vision;
 
@@ -353,6 +352,5 @@
   aos::TimerHandler *const pwm_timer_;
 };
 
-}  // namespace vision
-}  // namespace y2022
+}  // namespace y2022::vision
 #endif  // Y2022_VISION_GPIO_H_
diff --git a/y2022_bot3/actors/auto_splines.h b/y2022_bot3/actors/auto_splines.h
index c4c32fb..a655e2a 100644
--- a/y2022_bot3/actors/auto_splines.h
+++ b/y2022_bot3/actors/auto_splines.h
@@ -13,8 +13,7 @@
 
 */
 
-namespace y2022_bot3 {
-namespace actors {
+namespace y2022_bot3::actors {
 
 class AutonomousSplines {
  public:
@@ -36,7 +35,6 @@
   aos::FlatbufferDetachedBuffer<frc971::MultiSpline> test_spline_;
 };
 
-}  // namespace actors
-}  // namespace y2022_bot3
+}  // namespace y2022_bot3::actors
 
 #endif  // Y2022_BOT3_ACTORS_AUTO_SPLINES_H_
diff --git a/y2022_bot3/actors/autonomous_actor.h b/y2022_bot3/actors/autonomous_actor.h
index 72262fb..a4eaa29 100644
--- a/y2022_bot3/actors/autonomous_actor.h
+++ b/y2022_bot3/actors/autonomous_actor.h
@@ -11,8 +11,7 @@
 #include "y2022_bot3/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2022_bot3/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2022_bot3 {
-namespace actors {
+namespace y2022_bot3::actors {
 
 using frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemGoal;
 
@@ -60,7 +59,6 @@
   std::optional<Eigen::Vector3d> starting_position_;
 };
 
-}  // namespace actors
-}  // namespace y2022_bot3
+}  // namespace y2022_bot3::actors
 
 #endif  // Y2022_BOT3_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2022_bot3/constants.h b/y2022_bot3/constants.h
index a87930f..33c2b1a 100644
--- a/y2022_bot3/constants.h
+++ b/y2022_bot3/constants.h
@@ -16,8 +16,7 @@
 
 using ::frc971::shooter_interpolation::InterpolationTable;
 
-namespace y2022_bot3 {
-namespace constants {
+namespace y2022_bot3::constants {
 
 struct Values {
   static const int kZeroingSampleSize = 200;
@@ -119,7 +118,6 @@
 // Calls MakeValues with aos::network::GetTeamNumber()
 Values MakeValues();
 
-}  // namespace constants
-}  // namespace y2022_bot3
+}  // namespace y2022_bot3::constants
 
 #endif  // Y2022_BOT3_CONSTANTS_H_
diff --git a/y2022_bot3/control_loops/drivetrain/drivetrain_base.h b/y2022_bot3/control_loops/drivetrain/drivetrain_base.h
index 04c6c86..41de094 100644
--- a/y2022_bot3/control_loops/drivetrain/drivetrain_base.h
+++ b/y2022_bot3/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2022_bot3 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2022_bot3::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2022_bot3
+}  // namespace y2022_bot3::control_loops::drivetrain
 
 #endif  // Y2022_BOT3_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2022_bot3/control_loops/superstructure/superstructure.h b/y2022_bot3/control_loops/superstructure/superstructure.h
index 13d5dec..4522dfd 100644
--- a/y2022_bot3/control_loops/superstructure/superstructure.h
+++ b/y2022_bot3/control_loops/superstructure/superstructure.h
@@ -11,9 +11,7 @@
 #include "y2022_bot3/control_loops/superstructure/superstructure_position_generated.h"
 #include "y2022_bot3/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2022_bot3 {
-namespace control_loops {
-namespace superstructure {
+namespace y2022_bot3::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -63,8 +61,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2022_bot3
+}  // namespace y2022_bot3::control_loops::superstructure
 
 #endif  // Y2022_BOT3_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2023/autonomous/auto_splines.h b/y2023/autonomous/auto_splines.h
index 6921e64..13c24c0 100644
--- a/y2023/autonomous/auto_splines.h
+++ b/y2023/autonomous/auto_splines.h
@@ -13,8 +13,7 @@
 
 */
 
-namespace y2023 {
-namespace autonomous {
+namespace y2023::autonomous {
 
 class AutonomousSplines {
  public:
@@ -95,7 +94,6 @@
   aos::FlatbufferDetachedBuffer<frc971::MultiSpline> splinecable_4_;
 };
 
-}  // namespace autonomous
-}  // namespace y2023
+}  // namespace y2023::autonomous
 
 #endif  // Y2023_AUTONOMOUS_AUTO_SPLINES_H_
diff --git a/y2023/autonomous/autonomous_actor.h b/y2023/autonomous/autonomous_actor.h
index 5a5cd06..829cd0e 100644
--- a/y2023/autonomous/autonomous_actor.h
+++ b/y2023/autonomous/autonomous_actor.h
@@ -11,8 +11,7 @@
 #include "y2023/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2023/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2023 {
-namespace autonomous {
+namespace y2023::autonomous {
 
 class AutonomousActor
     : public ::frc971::autonomous::UserButtonLocalizedAutonomousActor {
@@ -83,7 +82,6 @@
   const ::std::vector<::Eigen::Matrix<double, 3, 1>> points_;
 };
 
-}  // namespace autonomous
-}  // namespace y2023
+}  // namespace y2023::autonomous
 
 #endif  // Y2023_AUTONOMOUS_AUTONOMOUS_ACTOR_H_
diff --git a/y2023/constants.h b/y2023/constants.h
index 92428db..402fc73 100644
--- a/y2023/constants.h
+++ b/y2023/constants.h
@@ -15,8 +15,7 @@
 #include "y2023/control_loops/superstructure/roll/roll_plant.h"
 #include "y2023/control_loops/superstructure/wrist/wrist_plant.h"
 
-namespace y2023 {
-namespace constants {
+namespace y2023::constants {
 
 constexpr uint16_t kCompTeamNumber = 971;
 constexpr uint16_t kPracticeTeamNumber = 9971;
@@ -236,7 +235,6 @@
 // Calls MakeValues with aos::network::GetTeamNumber()
 Values MakeValues();
 
-}  // namespace constants
-}  // namespace y2023
+}  // namespace y2023::constants
 
 #endif  // Y2023_CONSTANTS_H_
diff --git a/y2023/control_loops/drivetrain/drivetrain_base.h b/y2023/control_loops/drivetrain/drivetrain_base.h
index 98f984e..00d4d0e 100644
--- a/y2023/control_loops/drivetrain/drivetrain_base.h
+++ b/y2023/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2023 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2023::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2023
+}  // namespace y2023::control_loops::drivetrain
 
 #endif  // Y2023_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2023/control_loops/superstructure/arm/arm.h b/y2023/control_loops/superstructure/arm/arm.h
index 6153400..2160b38 100644
--- a/y2023/control_loops/superstructure/arm/arm.h
+++ b/y2023/control_loops/superstructure/arm/arm.h
@@ -15,10 +15,7 @@
 
 using frc971::control_loops::arm::EKF;
 
-namespace y2023 {
-namespace control_loops {
-namespace superstructure {
-namespace arm {
+namespace y2023::control_loops::superstructure::arm {
 
 class Arm {
  public:
@@ -116,9 +113,6 @@
   EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
 };
 
-}  // namespace arm
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2023
+}  // namespace y2023::control_loops::superstructure::arm
 
 #endif  // Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_H_
diff --git a/y2023/control_loops/superstructure/arm/arm_constants.h b/y2023/control_loops/superstructure/arm/arm_constants.h
index fc716af..d5b11cb 100644
--- a/y2023/control_loops/superstructure/arm/arm_constants.h
+++ b/y2023/control_loops/superstructure/arm/arm_constants.h
@@ -3,10 +3,7 @@
 
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 
-namespace y2023 {
-namespace control_loops {
-namespace superstructure {
-namespace arm {
+namespace y2023::control_loops::superstructure::arm {
 
 constexpr double kEfficiencyTweak = 0.95;
 constexpr double kStallTorque = 4.69 * kEfficiencyTweak;
@@ -45,9 +42,6 @@
     .num_distal_motors = 1.0,
 };
 
-}  // namespace arm
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2023
+}  // namespace y2023::control_loops::superstructure::arm
 
 #endif  // Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_CONSTANTS_H_
diff --git a/y2023/control_loops/superstructure/arm/trajectory.h b/y2023/control_loops/superstructure/arm/trajectory.h
index 7994d60..7b56789 100644
--- a/y2023/control_loops/superstructure/arm/trajectory.h
+++ b/y2023/control_loops/superstructure/arm/trajectory.h
@@ -16,10 +16,7 @@
 #include "frc971/control_loops/state_feedback_loop.h"
 #include "y2023/control_loops/superstructure/arm/arm_trajectories_generated.h"
 
-namespace y2023 {
-namespace control_loops {
-namespace superstructure {
-namespace arm {
+namespace y2023::control_loops::superstructure::arm {
 
 using frc971::control_loops::Binomial;
 using frc971::control_loops::GaussianQuadrature5;
@@ -623,9 +620,6 @@
   int failed_solutions_ = 0;
 };
 
-}  // namespace arm
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2023
+}  // namespace y2023::control_loops::superstructure::arm
 
 #endif  // Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_TRAJECTORY_H_
diff --git a/y2023/control_loops/superstructure/end_effector.h b/y2023/control_loops/superstructure/end_effector.h
index da0ce5e..04cde94 100644
--- a/y2023/control_loops/superstructure/end_effector.h
+++ b/y2023/control_loops/superstructure/end_effector.h
@@ -9,9 +9,7 @@
 #include "y2023/control_loops/superstructure/superstructure_status_generated.h"
 #include "y2023/vision/game_pieces_generated.h"
 
-namespace y2023 {
-namespace control_loops {
-namespace superstructure {
+namespace y2023::control_loops::superstructure {
 
 class EndEffector {
  public:
@@ -39,8 +37,6 @@
   bool beambreak_;
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2023
+}  // namespace y2023::control_loops::superstructure
 
 #endif  // Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_END_EFFECTOR_H_
diff --git a/y2023/control_loops/superstructure/superstructure.h b/y2023/control_loops/superstructure/superstructure.h
index bcee3ea..349131b 100644
--- a/y2023/control_loops/superstructure/superstructure.h
+++ b/y2023/control_loops/superstructure/superstructure.h
@@ -22,9 +22,7 @@
 using y2023::control_loops::superstructure::arm::ArmTrajectories;
 using y2023::control_loops::superstructure::arm::TrajectoryAndParams;
 
-namespace y2023 {
-namespace control_loops {
-namespace superstructure {
+namespace y2023::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -86,8 +84,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2023
+}  // namespace y2023::control_loops::superstructure
 
 #endif  // Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2023/vision/aprilrobotics.h b/y2023/vision/aprilrobotics.h
index 123f352..e11bfcc 100644
--- a/y2023/vision/aprilrobotics.h
+++ b/y2023/vision/aprilrobotics.h
@@ -21,8 +21,7 @@
 #include "frc971/vision/visualize_robot.h"
 #include "y2023/constants/constants_generated.h"
 
-namespace y2023 {
-namespace vision {
+namespace y2023::vision {
 
 class AprilRoboticsDetector {
  public:
@@ -97,5 +96,4 @@
   frc971::vision::VisualizeRobot vis_robot_;
 };
 
-}  // namespace vision
-}  // namespace y2023
+}  // namespace y2023::vision
diff --git a/y2023/vision/game_pieces.h b/y2023/vision/game_pieces.h
index 442d95c..45bf894 100644
--- a/y2023/vision/game_pieces.h
+++ b/y2023/vision/game_pieces.h
@@ -6,8 +6,7 @@
 #include "y2023/vision/game_pieces_generated.h"
 #include "y2023/vision/yolov5.h"
 
-namespace y2023 {
-namespace vision {
+namespace y2023::vision {
 
 using namespace frc971::vision;
 
@@ -23,6 +22,5 @@
   aos::Sender<GamePieces> game_pieces_sender_;
   std::unique_ptr<YOLOV5> model;
 };
-}  // namespace vision
-}  // namespace y2023
+}  // namespace y2023::vision
 #endif
diff --git a/y2023/vision/yolov5.h b/y2023/vision/yolov5.h
index 9853b4f..2d7f641 100644
--- a/y2023/vision/yolov5.h
+++ b/y2023/vision/yolov5.h
@@ -13,8 +13,7 @@
 #include <opencv2/imgcodecs.hpp>
 #include <opencv2/imgproc.hpp>
 
-namespace y2023 {
-namespace vision {
+namespace y2023::vision {
 
 struct Detection {
   cv::Rect box;
@@ -36,7 +35,6 @@
 
 std::unique_ptr<YOLOV5> MakeYOLOV5();
 
-}  // namespace vision
-}  // namespace y2023
+}  // namespace y2023::vision
 
 #endif  // Y2023_VISION_YOLOV5_H_
diff --git a/y2023_bot3/autonomous/auto_splines.h b/y2023_bot3/autonomous/auto_splines.h
index daa39b7..2494880 100644
--- a/y2023_bot3/autonomous/auto_splines.h
+++ b/y2023_bot3/autonomous/auto_splines.h
@@ -13,8 +13,7 @@
 
 */
 
-namespace y2023_bot3 {
-namespace autonomous {
+namespace y2023_bot3::autonomous {
 
 class AutonomousSplines {
  public:
@@ -74,7 +73,6 @@
   aos::FlatbufferDetachedBuffer<frc971::MultiSpline> spline_middle_1_;
 };
 
-}  // namespace autonomous
-}  // namespace y2023_bot3
+}  // namespace y2023_bot3::autonomous
 
 #endif  // Y2023_AUTONOMOUS_AUTO_SPLINES_H_
diff --git a/y2023_bot3/autonomous/autonomous_actor.h b/y2023_bot3/autonomous/autonomous_actor.h
index bc0a35c..2247b4a 100644
--- a/y2023_bot3/autonomous/autonomous_actor.h
+++ b/y2023_bot3/autonomous/autonomous_actor.h
@@ -11,8 +11,7 @@
 #include "y2023_bot3/control_loops/superstructure/superstructure_goal_generated.h"
 #include "y2023_bot3/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2023_bot3 {
-namespace autonomous {
+namespace y2023_bot3::autonomous {
 
 class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
  public:
@@ -59,7 +58,6 @@
   std::optional<std::array<SplineHandle, 1>> charged_up_middle_splines_;
 };
 
-}  // namespace autonomous
-}  // namespace y2023_bot3
+}  // namespace y2023_bot3::autonomous
 
 #endif  // Y2023_AUTONOMOUS_AUTONOMOUS_ACTOR_H_
diff --git a/y2023_bot3/constants.h b/y2023_bot3/constants.h
index 60fe404..beca532 100644
--- a/y2023_bot3/constants.h
+++ b/y2023_bot3/constants.h
@@ -10,8 +10,7 @@
 #include "frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h"
 #include "frc971/zeroing/pot_and_absolute_encoder.h"
 #include "y2023_bot3/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
-namespace y2023_bot3 {
-namespace constants {
+namespace y2023_bot3::constants {
 
 constexpr uint16_t kThirdRobotTeamNumber = 9984;
 
@@ -66,7 +65,6 @@
 // Calls MakeValues with aos::network::GetTeamNumber()
 Values MakeValues();
 
-}  // namespace constants
-}  // namespace y2023_bot3
+}  // namespace y2023_bot3::constants
 
 #endif  // Y2023_BOT3_CONSTANTS_H_
diff --git a/y2023_bot3/control_loops/drivetrain/drivetrain_base.h b/y2023_bot3/control_loops/drivetrain/drivetrain_base.h
index 6922ea6..a3cfeff 100644
--- a/y2023_bot3/control_loops/drivetrain/drivetrain_base.h
+++ b/y2023_bot3/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2023_bot3 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2023_bot3::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2023_bot3
+}  // namespace y2023_bot3::control_loops::drivetrain
 
 #endif  // Y2023_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2023_bot3/control_loops/superstructure/superstructure.h b/y2023_bot3/control_loops/superstructure/superstructure.h
index d0cd0db..4b55d76 100644
--- a/y2023_bot3/control_loops/superstructure/superstructure.h
+++ b/y2023_bot3/control_loops/superstructure/superstructure.h
@@ -14,9 +14,7 @@
 #include "y2023_bot3/control_loops/superstructure/superstructure_position_generated.h"
 #include "y2023_bot3/control_loops/superstructure/superstructure_status_generated.h"
 
-namespace y2023_bot3 {
-namespace control_loops {
-namespace superstructure {
+namespace y2023_bot3::control_loops::superstructure {
 
 class Superstructure
     : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -47,8 +45,6 @@
   DISALLOW_COPY_AND_ASSIGN(Superstructure);
 };
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2023_bot3
+}  // namespace y2023_bot3::control_loops::superstructure
 
 #endif  // Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2023_bot4/constants.h b/y2023_bot4/constants.h
index 676ae06..fbbc5f2 100644
--- a/y2023_bot4/constants.h
+++ b/y2023_bot4/constants.h
@@ -9,8 +9,7 @@
 
 #include "frc971/constants.h"
 
-namespace y2023_bot4 {
-namespace constants {
+namespace y2023_bot4::constants {
 struct Values {
   static const int kZeroingSampleSize = 200;
 
@@ -49,7 +48,6 @@
 
 // Calls MakeValues with aos::network::GetTeamNumber()
 Values MakeValues();
-}  // namespace constants
-}  // namespace y2023_bot4
+}  // namespace y2023_bot4::constants
 
 #endif  // Y2023_BOT4_CONSTANTS_H
diff --git a/y2024/constants.h b/y2024/constants.h
index b90534c..ddcf0a4 100644
--- a/y2024/constants.h
+++ b/y2024/constants.h
@@ -13,8 +13,7 @@
 #include "y2024/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 #include "y2024/control_loops/superstructure/intake_pivot/intake_pivot_plant.h"
 
-namespace y2024 {
-namespace constants {
+namespace y2024::constants {
 
 constexpr uint16_t kCompTeamNumber = 971;
 constexpr uint16_t kPracticeTeamNumber = 9971;
@@ -93,7 +92,6 @@
 // Calls MakeValues with aos::network::GetTeamNumber()
 constants::Values MakeValues();
 
-}  // namespace constants
-}  // namespace y2024
+}  // namespace y2024::constants
 
 #endif  // Y2024_CONSTANTS_H_
diff --git a/y2024_defense/constants.h b/y2024_defense/constants.h
index 7e359f4..d9631d7 100644
--- a/y2024_defense/constants.h
+++ b/y2024_defense/constants.h
@@ -12,8 +12,7 @@
 #include "frc971/zeroing/pot_and_absolute_encoder.h"
 #include "y2024_defense/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 
-namespace y2024_defense {
-namespace constants {
+namespace y2024_defense::constants {
 
 constexpr uint16_t kTeamNumber = 9972;
 
@@ -60,7 +59,6 @@
 // Calls MakeValues with aos::network::GetTeamNumber()
 Values MakeValues();
 
-}  // namespace constants
-}  // namespace y2024_defense
+}  // namespace y2024_defense::constants
 
 #endif  // Y2023_CONSTANTS_H_
diff --git a/y2024_defense/control_loops/drivetrain/drivetrain_base.h b/y2024_defense/control_loops/drivetrain/drivetrain_base.h
index 622de4f..776ec93 100644
--- a/y2024_defense/control_loops/drivetrain/drivetrain_base.h
+++ b/y2024_defense/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
 
 #include "frc971/control_loops/drivetrain/drivetrain_config.h"
 
-namespace y2024_defense {
-namespace control_loops {
-namespace drivetrain {
+namespace y2024_defense::control_loops::drivetrain {
 
 const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
 GetDrivetrainConfig();
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2024_defense
+}  // namespace y2024_defense::control_loops::drivetrain
 
 #endif  // Y2023_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_