forked from mpusz/mp-units
refactor: Fine-grained references support added
This commit is contained in:
@@ -39,12 +39,12 @@
|
||||
namespace {
|
||||
|
||||
using namespace units::isq;
|
||||
using namespace si::references;
|
||||
using namespace si::mass_references;
|
||||
using namespace si::volume_references;
|
||||
|
||||
inline constexpr Acceleration auto g = si::si2019::standard_gravity<>;
|
||||
inline constexpr Density auto air_density = 1.225 * (kg / m3);
|
||||
|
||||
|
||||
class Box {
|
||||
si::area<si::square_metre> base_;
|
||||
si::length<si::metre> height_;
|
||||
@@ -82,6 +82,8 @@ public:
|
||||
int main()
|
||||
{
|
||||
using namespace units;
|
||||
using namespace si::length_references;
|
||||
using namespace si::time_references;
|
||||
|
||||
const si::length<si::metre> height = 200.0 * mm;
|
||||
auto box = Box(1000.0 * mm, 500.0 * mm, height);
|
||||
|
||||
Reference in New Issue
Block a user