mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 19:04:27 +02:00
refactor: IWYU applied to the source files
`alternative_namespaces` examples left out as I consider them a subject for removal in the nearest future.
This commit is contained in:
@@ -20,10 +20,15 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/isq/si/cgs/speed.h>
|
||||
#include <units/isq/si/international/speed.h>
|
||||
#include <units/isq/si/cgs/length.h>
|
||||
#include <units/isq/si/cgs/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/isq/si/international/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/length.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
@@ -1,14 +1,40 @@
|
||||
#include <units/isq/si/constants.h>
|
||||
// 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.
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/generic/dimensionless.h>
|
||||
#include <units/isq/si/amount_of_substance.h>
|
||||
#include <units/isq/si/area.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/constants.h>
|
||||
#include <units/isq/si/density.h>
|
||||
#include <units/isq/si/force.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/mass.h>
|
||||
#include <units/isq/si/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/isq/si/volume.h>
|
||||
#include <units/format.h>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -20,11 +20,13 @@
|
||||
physical_quantities
|
||||
*/
|
||||
|
||||
#include <units/generic/dimensionless.h>
|
||||
#include <units/isq/dimensions/electric_current.h>
|
||||
#include <units/isq/si/capacitance.h>
|
||||
#include <units/isq/si/resistance.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/isq/si/voltage.h>
|
||||
#include <units/math.h>
|
||||
#include <units/math.h> // IWYU pragma: keep
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/isq/si/typographic/length.h>
|
||||
#include <units/isq/si/us/length.h>
|
||||
#include <units/isq/si/volume.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
@@ -112,29 +111,29 @@ void calcs_comparison()
|
||||
"when adding two values of the same very big\n"
|
||||
"or very small type:\n\n";
|
||||
|
||||
length<femtometre,float> L1A = 2._q_fm;
|
||||
length<femtometre,float> L2A = 3._q_fm;
|
||||
length<femtometre,float> LrA = L1A + L2A;
|
||||
fmt::print("{:%.30Q %q}\n + {:%.30Q %q}\n = {:%.30Q %q}\n\n",L1A,L2A,LrA);
|
||||
length<femtometre, float> L1A = 2._q_fm;
|
||||
length<femtometre, float> L2A = 3._q_fm;
|
||||
length<femtometre, float> LrA = L1A + L2A;
|
||||
fmt::print("{:%.30Q %q}\n + {:%.30Q %q}\n = {:%.30Q %q}\n\n", L1A, L2A, LrA);
|
||||
|
||||
std::cout << "The single unit method must convert large\n"
|
||||
"or small values in other units to the base unit.\n"
|
||||
"This is both inefficient and inaccurate\n\n";
|
||||
|
||||
length<metre,float> L1B = L1A;
|
||||
length<metre,float> L2B = L2A;
|
||||
length<metre,float> LrB = L1B + L2B;
|
||||
fmt::print("{:%.30Q %q}\n + {:%.30Q %q}\n = {:%.30Q %q}\n\n",L1B,L2B,LrB);
|
||||
length<metre, float> L1B = L1A;
|
||||
length<metre, float> L2B = L2A;
|
||||
length<metre, float> LrB = L1B + L2B;
|
||||
fmt::print("{:%.30Q %q}\n + {:%.30Q %q}\n = {:%.30Q %q}\n\n", L1B, L2B, LrB);
|
||||
|
||||
std::cout << "In multiplication and division:\n\n";
|
||||
|
||||
area<square_femtometre,float> ArA = L1A * L2A;
|
||||
fmt::print("{:%.30Q %q}\n * {:%.30Q %q}\n = {:%.30Q %q}\n\n",L1A,L2A,ArA);
|
||||
area<square_femtometre, float> ArA = L1A * L2A;
|
||||
fmt::print("{:%.30Q %q}\n * {:%.30Q %q}\n = {:%.30Q %q}\n\n", L1A, L2A, ArA);
|
||||
|
||||
std::cout << "similar problems arise\n\n";
|
||||
|
||||
area<square_metre,float> ArB = L1B * L2B;
|
||||
fmt::print("{:%.30Q %q}\n * {:%.30Q %q}\n = {:%.30Q %q}\n\n",L1B,L2B,ArB);
|
||||
area<square_metre, float> ArB = L1B * L2B;
|
||||
fmt::print("{:%.30Q %q}\n * {:%.30Q %q}\n = {:%.30Q %q}\n\n", L1B, L2B, ArB);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@@ -15,10 +15,10 @@
|
||||
along with this program. If not, see http://www.gnu.org/licenses./
|
||||
*/
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/format.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
|
||||
/*
|
||||
get conversion factor from one dimensionally equivalent
|
||||
|
@@ -20,9 +20,13 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/quantity_io.h>
|
||||
#include <units/base_dimension.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <units/unit.h>
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
|
||||
using namespace units;
|
||||
|
||||
|
@@ -20,23 +20,24 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/generic/angle.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/energy.h>
|
||||
#include <units/isq/si/torque.h>
|
||||
#include <units/isq/si/force.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/torque.h> // IWYU pragma: keep
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace units;
|
||||
using namespace units::isq::si::literals;
|
||||
|
||||
int main()
|
||||
{
|
||||
auto torque = 20.0_q_Nm_per_rad;
|
||||
auto energy = 20.0_q_J;
|
||||
using namespace units::references;
|
||||
using namespace units::isq;
|
||||
using namespace units::isq::si::references;
|
||||
|
||||
Angle auto angle = energy / torque;
|
||||
Torque auto torque = 20.0 * (N * m / rad);
|
||||
Energy auto energy = 20.0 * J;
|
||||
|
||||
units::Angle auto angle = energy / torque;
|
||||
|
||||
std::cout << angle << '\n';
|
||||
}
|
||||
|
@@ -20,21 +20,19 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/format.h>
|
||||
#include <units/isq/si/fps/density.h>
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/isq/si/fps/mass.h>
|
||||
#include <units/isq/si/fps/power.h>
|
||||
#include <units/isq/si/fps/speed.h>
|
||||
#include <units/isq/si/fps/volume.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/mass.h>
|
||||
#include <units/isq/si/power.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/volume.h>
|
||||
#include <units/quantity.h>
|
||||
#include <iostream>
|
||||
#include <string_view>
|
||||
|
||||
using namespace units::isq;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "geographic.h"
|
||||
#include <cmath>
|
||||
#include <numbers>
|
||||
#include <type_traits>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/quantity_kind.h>
|
||||
#include <fmt/format.h>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <compare>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace geographic {
|
||||
|
||||
|
@@ -21,9 +21,13 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "glide_computer.h"
|
||||
#include <numeric>
|
||||
#include <string_view>
|
||||
|
||||
namespace glide_computer {
|
||||
|
||||
using namespace units::isq;
|
||||
|
||||
task::legs task::make_legs(const waypoints& wpts)
|
||||
{
|
||||
task::legs res;
|
||||
|
@@ -22,12 +22,24 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include "geographic.h"
|
||||
#include <units/format.h>
|
||||
#include <units/math.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/quantity_point_kind.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/math.h> // IWYU pragma: keep
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <initializer_list>
|
||||
#include <iterator>
|
||||
#include <ostream>
|
||||
#include <ranges>
|
||||
#include <string> // IWYU pragma: keep
|
||||
#include <vector>
|
||||
|
||||
// An example of a really simplified tactical glide computer
|
||||
// Simplifications:
|
||||
@@ -43,9 +55,6 @@
|
||||
// - no ground obstacles (i.e. mountains) to pass
|
||||
// - flight path exactly on a shortest possible line to destination
|
||||
|
||||
using namespace units;
|
||||
using namespace units::isq;
|
||||
|
||||
template<units::QuantityKind QK>
|
||||
struct fmt::formatter<QK> : formatter<typename QK::quantity_type> {
|
||||
template<typename FormatContext>
|
||||
@@ -57,8 +66,8 @@ struct fmt::formatter<QK> : formatter<typename QK::quantity_type> {
|
||||
|
||||
namespace glide_computer {
|
||||
|
||||
template<QuantityKind QK1, QuantityKind QK2>
|
||||
constexpr Dimensionless auto operator/(const QK1& lhs, const QK2& rhs)
|
||||
template<units::QuantityKind QK1, units::QuantityKind QK2>
|
||||
constexpr units::Dimensionless auto operator/(const QK1& lhs, const QK2& rhs)
|
||||
requires(!units::QuantityKindRelatedTo<QK1, QK2>) && requires { lhs.common() / rhs.common();}
|
||||
{
|
||||
return lhs.common() / rhs.common();
|
||||
@@ -66,24 +75,24 @@ constexpr Dimensionless auto operator/(const QK1& lhs, const QK2& rhs)
|
||||
|
||||
// kinds
|
||||
using horizontal_kind = geographic::horizontal_kind;
|
||||
struct vertical_kind : kind<vertical_kind, si::dim_length> {};
|
||||
struct vertical_point_kind : point_kind<vertical_point_kind, vertical_kind> {};
|
||||
struct velocity_kind : derived_kind<velocity_kind, horizontal_kind, si::dim_speed> {};
|
||||
struct rate_of_climb_kind : derived_kind<rate_of_climb_kind, vertical_kind, si::dim_speed> {};
|
||||
struct vertical_kind : units::kind<vertical_kind, units::isq::si::dim_length> {};
|
||||
struct vertical_point_kind : units::point_kind<vertical_point_kind, vertical_kind> {};
|
||||
struct velocity_kind : units::derived_kind<velocity_kind, horizontal_kind, units::isq::si::dim_speed> {};
|
||||
struct rate_of_climb_kind : units::derived_kind<rate_of_climb_kind, vertical_kind, units::isq::si::dim_speed> {};
|
||||
|
||||
// https://en.wikipedia.org/wiki/Flight_planning#Units_of_measurement
|
||||
// length
|
||||
using distance = quantity_kind<horizontal_kind, si::kilometre>;
|
||||
using height = quantity_kind<vertical_kind, si::metre>;
|
||||
using altitude = quantity_point_kind<vertical_point_kind, si::metre>;
|
||||
using distance = units::quantity_kind<horizontal_kind, units::isq::si::kilometre>;
|
||||
using height = units::quantity_kind<vertical_kind, units::isq::si::metre>;
|
||||
using altitude = units::quantity_point_kind<vertical_point_kind, units::isq::si::metre>;
|
||||
|
||||
// time
|
||||
using duration = si::time<si::second>;
|
||||
using timestamp = quantity_point<si::dim_time, si::second>;
|
||||
using duration = units::isq::si::time<units::isq::si::second>;
|
||||
using timestamp = units::quantity_point<units::isq::si::dim_time, units::isq::si::second>;
|
||||
|
||||
// speed
|
||||
using velocity = quantity_kind<velocity_kind, si::kilometre_per_hour>;
|
||||
using rate_of_climb = quantity_kind<rate_of_climb_kind, si::metre_per_second>;
|
||||
using velocity = units::quantity_kind<velocity_kind, units::isq::si::kilometre_per_hour>;
|
||||
using rate_of_climb = units::quantity_kind<rate_of_climb_kind, units::isq::si::metre_per_second>;
|
||||
|
||||
// text output
|
||||
template<class CharT, class Traits>
|
||||
@@ -117,7 +126,7 @@ struct glider {
|
||||
std::array<polar_point, 1> polar;
|
||||
};
|
||||
|
||||
constexpr Dimensionless auto glide_ratio(const glider::polar_point& polar) { return polar.v / -polar.climb; }
|
||||
constexpr units::Dimensionless auto glide_ratio(const glider::polar_point& polar) { return polar.v / -polar.climb; }
|
||||
|
||||
struct weather {
|
||||
height cloud_base;
|
||||
@@ -160,10 +169,10 @@ public:
|
||||
|
||||
distance get_length() const { return length_; }
|
||||
|
||||
distance get_leg_dist_offset(size_t leg_index) const { return leg_index == 0 ? distance{} : leg_total_distances_[leg_index - 1]; }
|
||||
size_t get_leg_index(distance dist) const
|
||||
distance get_leg_dist_offset(std::size_t leg_index) const { return leg_index == 0 ? distance{} : leg_total_distances_[leg_index - 1]; }
|
||||
std::size_t get_leg_index(distance dist) const
|
||||
{
|
||||
return static_cast<size_t>(std::ranges::distance(leg_total_distances_.cbegin(), std::ranges::lower_bound(leg_total_distances_, dist)));
|
||||
return static_cast<std::size_t>(std::ranges::distance(leg_total_distances_.cbegin(), std::ranges::lower_bound(leg_total_distances_, dist)));
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -188,7 +197,7 @@ struct aircraft_tow {
|
||||
struct flight_point {
|
||||
timestamp ts;
|
||||
altitude alt;
|
||||
size_t leg_idx = 0;
|
||||
std::size_t leg_idx = 0;
|
||||
distance dist{};
|
||||
};
|
||||
|
||||
@@ -196,7 +205,7 @@ altitude terrain_level_alt(const task& t, const flight_point& pos);
|
||||
|
||||
constexpr height agl(altitude glider_alt, altitude terrain_level) { return glider_alt - terrain_level; }
|
||||
|
||||
inline si::length<si::kilometre> length_3d(distance dist, height h)
|
||||
inline units::isq::si::length<units::isq::si::kilometre> length_3d(distance dist, height h)
|
||||
{
|
||||
// TODO support for hypot(q, q)
|
||||
return sqrt(pow<2>(dist.common()) + pow<2>(h.common()));
|
||||
|
@@ -21,14 +21,25 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "glide_computer.h"
|
||||
#include <units/bits/external/hacks.h>
|
||||
#include <units/chrono.h>
|
||||
#include <units/generic/dimensionless.h>
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <fmt/format.h>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace glide_computer;
|
||||
|
||||
using namespace units::isq;
|
||||
|
||||
auto get_gliders()
|
||||
{
|
||||
using namespace si::references;
|
||||
@@ -74,7 +85,7 @@ void print(const R& gliders)
|
||||
std::cout << "- Name: " << g.name << "\n";
|
||||
std::cout << "- Polar:\n";
|
||||
for (const auto& p : g.polar)
|
||||
fmt::print(" * {:%.4Q %q} @ {:%.1Q %q} -> {:%.1Q %q}\n", p.climb, p.v, quantity_cast<one>(glide_ratio(g.polar[0])));
|
||||
fmt::print(" * {:%.4Q %q} @ {:%.1Q %q} -> {:%.1Q %q}\n", p.climb, p.v, quantity_cast<units::one>(glide_ratio(g.polar[0])));
|
||||
std::cout << "\n";
|
||||
}
|
||||
}
|
||||
|
@@ -21,8 +21,11 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/isq/si/international/speed.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/isq/si/international/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@@ -1,5 +1,29 @@
|
||||
// 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.
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <iostream>
|
||||
#include <array>
|
||||
|
||||
@@ -56,7 +80,7 @@ int main()
|
||||
|
||||
constexpr auto num_measurements = measurements.size();
|
||||
|
||||
std::array<state,num_measurements> track;
|
||||
std::array<state, num_measurements> track;
|
||||
// We need an initial estimate of track[0] as there is no previous state to get a prediction from
|
||||
track[0].range.estimated_current_state = 30'000_q_m;
|
||||
track[0].speed.estimated_current_state = 40.0_q_m_per_s;
|
||||
|
@@ -20,9 +20,10 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/energy.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/force.h>
|
||||
#include <units/isq/si/energy.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/speed.h> // IWYU pragma: keep
|
||||
#include <units/format.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <linear_algebra.hpp>
|
||||
|
@@ -21,9 +21,12 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/isq/si/acceleration.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <cmath>
|
||||
#include <compare>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
@@ -20,13 +20,15 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/isq/natural/constants.h>
|
||||
#include <units/isq/natural/natural.h>
|
||||
#include <units/isq/si/energy.h>
|
||||
#include <units/isq/si/mass.h>
|
||||
#include <units/isq/si/momentum.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/constants.h>
|
||||
#include <units/math.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
@@ -20,8 +20,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/speed.h> // IWYU pragma: keep
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
@@ -31,8 +31,12 @@
|
||||
#pragma warning (disable:4702) // C4702: unreachable code
|
||||
#endif //_MSC_VER
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/locale.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
// #include <string>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
|
@@ -23,9 +23,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/external/fixed_string_io.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/external/fixed_string_io.h>
|
||||
#include <sstream>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,8 +22,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/external/fixed_string.h>
|
||||
#include <units/bits/basic_concepts.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace units {
|
||||
|
@@ -22,12 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/external/downcasting.h>
|
||||
#include <units/bits/external/fixed_string.h>
|
||||
#include <units/bits/external/hacks.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/external/fixed_string.h>
|
||||
#include <units/customization_points.h>
|
||||
#include <units/ratio.h>
|
||||
#include <units/bits/external/type_traits.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
|
||||
|
@@ -22,6 +22,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/derived_dimension_base.h>
|
||||
#include <units/bits/dim_consolidate.h>
|
||||
#include <units/bits/external/downcasting.h>
|
||||
#include <units/bits/external/hacks.h>
|
||||
#include <units/bits/external/type_list.h>
|
||||
#include <units/derived_dimension.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
|
@@ -22,9 +22,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/external/hacks.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <cstdlib>
|
||||
#include <compare>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
// TODO use <algorithm> when moved to C++20 modules (parsing takes too long for each translation unit)
|
||||
|
||||
|
@@ -22,7 +22,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/external/hacks.h>
|
||||
#include <units/bits/external/type_traits.h>
|
||||
#include <cstddef>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (push)
|
||||
|
@@ -23,8 +23,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/customization_points.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/time.h>
|
||||
#include <chrono>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,5 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/basic_concepts.h>
|
||||
#include <units/bits/quantity_of.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -29,7 +29,10 @@
|
||||
#include <units/bits/dim_unpack.h>
|
||||
#include <units/bits/external/downcasting.h>
|
||||
#include <units/bits/external/type_list.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/exponent.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,8 +22,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/prefixes.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/prefixes.h>
|
||||
|
||||
namespace units {
|
||||
|
||||
@@ -46,7 +51,7 @@ constexpr auto operator"" _q_rad(long double l) { return angle<radian, long doub
|
||||
|
||||
} // namespace literals
|
||||
|
||||
inline namespace references {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto rad = reference<dim_angle<>, radian>{};
|
||||
|
||||
|
@@ -22,6 +22,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/quantity_cast.h>
|
||||
|
||||
namespace units {
|
||||
|
@@ -22,9 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/bits/dimension_op.h>
|
||||
#include <units/bits/external/hacks.h>
|
||||
#include <units/generic/dimensionless.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace units {
|
||||
|
@@ -24,8 +24,10 @@
|
||||
|
||||
#include <units/bits/external/downcasting.h>
|
||||
#include <units/bits/basic_concepts.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/ratio.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -24,12 +24,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/common_quantity.h>
|
||||
#include <units/bits/pow.h>
|
||||
#include <units/bits/unit_text.h>
|
||||
#include <units/generic/dimensionless.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/unit_text.h>
|
||||
#include <units/quantity_cast.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/ratio.h>
|
||||
#include <compare>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/reference.h>
|
||||
#include <utility>
|
||||
|
||||
namespace units {
|
||||
|
@@ -23,8 +23,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/kind.h>
|
||||
#include <units/quantity.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <concepts>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
@@ -23,8 +23,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity.h>
|
||||
#include <compare>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/customization_points.h>
|
||||
#include <units/generic/dimensionless.h>
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -23,9 +23,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity_kind.h>
|
||||
#include <units/quantity_point.h>
|
||||
#include <compare>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,9 +22,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <random>
|
||||
#include <functional>
|
||||
#include <units/concepts.h>
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,15 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/external/hacks.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/math_concepts.h>
|
||||
#include <units/bits/ratio_maths.h>
|
||||
#include <units/bits/pow.h>
|
||||
#include <units/bits/ratio_maths.h>
|
||||
#include <units/bits/root.h>
|
||||
#include <cstdint>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <array>
|
||||
#include <numeric>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
#include <gsl/gsl-lite.hpp>
|
||||
|
||||
namespace units {
|
||||
|
@@ -22,10 +22,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/external/fixed_string.h>
|
||||
#include <units/bits/external/hacks.h>
|
||||
#include <gsl/gsl-lite.hpp>
|
||||
#include <compare>
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <gsl/gsl-lite.hpp>
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -23,15 +23,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/deduced_symbol_text.h>
|
||||
#include <units/bits/deduced_unit.h>
|
||||
#include <units/bits/external/downcasting.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/bits/deduced_unit.h>
|
||||
#include <units/bits/external/fixed_string.h>
|
||||
#include <units/bits/external/text_tools.h>
|
||||
#include <units/bits/external/type_traits.h>
|
||||
#include <units/derived_dimension.h>
|
||||
#include <units/prefix.h>
|
||||
#include <units/prefix.h>
|
||||
#include <units/ratio.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,7 +22,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/iec80000/modulation_rate.h>
|
||||
#include <units/isq/iec80000/storage_capacity.h>
|
||||
#include <units/isq/iec80000/traffic_intensity.h>
|
||||
#include <units/isq/iec80000/transfer_rate.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -23,7 +23,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/frequency.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units::isq::iec80000 {
|
||||
|
||||
|
@@ -24,9 +24,14 @@
|
||||
|
||||
#include <units/base_dimension.h>
|
||||
#include <units/isq/iec80000/binary_prefixes.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/unit.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units::isq::iec80000 {
|
||||
|
||||
|
@@ -23,9 +23,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/base_dimension.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/unit.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units::isq::iec80000 {
|
||||
|
||||
|
@@ -25,7 +25,12 @@
|
||||
#include <units/derived_dimension.h>
|
||||
#include <units/isq/iec80000/storage_capacity.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units::isq::iec80000 {
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/natural/bits/dimensions.h>
|
||||
#include <units/isq/natural/dimensions.h>
|
||||
|
||||
namespace units::isq::natural {
|
||||
|
||||
|
@@ -22,9 +22,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions.h>
|
||||
#include <units/isq/natural/bits/units.h>
|
||||
#include <units/isq/natural/units.h>
|
||||
#include <units/quantity.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units::isq::natural {
|
||||
|
@@ -22,9 +22,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MP_UNITS_SYSTEM_NATURAL
|
||||
|
||||
#include "bits/dimensions.h"
|
||||
#include "bits/units.h"
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include "dimensions.h"
|
||||
#include "units.h"
|
||||
#include "constants.h"
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,8 +22,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/unit.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::natural {
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/absorbed_dose.h>
|
||||
#include <units/isq/dimensions/acceleration.h>
|
||||
#include <units/isq/dimensions/amount_of_substance.h>
|
||||
@@ -68,3 +69,4 @@
|
||||
#include <units/isq/dimensions/torque.h>
|
||||
#include <units/isq/dimensions/voltage.h>
|
||||
#include <units/isq/dimensions/volume.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,9 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/acceleration.h>
|
||||
#include <units/isq/si/cgs/speed.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/speed.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,9 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/area.h>
|
||||
#include <units/isq/si/area.h>
|
||||
#include <units/isq/si/cgs/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/cgs/length.h>
|
||||
#include <units/isq/si/cgs/mass.h>
|
||||
#include <units/isq/si/cgs/time.h>
|
||||
@@ -33,3 +34,4 @@
|
||||
#include <units/isq/si/cgs/power.h>
|
||||
#include <units/isq/si/cgs/pressure.h>
|
||||
#include <units/isq/si/cgs/speed.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,10 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/energy.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/force.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,11 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/force.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/acceleration.h>
|
||||
#include <units/isq/si/cgs/mass.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,8 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,8 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/mass.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/mass.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/mass.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/power.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/energy.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,11 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/pressure.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/area.h>
|
||||
#include <units/isq/si/cgs/force.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/speed.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/cgs/length.h>
|
||||
#include <units/isq/si/cgs/time.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,8 +22,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/time.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
namespace units::isq::si::cgs {
|
||||
|
||||
|
@@ -22,9 +22,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/acceleration.h>
|
||||
#include <units/isq/si/fps/speed.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/speed.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,9 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/area.h>
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/density.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/mass.h>
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/energy.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/force.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
@@ -37,12 +42,9 @@ struct dim_energy : isq::dim_energy<dim_energy, foot_poundal, dim_force, dim_len
|
||||
// https://en.wikipedia.org/wiki/Foot-pound_(energy)
|
||||
struct foot_pound_force : noble_deduced_unit<foot_pound_force, dim_energy, pound_force, foot> {};
|
||||
|
||||
|
||||
|
||||
template<UnitOf<dim_energy> U, Representation Rep = double>
|
||||
using energy = quantity<dim_energy, U, Rep>;
|
||||
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// foot poundal
|
||||
@@ -55,11 +57,4 @@ constexpr auto operator"" _q_ft_lbf(long double l) { return energy<foot_pound_fo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft_pdl = reference<dim_energy, foot_poundal>{};
|
||||
inline constexpr auto ft_lbf = reference<dim_energy, foot_pound_force>{};
|
||||
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@@ -22,11 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/force.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/acceleration.h>
|
||||
#include <units/isq/si/fps/mass.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/isq/si/fps/mass.h>
|
||||
#include <units/isq/si/fps/time.h>
|
||||
@@ -35,3 +36,4 @@
|
||||
#include <units/isq/si/fps/pressure.h>
|
||||
#include <units/isq/si/fps/speed.h>
|
||||
#include <units/isq/si/fps/volume.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,8 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
@@ -47,8 +54,6 @@ struct mile : named_scaled_unit<mile, "mile", no_prefix, ratio(5'280), foot> {};
|
||||
|
||||
struct nautical_mile : named_scaled_unit<nautical_mile, "mi(naut)", no_prefix, ratio(2'000), yard> {};
|
||||
|
||||
|
||||
|
||||
struct dim_length : isq::dim_length<foot> {};
|
||||
|
||||
template<UnitOf<dim_length> U, Representation Rep = double>
|
||||
|
@@ -22,8 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/mass.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/mass.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/mass.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,10 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/power.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/energy.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,11 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/pressure.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/area.h>
|
||||
#include <units/isq/si/fps/force.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,10 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/speed.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/isq/si/fps/time.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,8 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/time.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/time.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,9 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/volume.h>
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/fps/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::fps {
|
||||
|
||||
|
@@ -22,4 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/iau/length.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -23,7 +23,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::iau {
|
||||
|
||||
|
@@ -22,4 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/imperial/length.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,7 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::imperial {
|
||||
|
||||
|
@@ -22,8 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/area.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/area.h>
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::international {
|
||||
|
||||
|
@@ -22,8 +22,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/international/length.h>
|
||||
|
||||
#include <units/isq/si/international/area.h>
|
||||
#include <units/isq/si/international/speed.h>
|
||||
#include <units/isq/si/international/volume.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -23,7 +23,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::international {
|
||||
|
||||
|
@@ -22,8 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/speed.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/speed.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::international {
|
||||
|
||||
|
@@ -22,8 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/isq/si/volume.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/volume.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/international/length.h>
|
||||
#include <units/isq/si/volume.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::international {
|
||||
|
||||
|
@@ -23,7 +23,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::typographic {
|
||||
|
||||
|
@@ -22,4 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/typographic/length.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,7 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si::us {
|
||||
|
||||
|
@@ -22,4 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/si/us/length.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
@@ -22,10 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/absorbed_dose.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/energy.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,9 +22,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/acceleration.h>
|
||||
#include <units/isq/si/speed.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
#include <units/unit.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/speed.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/reference.h>
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/amount_of_substance.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,11 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/angular_velocity.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/generic/angle.h>
|
||||
#include <units/isq/si/time.h>
|
||||
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,9 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/area.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,11 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/capacitance.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/electric_charge.h>
|
||||
#include <units/isq/si/voltage.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,11 +22,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/catalytic_activity.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/amount_of_substance.h>
|
||||
#include <units/isq/si/time.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,11 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/charge_density.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/electric_charge.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,10 +22,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/concentration.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/amount_of_substance.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,10 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/conductance.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/reference.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/resistance.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,11 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/current_density.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/electric_current.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
@@ -22,11 +22,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <units/isq/dimensions/density.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/symbol_text.h>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#include <units/isq/si/mass.h>
|
||||
#include <units/isq/si/length.h>
|
||||
#include <units/isq/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user