diff --git a/cameraserver/src/main/native/cpp/vision/VisionRunner.cpp b/cameraserver/src/main/native/cpp/vision/VisionRunner.cpp index 990cb3a14a..a0164a0fbe 100644 --- a/cameraserver/src/main/native/cpp/vision/VisionRunner.cpp +++ b/cameraserver/src/main/native/cpp/vision/VisionRunner.cpp @@ -24,7 +24,7 @@ VisionRunnerBase::VisionRunnerBase(cs::VideoSource videoSource) VisionRunnerBase::~VisionRunnerBase() = default; void VisionRunnerBase::RunOnce() { - auto csShared = wpi::vision::GetCameraServerShared(); + auto csShared = wpi::GetCameraServerShared(); auto res = csShared->GetRobotMainThreadId(); if (res.second && (std::this_thread::get_id() == res.first)) { csShared->SetVisionRunnerError( @@ -41,7 +41,7 @@ void VisionRunnerBase::RunOnce() { } void VisionRunnerBase::RunForever() { - auto csShared = wpi::vision::GetCameraServerShared(); + auto csShared = wpi::GetCameraServerShared(); auto res = csShared->GetRobotMainThreadId(); if (res.second && (std::this_thread::get_id() == res.first)) { csShared->SetVisionRunnerError( diff --git a/commandsv2/src/main/native/cpp/frc2/command/button/Trigger.cpp b/commandsv2/src/main/native/cpp/frc2/command/button/Trigger.cpp index ba8909fd4b..8382d40f75 100644 --- a/commandsv2/src/main/native/cpp/frc2/command/button/Trigger.cpp +++ b/commandsv2/src/main/native/cpp/frc2/command/button/Trigger.cpp @@ -9,7 +9,7 @@ #include "wpi/commands2/CommandPtr.hpp" #include "wpi/math/filter/Debouncer.hpp" -using namespace frc; +using namespace wpi; using namespace wpi::cmd; Trigger::Trigger(const Trigger& other) = default; diff --git a/datalog/src/main/native/include/wpi/datalog/DataLog.hpp b/datalog/src/main/native/include/wpi/datalog/DataLog.hpp index da823809a7..e2ad942e02 100644 --- a/datalog/src/main/native/include/wpi/datalog/DataLog.hpp +++ b/datalog/src/main/native/include/wpi/datalog/DataLog.hpp @@ -161,7 +161,7 @@ class DataLog { template void AddProtobufSchema(wpi::util::ProtobufMessage& msg, int64_t timestamp = 0) { if (timestamp == 0) { - timestamp = Now(); + timestamp = wpi::util::Now(); } msg.ForEachProtobufDescriptor( [this](auto typeString) { return HasSchema(typeString); }, @@ -182,7 +182,7 @@ class DataLog { requires wpi::util::StructSerializable void AddStructSchema(const I&... info, int64_t timestamp = 0) { if (timestamp == 0) { - timestamp = Now(); + timestamp = wpi::util::Now(); } wpi::util::ForEachStructSchema( [this, timestamp](auto typeString, auto schema) { diff --git a/romiVendordep/src/main/native/include/wpi/romi/RomiMotor.hpp b/romiVendordep/src/main/native/include/wpi/romi/RomiMotor.hpp index 505735718f..92ed28a543 100644 --- a/romiVendordep/src/main/native/include/wpi/romi/RomiMotor.hpp +++ b/romiVendordep/src/main/native/include/wpi/romi/RomiMotor.hpp @@ -18,7 +18,7 @@ namespace wpi::romi { * * A general use PWM motor controller representing the motors on a Romi robot */ -class RomiMotor : public PWMMotorController { +class RomiMotor : public wpi::PWMMotorController { public: /** * Constructor for a RomiMotor. diff --git a/tools/sysid/src/main/native/cpp/view/Analyzer.cpp b/tools/sysid/src/main/native/cpp/view/Analyzer.cpp index cc39f90c15..a5d8e0fd59 100644 --- a/tools/sysid/src/main/native/cpp/view/Analyzer.cpp +++ b/tools/sysid/src/main/native/cpp/view/Analyzer.cpp @@ -612,9 +612,9 @@ void Analyzer::DisplayFeedbackGains() { sysid::CreateTooltip( "Gain presets represent how feedback gains are calculated for your " "specific feedback controller:\n\n" - "Default, WPILib (2020-): For use with the new WPILib wpi::math::PIDController " + "Default, WPILib (2020-): For use with the new WPILib PIDController " "class.\n" - "WPILib (Pre-2020): For use with the old WPILib wpi::math::PIDController class.\n" + "WPILib (Pre-2020): For use with the old WPILib PIDController class.\n" "CTRE: For use with CTRE units. These are the default units that ship " "with CTRE motor controllers.\n" "REV (Brushless): For use with NEO and NEO 550 motors on a SPARK MAX.\n" diff --git a/tools/sysid/src/main/native/include/wpi/sysid/view/DataSelector.hpp b/tools/sysid/src/main/native/include/wpi/sysid/view/DataSelector.hpp index 6f8f39d984..4bbb44c989 100644 --- a/tools/sysid/src/main/native/include/wpi/sysid/view/DataSelector.hpp +++ b/tools/sysid/src/main/native/include/wpi/sysid/view/DataSelector.hpp @@ -25,7 +25,9 @@ namespace wpi { namespace log { class DataLogReaderEntry; } // namespace log -class wpi::util::Logger; +namespace util { +class Logger; +} } // namespace wpi namespace sysid { diff --git a/tools/sysid/src/main/native/include/wpi/sysid/view/LogLoader.hpp b/tools/sysid/src/main/native/include/wpi/sysid/view/LogLoader.hpp index 0f5edec62d..bc56267242 100644 --- a/tools/sysid/src/main/native/include/wpi/sysid/view/LogLoader.hpp +++ b/tools/sysid/src/main/native/include/wpi/sysid/view/LogLoader.hpp @@ -25,7 +25,9 @@ namespace log { class DataLogReaderEntry; class DataLogReaderThread; } // namespace log -class wpi::util::Logger; +namespace util { +class Logger; +} } // namespace wpi namespace sysid { diff --git a/tools/sysid/src/test/native/cpp/analysis/FilterTest.cpp b/tools/sysid/src/test/native/cpp/analysis/FilterTest.cpp index e446cc2a5c..18ac82f3cd 100644 --- a/tools/sysid/src/test/native/cpp/analysis/FilterTest.cpp +++ b/tools/sysid/src/test/native/cpp/analysis/FilterTest.cpp @@ -13,7 +13,7 @@ #include "wpi/sysid/analysis/FilteringUtils.hpp" #include "wpi/sysid/analysis/Storage.hpp" -TEST(FilterTest, wpi::math::MedianFilter) { +TEST(FilterTest, MedianFilter) { std::vector testData{ sysid::PreparedData{0_s, 0, 0, 0}, sysid::PreparedData{0_s, 0, 0, 1}, sysid::PreparedData{0_s, 0, 0, 10}, sysid::PreparedData{0_s, 0, 0, 5}, diff --git a/tools/wpical/src/main/native/thirdparty/mrcal/src/poseutils-uses-autodiff.cpp b/tools/wpical/src/main/native/thirdparty/mrcal/src/poseutils-uses-autodiff.cpp index 39b31408a8..deb4670887 100644 --- a/tools/wpical/src/main/native/thirdparty/mrcal/src/poseutils-uses-autodiff.cpp +++ b/tools/wpical/src/main/native/thirdparty/mrcal/src/poseutils-uses-autodiff.cpp @@ -288,7 +288,7 @@ compose_r_core(// output Described here: - Altmann, Simon L. "Hamilton, Rodrigues, and the wpi::math::Quaternion Scandal." + Altmann, Simon L. "Hamilton, Rodrigues, and the Quaternion Scandal." Mathematics Magazine, vol. 62, no. 5, 1989, pp. 291–308 Available here: diff --git a/wpilibc/src/main/native/cpp/smartdashboard/MechanismRoot2d.cpp b/wpilibc/src/main/native/cpp/smartdashboard/MechanismRoot2d.cpp index a86ef26a86..806f7c60f9 100644 --- a/wpilibc/src/main/native/cpp/smartdashboard/MechanismRoot2d.cpp +++ b/wpilibc/src/main/native/cpp/smartdashboard/MechanismRoot2d.cpp @@ -6,6 +6,8 @@ #include "wpi/util/Color8Bit.hpp" +#include + using namespace wpi; MechanismRoot2d::MechanismRoot2d(std::string_view name, double x, double y, diff --git a/wpilibc/src/main/native/include/wpi/event/NetworkBooleanEvent.hpp b/wpilibc/src/main/native/include/wpi/event/NetworkBooleanEvent.hpp index 6c938e1adc..268b947d91 100644 --- a/wpilibc/src/main/native/include/wpi/event/NetworkBooleanEvent.hpp +++ b/wpilibc/src/main/native/include/wpi/event/NetworkBooleanEvent.hpp @@ -9,7 +9,7 @@ #include "wpi/event/BooleanEvent.hpp" -namespace nt { +namespace wpi::nt { class BooleanSubscriber; class BooleanTopic; class NetworkTable; diff --git a/wpilibc/src/main/native/include/wpi/smartdashboard/FieldObject2d.hpp b/wpilibc/src/main/native/include/wpi/smartdashboard/FieldObject2d.hpp index 47ab8a0fc2..a79b568a98 100644 --- a/wpilibc/src/main/native/include/wpi/smartdashboard/FieldObject2d.hpp +++ b/wpilibc/src/main/native/include/wpi/smartdashboard/FieldObject2d.hpp @@ -17,10 +17,13 @@ #include "wpi/util/SmallVector.hpp" #include "wpi/util/mutex.hpp" +namespace wpi::math { +class Trajectory; +} + namespace wpi { class Field2d; -class wpi::math::Trajectory; /** * Game field object on a Field2d. diff --git a/wpilibc/src/main/native/include/wpi/smartdashboard/SmartDashboard.hpp b/wpilibc/src/main/native/include/wpi/smartdashboard/SmartDashboard.hpp index 9b354d0630..07ffb78f4e 100644 --- a/wpilibc/src/main/native/include/wpi/smartdashboard/SmartDashboard.hpp +++ b/wpilibc/src/main/native/include/wpi/smartdashboard/SmartDashboard.hpp @@ -14,7 +14,7 @@ #include "wpi/nt/NetworkTableEntry.hpp" #include "wpi/nt/NetworkTableValue.hpp" -namespace wpi { +namespace wpi::util { class Sendable; } // namespace wpi diff --git a/wpilibc/src/main/python/semiwrap/simulation/DifferentialDrivetrainSim.yml b/wpilibc/src/main/python/semiwrap/simulation/DifferentialDrivetrainSim.yml index 8c779e82c4..16d7dcb62b 100644 --- a/wpilibc/src/main/python/semiwrap/simulation/DifferentialDrivetrainSim.yml +++ b/wpilibc/src/main/python/semiwrap/simulation/DifferentialDrivetrainSim.yml @@ -2,7 +2,7 @@ classes: wpi::sim::DifferentialDrivetrainSim: typealias: - wpi::math::DCMotor - - template using wpi::math::LinearSystem = wpi::math::LinearSystem + - template using LinearSystem = wpi::math::LinearSystem methods: DifferentialDrivetrainSim: overloads: diff --git a/wpilibc/src/main/python/semiwrap/simulation/ElevatorSim.yml b/wpilibc/src/main/python/semiwrap/simulation/ElevatorSim.yml index b086ba47ed..2170e0413b 100644 --- a/wpilibc/src/main/python/semiwrap/simulation/ElevatorSim.yml +++ b/wpilibc/src/main/python/semiwrap/simulation/ElevatorSim.yml @@ -2,8 +2,8 @@ classes: wpi::sim::ElevatorSim: typealias: - wpi::math::DCMotor - - template using wpi::math::LinearSystem = wpi::math::LinearSystem - - template using wpi::math::Vectord = wpi::math::Vectord + - template using LinearSystem = wpi::math::LinearSystem + - template using Vectord = wpi::math::Vectord methods: ElevatorSim: overloads: diff --git a/wpilibc/src/main/python/semiwrap/simulation/FlywheelSim.yml b/wpilibc/src/main/python/semiwrap/simulation/FlywheelSim.yml index 23b2c4d0c2..931b684c48 100644 --- a/wpilibc/src/main/python/semiwrap/simulation/FlywheelSim.yml +++ b/wpilibc/src/main/python/semiwrap/simulation/FlywheelSim.yml @@ -2,7 +2,7 @@ classes: wpi::sim::FlywheelSim: typealias: - wpi::math::DCMotor - - template using wpi::math::LinearSystem = wpi::math::LinearSystem + - template using LinearSystem = wpi::math::LinearSystem methods: FlywheelSim: overloads: diff --git a/wpilibc/src/main/python/semiwrap/simulation/LinearSystemSim.yml b/wpilibc/src/main/python/semiwrap/simulation/LinearSystemSim.yml index 0006ff4b43..040e2a3426 100644 --- a/wpilibc/src/main/python/semiwrap/simulation/LinearSystemSim.yml +++ b/wpilibc/src/main/python/semiwrap/simulation/LinearSystemSim.yml @@ -1,8 +1,8 @@ classes: wpi::sim::LinearSystemSim: typealias: - - template using wpi::math::LinearSystem = wpi::math::LinearSystem - - template using wpi::math::Vectord = wpi::math::Vectord + - template using LinearSystem = wpi::math::LinearSystem + - template using Vectord = wpi::math::Vectord template_params: - int States - int Inputs diff --git a/wpilibc/src/main/python/semiwrap/simulation/SingleJointedArmSim.yml b/wpilibc/src/main/python/semiwrap/simulation/SingleJointedArmSim.yml index 08cf0b5e78..51bc81431d 100644 --- a/wpilibc/src/main/python/semiwrap/simulation/SingleJointedArmSim.yml +++ b/wpilibc/src/main/python/semiwrap/simulation/SingleJointedArmSim.yml @@ -2,8 +2,8 @@ classes: wpi::sim::SingleJointedArmSim: typealias: - wpi::math::DCMotor - - template using wpi::math::LinearSystem = wpi::math::LinearSystem - - template using wpi::math::Vectord = wpi::math::Vectord + - template using LinearSystem = wpi::math::LinearSystem + - template using Vectord = wpi::math::Vectord methods: SingleJointedArmSim: overloads: diff --git a/wpilibc/src/main/python/wpilib/simulation/simulation.cpp b/wpilibc/src/main/python/wpilib/simulation/simulation.cpp index e3f880e905..c562e91cb3 100644 --- a/wpilibc/src/main/python/wpilib/simulation/simulation.cpp +++ b/wpilibc/src/main/python/wpilib/simulation/simulation.cpp @@ -8,14 +8,14 @@ void ResetSmartDashboardInstance(); void ResetMotorSafety(); } // namespace wpi::impl -namespace wpi::impl { +namespace wpi::util::impl { void ResetSendableRegistry(); } // namespace wpi::impl void resetWpilibSimulationData() { wpi::impl::ResetSmartDashboardInstance(); wpi::impl::ResetMotorSafety(); - wpi::impl::ResetSendableRegistry(); + wpi::util::impl::ResetSendableRegistry(); } void resetMotorSafety() { diff --git a/wpilibj/src/main/java/org/wpilib/system/DataLogManager.java b/wpilibj/src/main/java/org/wpilib/system/DataLogManager.java index 337804d041..e1d8bf8ab5 100644 --- a/wpilibj/src/main/java/org/wpilib/system/DataLogManager.java +++ b/wpilibj/src/main/java/org/wpilib/system/DataLogManager.java @@ -271,7 +271,7 @@ public final class DataLogManager { return filenameOverride; } Random rnd = new Random(); - StringBuilder filename = new StringBuilder(); + StringBuilder filename = new StringBuilder(18); filename.append("FRC_TBD_"); for (int i = 0; i < 4; i++) { filename.append(String.format("%04x", rnd.nextInt(0x10000))); diff --git a/wpimath/src/test/native/cpp/UnitsTest.cpp b/wpimath/src/test/native/cpp/UnitsTest.cpp index 2440a9c8a3..bf27ea49c0 100644 --- a/wpimath/src/test/native/cpp/UnitsTest.cpp +++ b/wpimath/src/test/native/cpp/UnitsTest.cpp @@ -87,7 +87,7 @@ using namespace wpi::units::torque; using namespace wpi::units::velocity; using namespace wpi::units::voltage; using namespace wpi::units::volume; -using namespace units; +using namespace wpi::units; #if !defined(_MSC_VER) || _MSC_VER > 1800 using namespace wpi::units::literals; diff --git a/wpinet/robotpy_pybind_build_info.bzl b/wpinet/robotpy_pybind_build_info.bzl index 322860de28..7a6b190cf2 100644 --- a/wpinet/robotpy_pybind_build_info.bzl +++ b/wpinet/robotpy_pybind_build_info.bzl @@ -13,7 +13,7 @@ def wpinet_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], includ header_file = "$(execpath :robotpy-native-wpinet.copy_headers)/wpi/net/PortForwarder.hpp", tmpl_class_names = [], trampolines = [ - ("wpi::PortForwarder", "wpi__PortForwarder.hpp"), + ("wpi::net::PortForwarder", "wpi__net__PortForwarder.hpp"), ], ), struct( @@ -23,7 +23,7 @@ def wpinet_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], includ header_file = "$(execpath :robotpy-native-wpinet.copy_headers)/wpi/net/WebServer.hpp", tmpl_class_names = [], trampolines = [ - ("wpi::WebServer", "wpi__WebServer.hpp"), + ("wpi::net::WebServer", "wpi__net__WebServer.hpp"), ], ), ] diff --git a/wpinet/src/main/native/include/wpi/net/DsClient.hpp b/wpinet/src/main/native/include/wpi/net/DsClient.hpp index a96be18cc6..55df512c20 100644 --- a/wpinet/src/main/native/include/wpi/net/DsClient.hpp +++ b/wpinet/src/main/native/include/wpi/net/DsClient.hpp @@ -10,10 +10,11 @@ #include "wpi/util/Signal.h" -namespace wpi::net { - +namespace wpi::util { class Logger; +} +namespace wpi::net { namespace uv { class Loop; class Tcp; diff --git a/wpinet/src/main/native/include/wpi/net/HttpServerConnection.hpp b/wpinet/src/main/native/include/wpi/net/HttpServerConnection.hpp index fca6f23ac7..2b2d4c7c5c 100644 --- a/wpinet/src/main/native/include/wpi/net/HttpServerConnection.hpp +++ b/wpinet/src/main/native/include/wpi/net/HttpServerConnection.hpp @@ -12,9 +12,11 @@ #include "wpi/net/HttpParser.hpp" #include "wpi/net/uv/Stream.hpp" -namespace wpi::net { - +namespace wpi::util { class raw_ostream; +} + +namespace wpi::net { class HttpServerConnection { public: diff --git a/wpinet/src/main/native/include/wpi/net/ParallelTcpConnector.hpp b/wpinet/src/main/native/include/wpi/net/ParallelTcpConnector.hpp index 713c890fc3..b4d396dd35 100644 --- a/wpinet/src/main/native/include/wpi/net/ParallelTcpConnector.hpp +++ b/wpinet/src/main/native/include/wpi/net/ParallelTcpConnector.hpp @@ -15,10 +15,11 @@ #include "wpi/net/uv/Timer.hpp" -namespace wpi::net { - +namespace wpi::util { class Logger; +} +namespace wpi::net { namespace uv { class GetAddrInfoReq; class Loop; diff --git a/wpinet/src/main/native/include/wpi/net/UDPClient.hpp b/wpinet/src/main/native/include/wpi/net/UDPClient.hpp index 1c7c2cb445..ce5851cffc 100644 --- a/wpinet/src/main/native/include/wpi/net/UDPClient.hpp +++ b/wpinet/src/main/native/include/wpi/net/UDPClient.hpp @@ -12,10 +12,11 @@ #include "wpi/util/SmallVector.hpp" #include "wpi/util/mutex.hpp" -namespace wpi::net { - +namespace wpi::util { class Logger; +} +namespace wpi::net { class UDPClient { int m_lsd; int m_port; diff --git a/wpinet/src/main/native/include/wpi/net/hostname.hpp b/wpinet/src/main/native/include/wpi/net/hostname.hpp index 2dc6b8e628..3857059319 100644 --- a/wpinet/src/main/native/include/wpi/net/hostname.hpp +++ b/wpinet/src/main/native/include/wpi/net/hostname.hpp @@ -8,10 +8,12 @@ #include #include -namespace wpi::net { +namespace wpi::util { template class SmallVectorImpl; +} +namespace wpi::net { std::string GetHostname(); std::string_view GetHostname(wpi::util::SmallVectorImpl& name); } // namespace wpi::net diff --git a/wpinet/src/main/native/include/wpi/net/uv/Handle.hpp b/wpinet/src/main/native/include/wpi/net/uv/Handle.hpp index 9ea645e0e4..07da9aa5a2 100644 --- a/wpinet/src/main/native/include/wpi/net/uv/Handle.hpp +++ b/wpinet/src/main/native/include/wpi/net/uv/Handle.hpp @@ -18,7 +18,7 @@ #include "wpi/net/uv/Loop.hpp" #include "wpi/util/Signal.h" -namespace wpi::net { +namespace wpi::util { class Logger; } // namespace wpi::net diff --git a/wpinet/src/main/native/macOS/ResolverThread.cpp b/wpinet/src/main/native/macOS/ResolverThread.cpp index d275441081..e2ea391ad8 100644 --- a/wpinet/src/main/native/macOS/ResolverThread.cpp +++ b/wpinet/src/main/native/macOS/ResolverThread.cpp @@ -50,7 +50,7 @@ void ResolverThread::RemoveServiceRefInThread(DNSServiceRef serviceRef) { WPI_EventHandle ResolverThread::RemoveServiceRefOutsideThread( DNSServiceRef serviceRef) { std::scoped_lock lock{serviceRefMutex}; - WPI_EventHandle handle = CreateEvent(true); + WPI_EventHandle handle = wpi::util::CreateEvent(true); serviceRefsToRemove.push_back({serviceRef, handle}); return handle; } diff --git a/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPAcceptor.h b/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPAcceptor.h index 7cad7d2a43..8706d1cbb1 100644 --- a/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPAcceptor.h +++ b/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPAcceptor.h @@ -32,10 +32,11 @@ #include "wpi/net/NetworkAcceptor.hpp" #include "wpi/net/TCPStream.h" -namespace wpi::net { - +namespace wpi::util { class Logger; +} +namespace wpi::net { class TCPAcceptor : public NetworkAcceptor { int m_lsd; int m_port; diff --git a/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPConnector.h b/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPConnector.h index 1a3e094cc1..6da49b6cdc 100644 --- a/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPConnector.h +++ b/wpinet/src/main/native/thirdparty/tcpsockets/include/wpi/net/TCPConnector.h @@ -30,10 +30,11 @@ #include "wpi/net/NetworkStream.hpp" -namespace wpi::net { - +namespace wpi::util { class Logger; +} +namespace wpi::net { class TCPConnector { public: static std::unique_ptr connect(const char* server, int port, diff --git a/wpinet/src/test/native/cpp/WorkerThreadTest.cpp b/wpinet/src/test/native/cpp/WorkerThreadTest.cpp index ea65f0b5d6..b63f7385d2 100644 --- a/wpinet/src/test/native/cpp/WorkerThreadTest.cpp +++ b/wpinet/src/test/native/cpp/WorkerThreadTest.cpp @@ -36,8 +36,8 @@ TEST(WorkerThreadTest, FutureVoid) { } TEST(WorkerThreadTest, Loop) { - mutex m; - condition_variable cv; + wpi::util::mutex m; + wpi::util::condition_variable cv; int callbacks = 0; WorkerThread worker; @@ -60,8 +60,8 @@ TEST(WorkerThreadTest, Loop) { } TEST(WorkerThreadTest, LoopVoid) { - mutex m; - condition_variable cv; + wpi::util::mutex m; + wpi::util::condition_variable cv; int callbacks = 0; WorkerThread worker; diff --git a/wpiutil/robotpy_pybind_build_info.bzl b/wpiutil/robotpy_pybind_build_info.bzl index 7209a1ecc4..f33899fe6b 100644 --- a/wpiutil/robotpy_pybind_build_info.bzl +++ b/wpiutil/robotpy_pybind_build_info.bzl @@ -38,7 +38,7 @@ def wpiutil_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], inclu header_file = "$(execpath :robotpy-native-wpiutil.copy_headers)/wpi/util/sendable/Sendable.hpp", tmpl_class_names = [], trampolines = [ - ("wpi::Sendable", "wpi__Sendable.hpp"), + ("wpi::util::Sendable", "wpi__util__Sendable.hpp"), ], ), struct( @@ -48,7 +48,7 @@ def wpiutil_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], inclu header_file = "$(execpath :robotpy-native-wpiutil.copy_headers)/wpi/util/sendable/SendableBuilder.hpp", tmpl_class_names = [], trampolines = [ - ("wpi::SendableBuilder", "wpi__SendableBuilder.hpp"), + ("wpi::util::SendableBuilder", "wpi__util__SendableBuilder.hpp"), ], ), struct( @@ -58,7 +58,7 @@ def wpiutil_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], inclu header_file = "$(execpath :robotpy-native-wpiutil.copy_headers)/wpi/util/sendable/SendableRegistry.hpp", tmpl_class_names = [], trampolines = [ - ("wpi::SendableRegistry", "wpi__SendableRegistry.hpp"), + ("wpi::util::SendableRegistry", "wpi__util__SendableRegistry.hpp"), ], ), struct( diff --git a/wpiutil/src/main/native/include/wpi/util/scope b/wpiutil/src/main/native/include/wpi/util/scope index e25badb617..ef8baa6ffd 100644 --- a/wpiutil/src/main/native/include/wpi/util/scope +++ b/wpiutil/src/main/native/include/wpi/util/scope @@ -6,7 +6,7 @@ #include -namespace wpi { +namespace wpi::util { template class scope_exit { @@ -34,4 +34,4 @@ class scope_exit { bool m_active = true; }; -} // namespace wpi +} // namespace wpi::util diff --git a/wpiutil/src/main/native/thirdparty/expected/include/wpi/util/expected b/wpiutil/src/main/native/thirdparty/expected/include/wpi/util/expected index 24b7a26ec7..168f97889c 100644 --- a/wpiutil/src/main/native/thirdparty/expected/include/wpi/util/expected +++ b/wpiutil/src/main/native/thirdparty/expected/include/wpi/util/expected @@ -81,7 +81,7 @@ #elif (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__)) #ifndef WPI_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX #define WPI_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX -namespace wpi { +namespace wpi::util { namespace detail_expected { template struct is_trivially_copy_constructible @@ -91,11 +91,11 @@ template struct is_trivially_copy_constructible> : std::false_type {}; #endif } // namespace detail_expected -} // namespace wpi +} // namespace wpi::util #endif #define WPI_EXPECTED_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ - wpi::detail_expected::is_trivially_copy_constructible + wpi::util::detail_expected::is_trivially_copy_constructible #define WPI_EXPECTED_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ std::is_trivially_copy_assignable #define WPI_EXPECTED_IS_TRIVIALLY_DESTRUCTIBLE(T) \ @@ -126,7 +126,7 @@ struct is_trivially_copy_constructible> : std::false_type {}; #define WPI_EXPECTED_11_CONSTEXPR constexpr #endif -namespace wpi { +namespace wpi::util { template class expected; #ifndef WPI_MONOSTATE_INPLACE_MUTEX @@ -388,7 +388,7 @@ struct is_nothrow_swappable #endif #endif -// Trait for checking if a type is a wpi::expected +// Trait for checking if a type is a wpi::util::expected template struct is_expected_impl : std::false_type {}; template struct is_expected_impl> : std::true_type {}; @@ -2439,6 +2439,6 @@ void swap(expected &lhs, expected &rhs) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } -} // namespace wpi +} // namespace wpi::util #endif