forked from mpusz/mp-units
refactor: modules-like behavior for systems removed to improve broken compile-time
Reffers to #32
This commit is contained in:
@ -26,7 +26,9 @@ analysis and unit/quantity manipulation. The basic idea and design heavily bases
|
||||
Here is a small example of possible operations:
|
||||
|
||||
```cpp
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/area.h>
|
||||
#include <units/physical/si/derived/frequency.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
|
||||
using namespace units::physical::si;
|
||||
|
||||
@ -57,8 +59,8 @@ and dimensional analysis can be performed without sacrificing on accuracy. Pleas
|
||||
the below example for a quick preview of basic library features:
|
||||
|
||||
```cpp
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/physical/si/international/derived/speed.h>
|
||||
#include <units/format.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -3,7 +3,9 @@ Quick Start
|
||||
|
||||
Here is a small example of possible operations::
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/area.h>
|
||||
#include <units/physical/si/derived/frequency.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
|
||||
using namespace units::physical::si;
|
||||
|
||||
@ -27,7 +29,7 @@ Here is a small example of possible operations::
|
||||
|
||||
.. admonition:: Try it on Compiler Explorer
|
||||
|
||||
`Example #1 <https://godbolt.org/z/oc7P9z>`_
|
||||
`Example #1 <https://godbolt.org/z/jrKeqe>`_
|
||||
|
||||
This library requires some C++20 features (concepts, classes as
|
||||
:abbr:`NTTP (Non-Type Template Parameter)`, ...). Thanks to them the user gets a powerful
|
||||
@ -35,8 +37,8 @@ but still easy to use interface where all unit conversions and dimensional analy
|
||||
performed without sacrificing on accuracy. Please see the below example for a quick preview
|
||||
of basic library features::
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/physical/si/international/derived/speed.h>
|
||||
#include <units/format.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Absorbed Dose
|
||||
=============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/absorbed_dose.h
|
||||
.. doxygenfile:: si/derived/absorbed_dose.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Acceleration
|
||||
============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/acceleration.h
|
||||
.. doxygenfile:: si/derived/acceleration.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Area
|
||||
====
|
||||
|
||||
.. doxygenfile:: si/bits/derived/area.h
|
||||
.. doxygenfile:: si/derived/area.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Capacitance
|
||||
===========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/capacitance.h
|
||||
.. doxygenfile:: si/derived/capacitance.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Catalytic Activity
|
||||
==================
|
||||
|
||||
.. doxygenfile:: si/bits/derived/catalytic_activity.h
|
||||
.. doxygenfile:: si/derived/catalytic_activity.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Acceleration
|
||||
============
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/acceleration.h
|
||||
.. doxygenfile:: si/cgs/derived/acceleration.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Area
|
||||
====
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/area.h
|
||||
.. doxygenfile:: si/cgs/derived/area.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Energy
|
||||
======
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/energy.h
|
||||
.. doxygenfile:: si/cgs/derived/energy.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Force
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/force.h
|
||||
.. doxygenfile:: si/cgs/derived/force.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Power
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/power.h
|
||||
.. doxygenfile:: si/cgs/derived/power.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Pressure
|
||||
========
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/pressure.h
|
||||
.. doxygenfile:: si/cgs/derived/pressure.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Speed
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/cgs/bits/derived/speed.h
|
||||
.. doxygenfile:: si/cgs/derived/speed.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Charge Density
|
||||
==============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/charge_density.h
|
||||
.. doxygenfile:: si/derived/charge_density.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Concentration
|
||||
=============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/conductance.h
|
||||
.. doxygenfile:: si/derived/conductance.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Conductance
|
||||
===========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/conductance.h
|
||||
.. doxygenfile:: si/derived/conductance.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Current density
|
||||
===============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/current_density.h
|
||||
.. doxygenfile:: si/derived/current_density.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Density
|
||||
=======
|
||||
|
||||
.. doxygenfile:: si/bits/derived/density.h
|
||||
.. doxygenfile:: si/derived/density.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Dynamic Viscosity
|
||||
=================
|
||||
|
||||
.. doxygenfile:: si/bits/derived/dynamic_viscosity.h
|
||||
.. doxygenfile:: si/derived/dynamic_viscosity.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Electric Charge
|
||||
===============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/electric_charge.h
|
||||
.. doxygenfile:: si/derived/electric_charge.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Electric Field Strength
|
||||
=======================
|
||||
|
||||
.. doxygenfile:: si/bits/derived/electric_field_strength.h
|
||||
.. doxygenfile:: si/derived/electric_field_strength.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Energy
|
||||
======
|
||||
|
||||
.. doxygenfile:: si/bits/derived/energy.h
|
||||
.. doxygenfile:: si/derived/energy.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Force
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/bits/derived/force.h
|
||||
.. doxygenfile:: si/derived/force.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Acceleration
|
||||
============
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/acceleration.h
|
||||
.. doxygenfile:: si/fps/derived/acceleration.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Area
|
||||
====
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/area.h
|
||||
.. doxygenfile:: si/fps/derived/area.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Density
|
||||
=======
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/density.h
|
||||
.. doxygenfile:: si/fps/derived/density.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Energy
|
||||
======
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/energy.h
|
||||
.. doxygenfile:: si/fps/derived/energy.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Force
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/force.h
|
||||
.. doxygenfile:: si/fps/derived/force.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Power
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/power.h
|
||||
.. doxygenfile:: si/fps/derived/power.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Pressure
|
||||
========
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/pressure.h
|
||||
.. doxygenfile:: si/fps/derived/pressure.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Speed
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/speed.h
|
||||
.. doxygenfile:: si/fps/derived/speed.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Volume
|
||||
======
|
||||
|
||||
.. doxygenfile:: si/fps/bits/derived/volume.h
|
||||
.. doxygenfile:: si/fps/derived/volume.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Frequency
|
||||
=========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/frequency.h
|
||||
.. doxygenfile:: si/derived/frequency.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Heat Capacity
|
||||
=============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/heat_capacity.h
|
||||
.. doxygenfile:: si/derived/heat_capacity.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Inductance
|
||||
==========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/inductance.h
|
||||
.. doxygenfile:: si/derived/inductance.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Area
|
||||
====
|
||||
|
||||
.. doxygenfile:: si/international/bits/derived/area.h
|
||||
.. doxygenfile:: si/international/derived/area.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Speed
|
||||
=====
|
||||
|
||||
.. doxygenfile:: speed/bits/derived/speed.h
|
||||
.. doxygenfile:: speed/derived/speed.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Volume
|
||||
======
|
||||
|
||||
.. doxygenfile:: si/international/bits/derived/volume.h
|
||||
.. doxygenfile:: si/international/derived/volume.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Luminous Intensity
|
||||
==================
|
||||
|
||||
.. doxygenfile:: si/bits/derived/luminous_intensity.h
|
||||
.. doxygenfile:: si/derived/luminous_intensity.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Magnetic Flux
|
||||
=============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/magnetic_flux.h
|
||||
.. doxygenfile:: si/derived/magnetic_flux.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Magnetic Induction
|
||||
==================
|
||||
|
||||
.. doxygenfile:: si/bits/derived/magnetic_induction.h
|
||||
.. doxygenfile:: si/derived/magnetic_induction.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Molar Energy
|
||||
============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/molar_energy.h
|
||||
.. doxygenfile:: si/derived/molar_energy.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Momentum
|
||||
========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/momentum.h
|
||||
.. doxygenfile:: si/derived/momentum.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Permeability
|
||||
============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/permeability.h
|
||||
.. doxygenfile:: si/derived/permeability.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Permittivity
|
||||
============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/permittivity.h
|
||||
.. doxygenfile:: si/derived/permittivity.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Power
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/bits/derived/power.h
|
||||
.. doxygenfile:: si/derived/power.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Prefixes
|
||||
========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/prefixes.h
|
||||
.. doxygenfile:: si/derived/prefixes.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Pressure
|
||||
========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/pressure.h
|
||||
.. doxygenfile:: si/derived/pressure.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Resistance
|
||||
==========
|
||||
|
||||
.. doxygenfile:: si/bits/derived/resistance.h
|
||||
.. doxygenfile:: si/derived/resistance.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Speed
|
||||
=====
|
||||
|
||||
.. doxygenfile:: si/bits/derived/speed.h
|
||||
.. doxygenfile:: si/derived/speed.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Surface Tension
|
||||
===============
|
||||
|
||||
.. doxygenfile:: si/bits/derived/surface_tension.h
|
||||
.. doxygenfile:: si/derived/surface_tension.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Thermal Conductivity
|
||||
====================
|
||||
|
||||
.. doxygenfile:: si/bits/derived/thermal_conductivity.h
|
||||
.. doxygenfile:: si/derived/thermal_conductivity.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Voltage
|
||||
=======
|
||||
|
||||
.. doxygenfile:: si/bits/derived/voltage.h
|
||||
.. doxygenfile:: si/derived/voltage.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
Volume
|
||||
======
|
||||
|
||||
.. doxygenfile:: si/bits/derived/volume.h
|
||||
.. doxygenfile:: si/derived/volume.h
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/acceleration.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/area.h>
|
||||
|
||||
namespace area {
|
||||
|
||||
|
@ -20,7 +20,9 @@
|
||||
physical_quantities
|
||||
*/
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/capacitance.h>
|
||||
#include <units/physical/si/derived/resistance.h>
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/math.h>
|
||||
#include "./voltage.h"
|
||||
#include <iostream>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/density.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/force.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/imperial/imperial.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/typographic/typographic.h>
|
||||
#include <units/physical/si/us/us.h>
|
||||
#include <units/physical/si/iau/iau.h>
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/physical/si/imperial/base/length.h>
|
||||
#include <units/physical/si/international/base/length.h>
|
||||
#include <units/physical/si/typographic/base/length.h>
|
||||
#include <units/physical/si/us/base/length.h>
|
||||
#include <units/physical/si/iau/base/length.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/base/mass.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/base/time.h>
|
||||
|
||||
// named qtime due to conflict with time_t time(time_t*)
|
||||
namespace q_time {
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
// get at the units text of the quantity, without its numeric value
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/voltage.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/volume.h>
|
||||
|
||||
namespace units{
|
||||
namespace experimental{
|
||||
|
@ -20,9 +20,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/si/cgs/cgs.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/cgs/derived/speed.h>
|
||||
#include <units/physical/si/international/derived/speed.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
@ -1,4 +1,11 @@
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/acceleration.h>
|
||||
#include <units/physical/si/constants.h>
|
||||
#include <units/physical/si/derived/density.h>
|
||||
#include <units/physical/si/derived/force.h>
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/physical/si/base/mass.h>
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/physical/si/derived/volume.h>
|
||||
#include <units/format.h>
|
||||
#include <cassert>
|
||||
|
||||
|
@ -20,7 +20,10 @@
|
||||
physical_quantities
|
||||
*/
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/capacitance.h>
|
||||
#include <units/physical/si/derived/resistance.h>
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/physical/si/derived/voltage.h>
|
||||
#include <units/math.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -16,12 +16,15 @@
|
||||
*/
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/iau/iau.h>
|
||||
#include <units/physical/si/imperial/imperial.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/typographic/typographic.h>
|
||||
#include <units/physical/si/us/us.h>
|
||||
#include <units/physical/si/derived/area.h>
|
||||
#include <units/physical/si/iau/base/length.h>
|
||||
#include <units/physical/si/imperial/base/length.h>
|
||||
#include <units/physical/si/international/base/length.h>
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/physical/si/typographic/base/length.h>
|
||||
#include <units/physical/si/us/base/length.h>
|
||||
#include <units/physical/si/derived/volume.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
@ -15,7 +15,7 @@
|
||||
along with this program. If not, see http://www.gnu.org/licenses./
|
||||
*/
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/format.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -22,7 +22,9 @@
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/generic/angle.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/physical/si/derived/energy.h>
|
||||
#include <units/physical/si/derived/torque.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace units;
|
||||
|
@ -22,8 +22,17 @@
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/format.h>
|
||||
#include <units/physical/si/fps/fps.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/fps/derived/density.h>
|
||||
#include <units/physical/si/fps/base/length.h>
|
||||
#include <units/physical/si/fps/base/mass.h>
|
||||
#include <units/physical/si/fps/derived/power.h>
|
||||
#include <units/physical/si/fps/derived/speed.h>
|
||||
#include <units/physical/si/fps/derived/volume.h>
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/physical/si/base/mass.h>
|
||||
#include <units/physical/si/derived/power.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/physical/si/derived/volume.h>
|
||||
#include <units/quantity.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/math.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/international/base/length.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/quantity_point.h>
|
||||
#include <array>
|
||||
#include <compare>
|
||||
|
@ -21,8 +21,8 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/format.h>
|
||||
#include <units/physical/si/international/international.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/international/derived/speed.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace units::physical;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <units/format.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <iostream>
|
||||
#include <array>
|
||||
|
||||
|
@ -20,7 +20,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/physical/si/derived/force.h>
|
||||
#include <units/physical/si/derived/energy.h>
|
||||
#include <units/format.h>
|
||||
#include <linear_algebra.hpp>
|
||||
#include <iostream>
|
||||
|
@ -20,7 +20,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/acceleration.h>
|
||||
#include <cmath>
|
||||
#include <compare>
|
||||
#include <iostream>
|
||||
|
@ -20,8 +20,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/natural/natural.h>
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/natural/constants.h>
|
||||
#include <units/physical/si/derived/energy.h>
|
||||
#include <units/physical/si/derived/momentum.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/physical/si/constants.h>
|
||||
#include <units/math.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/si/si.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
@ -40,7 +40,6 @@ void example()
|
||||
Time auto t1 = 10_q_s;
|
||||
Speed auto v1 = avg_speed(d1, t1);
|
||||
|
||||
// TODO: check if below is still true after adding whole SI module
|
||||
auto temp1 = v1 * 50_q_m; // produces intermediate unknown dimension with 'unknown_coherent_unit' as its 'coherent_unit'
|
||||
Speed auto v2 = temp1 / 100_q_m; // back to known dimensions again
|
||||
Length auto d2 = v2 * 60_q_s;
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MP_UNITS_SYSTEM_DATA
|
||||
|
||||
#include <units/data/base/information.h>
|
||||
#include <units/data/bits/derived/bitrate.h>
|
||||
#include <units/data/derived/bitrate.h>
|
||||
#include <units/data/prefixes.h>
|
||||
|
@ -22,12 +22,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef MP_UNITS_SYSTEM_DATA
|
||||
|
||||
#error "Please do not include this file directly. Use `units/physical/data/data.h` to prevent potential ODR violation issues."
|
||||
|
||||
#endif
|
||||
|
||||
#include <units/data/base/information.h>
|
||||
#include <units/derived_dimension.h>
|
||||
#include <units/physical/si/base/time.h>
|
@ -1,73 +0,0 @@
|
||||
// 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
|
||||
|
||||
#include <units/concepts.h>
|
||||
|
||||
#include <units/physical/bits/absorbed_dose.h>
|
||||
#include <units/physical/bits/acceleration.h>
|
||||
#include <units/physical/bits/amount_of_substance.h>
|
||||
#include <units/physical/bits/angular_velocity.h>
|
||||
#include <units/physical/bits/area.h>
|
||||
#include <units/physical/bits/capacitance.h>
|
||||
#include <units/physical/bits/catalytic_activity.h>
|
||||
#include <units/physical/bits/charge_density.h>
|
||||
#include <units/physical/bits/concentration.h>
|
||||
#include <units/physical/bits/conductance.h>
|
||||
#include <units/physical/bits/current_density.h>
|
||||
#include <units/physical/bits/density.h>
|
||||
#include <units/physical/bits/dimensions.h>
|
||||
#include <units/physical/bits/dynamic_viscosity.h>
|
||||
#include <units/physical/bits/electric_charge.h>
|
||||
#include <units/physical/bits/electric_current.h>
|
||||
#include <units/physical/bits/electric_field_strength.h>
|
||||
#include <units/physical/bits/energy.h>
|
||||
// TODO Add when downcasting issue is solved
|
||||
// #include <units/physical/bits/energy_density.h>
|
||||
#include <units/physical/bits/force.h>
|
||||
#include <units/physical/bits/frequency.h>
|
||||
#include <units/physical/bits/heat_capacity.h>
|
||||
#include <units/physical/bits/inductance.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/bits/luminance.h>
|
||||
#include <units/physical/bits/luminous_intensity.h>
|
||||
#include <units/physical/bits/magnetic_flux.h>
|
||||
#include <units/physical/bits/magnetic_induction.h>
|
||||
#include <units/physical/bits/mass.h>
|
||||
#include <units/physical/bits/molar_energy.h>
|
||||
#include <units/physical/bits/momentum.h>
|
||||
#include <units/physical/bits/permeability.h>
|
||||
#include <units/physical/bits/permittivity.h>
|
||||
#include <units/physical/bits/power.h>
|
||||
#include <units/physical/bits/pressure.h>
|
||||
// TODO Add when downcasting issue is solved
|
||||
// #include <units/physical/bits/radioactivity.h>
|
||||
#include <units/physical/bits/resistance.h>
|
||||
#include <units/physical/bits/speed.h>
|
||||
#include <units/physical/bits/surface_tension.h>
|
||||
#include <units/physical/bits/thermal_conductivity.h>
|
||||
#include <units/physical/bits/thermodynamic_temperature.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/bits/torque.h>
|
||||
#include <units/physical/bits/voltage.h>
|
||||
#include <units/physical/bits/volume.h>
|
@ -22,50 +22,49 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/bits/absorbed_dose.h>
|
||||
#include <units/physical/bits/acceleration.h>
|
||||
#include <units/physical/bits/amount_of_substance.h>
|
||||
#include <units/physical/bits/angular_velocity.h>
|
||||
#include <units/physical/bits/area.h>
|
||||
#include <units/physical/bits/capacitance.h>
|
||||
#include <units/physical/bits/catalytic_activity.h>
|
||||
#include <units/physical/bits/charge_density.h>
|
||||
#include <units/physical/bits/concentration.h>
|
||||
#include <units/physical/bits/conductance.h>
|
||||
#include <units/physical/bits/current_density.h>
|
||||
#include <units/physical/bits/density.h>
|
||||
#include <units/physical/bits/dimensions.h>
|
||||
#include <units/physical/bits/dynamic_viscosity.h>
|
||||
#include <units/physical/bits/electric_charge.h>
|
||||
#include <units/physical/bits/electric_current.h>
|
||||
#include <units/physical/bits/electric_field_strength.h>
|
||||
#include <units/physical/bits/energy.h>
|
||||
#include <units/physical/dimensions/absorbed_dose.h>
|
||||
#include <units/physical/dimensions/acceleration.h>
|
||||
#include <units/physical/dimensions/amount_of_substance.h>
|
||||
#include <units/physical/dimensions/angular_velocity.h>
|
||||
#include <units/physical/dimensions/area.h>
|
||||
#include <units/physical/dimensions/capacitance.h>
|
||||
#include <units/physical/dimensions/catalytic_activity.h>
|
||||
#include <units/physical/dimensions/charge_density.h>
|
||||
#include <units/physical/dimensions/concentration.h>
|
||||
#include <units/physical/dimensions/conductance.h>
|
||||
#include <units/physical/dimensions/current_density.h>
|
||||
#include <units/physical/dimensions/density.h>
|
||||
#include <units/physical/dimensions/dynamic_viscosity.h>
|
||||
#include <units/physical/dimensions/electric_charge.h>
|
||||
#include <units/physical/dimensions/electric_current.h>
|
||||
#include <units/physical/dimensions/electric_field_strength.h>
|
||||
#include <units/physical/dimensions/energy.h>
|
||||
// TODO Add when downcasting issue is solved
|
||||
// #include <units/physical/bits/energy_density.h>
|
||||
#include <units/physical/bits/force.h>
|
||||
#include <units/physical/bits/frequency.h>
|
||||
#include <units/physical/bits/heat_capacity.h>
|
||||
#include <units/physical/bits/inductance.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/bits/luminance.h>
|
||||
#include <units/physical/bits/luminous_intensity.h>
|
||||
#include <units/physical/bits/magnetic_flux.h>
|
||||
#include <units/physical/bits/magnetic_induction.h>
|
||||
#include <units/physical/bits/mass.h>
|
||||
#include <units/physical/bits/molar_energy.h>
|
||||
#include <units/physical/bits/momentum.h>
|
||||
#include <units/physical/bits/permeability.h>
|
||||
#include <units/physical/bits/permittivity.h>
|
||||
#include <units/physical/bits/power.h>
|
||||
#include <units/physical/bits/pressure.h>
|
||||
// #include <units/physical/dimensions/energy_density.h>
|
||||
#include <units/physical/dimensions/force.h>
|
||||
#include <units/physical/dimensions/frequency.h>
|
||||
#include <units/physical/dimensions/heat_capacity.h>
|
||||
#include <units/physical/dimensions/inductance.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
#include <units/physical/dimensions/luminance.h>
|
||||
#include <units/physical/dimensions/luminous_intensity.h>
|
||||
#include <units/physical/dimensions/magnetic_flux.h>
|
||||
#include <units/physical/dimensions/magnetic_induction.h>
|
||||
#include <units/physical/dimensions/mass.h>
|
||||
#include <units/physical/dimensions/molar_energy.h>
|
||||
#include <units/physical/dimensions/momentum.h>
|
||||
#include <units/physical/dimensions/permeability.h>
|
||||
#include <units/physical/dimensions/permittivity.h>
|
||||
#include <units/physical/dimensions/power.h>
|
||||
#include <units/physical/dimensions/pressure.h>
|
||||
// TODO Add when downcasting issue is solved
|
||||
// #include <units/physical/bits/radioactivity.h>
|
||||
#include <units/physical/bits/resistance.h>
|
||||
#include <units/physical/bits/speed.h>
|
||||
#include <units/physical/bits/surface_tension.h>
|
||||
#include <units/physical/bits/thermal_conductivity.h>
|
||||
#include <units/physical/bits/thermodynamic_temperature.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/bits/torque.h>
|
||||
#include <units/physical/bits/voltage.h>
|
||||
#include <units/physical/bits/volume.h>
|
||||
// #include <units/physical/dimensions/radioactivity.h>
|
||||
#include <units/physical/dimensions/resistance.h>
|
||||
#include <units/physical/dimensions/speed.h>
|
||||
#include <units/physical/dimensions/surface_tension.h>
|
||||
#include <units/physical/dimensions/thermal_conductivity.h>
|
||||
#include <units/physical/dimensions/thermodynamic_temperature.h>
|
||||
#include <units/physical/dimensions/time.h>
|
||||
#include <units/physical/dimensions/torque.h>
|
||||
#include <units/physical/dimensions/voltage.h>
|
||||
#include <units/physical/dimensions/volume.h>
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/energy.h>
|
||||
#include <units/physical/bits/mass.h>
|
||||
#include <units/physical/dimensions/energy.h>
|
||||
#include <units/physical/dimensions/mass.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
#include <units/physical/dimensions/time.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/generic/angle.h>
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/dimensions/time.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/electric_charge.h>
|
||||
#include <units/physical/bits/voltage.h>
|
||||
#include <units/physical/dimensions/electric_charge.h>
|
||||
#include <units/physical/dimensions/voltage.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/bits/amount_of_substance.h>
|
||||
#include <units/physical/dimensions/amount_of_substance.h>
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/dimensions/time.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/electric_charge.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/dimensions/electric_charge.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/bits/amount_of_substance.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
#include <units/physical/dimensions/amount_of_substance.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/resistance.h>
|
||||
#include <units/physical/dimensions/resistance.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/electric_current.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/dimensions/electric_current.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/bits/mass.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
#include <units/physical/dimensions/mass.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/pressure.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/dimensions/pressure.h>
|
||||
#include <units/physical/dimensions/time.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/electric_current.h>
|
||||
#include <units/physical/bits/time.h>
|
||||
#include <units/physical/dimensions/electric_current.h>
|
||||
#include <units/physical/dimensions/time.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
@ -23,8 +23,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/physical/bits/length.h>
|
||||
#include <units/physical/bits/voltage.h>
|
||||
#include <units/physical/dimensions/length.h>
|
||||
#include <units/physical/dimensions/voltage.h>
|
||||
|
||||
namespace units::physical {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user