From 1caa7b7406994f80b82ed4fda9ef307157fbd8ff Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 26 Sep 2024 10:22:43 +0200 Subject: [PATCH] feat: `iec80000` namespace marked as deprecated --- src/systems/CMakeLists.txt | 1 + .../include/mp-units/systems/iec80000.h | 44 +++++++++++++++++++ src/systems/mp-units-systems.cpp | 1 + 3 files changed, 46 insertions(+) create mode 100644 src/systems/include/mp-units/systems/iec80000.h diff --git a/src/systems/CMakeLists.txt b/src/systems/CMakeLists.txt index 81fd2abd..5ca25a9c 100644 --- a/src/systems/CMakeLists.txt +++ b/src/systems/CMakeLists.txt @@ -45,6 +45,7 @@ add_mp_units_module( include/mp-units/systems/hep.h include/mp-units/systems/iau.h include/mp-units/systems/iec.h + include/mp-units/systems/iec80000.h include/mp-units/systems/imperial.h include/mp-units/systems/international.h include/mp-units/systems/isq.h diff --git a/src/systems/include/mp-units/systems/iec80000.h b/src/systems/include/mp-units/systems/iec80000.h new file mode 100644 index 00000000..2a75cf92 --- /dev/null +++ b/src/systems/include/mp-units/systems/iec80000.h @@ -0,0 +1,44 @@ +// The MIT License (MIT) +// +// Copyright (c) 2018 Mateusz Pusz +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once + +// IWYU pragma: begin_exports +#include +// IWYU pragma: end_exports + +namespace mp_units { + +MP_UNITS_EXPORT +namespace [[deprecated("Use `mp_units::iec` namespace from iec.h instead")]] iec80000 { + +namespace [[deprecated("Use `mp_units::iec::unit_symbols` namespace from iec.h instead")]] unit_symbols { + +using namespace iec::unit_symbols; + +} + +using namespace iec; + +} // namespace iec80000 + +} // namespace mp_units diff --git a/src/systems/mp-units-systems.cpp b/src/systems/mp-units-systems.cpp index 72b8f717..0d86b1dd 100644 --- a/src/systems/mp-units-systems.cpp +++ b/src/systems/mp-units-systems.cpp @@ -39,6 +39,7 @@ import std; #include #include #include +#include #include #include #include