refactor: Fine-grained references support added
This commit is contained in:
1 parent
afa67c5f43
commit
bd862d3517
59 files changed
+400
-68
No files matched your search
@@ -57,10 +57,16 @@ constexpr auto operator"" _q_rad(long double l) { return angle<radian, long doub
|
||||
|
||||
#ifdef UNITS_REFERENCES
|
||||
|
||||
namespace references {
|
||||
namespace angle_references {
|
||||
|
||||
inline constexpr auto rad = reference<dim_angle<>, radian>{};
|
||||
|
||||
} // namespace angle_references
|
||||
|
||||
namespace references {
|
||||
|
||||
using namespace angle_references;
|
||||
|
||||
} // namespace references
|
||||
|
||||
#endif // UNITS_REFERENCES
|
||||
|
||||
@@ -61,12 +61,18 @@ using reference_divide = detail::reference_divide_impl<
|
||||
* This type is intended to be used in the quantity references definition:
|
||||
*
|
||||
* @code{.cpp}
|
||||
* namespace references {
|
||||
* namespace length_references {
|
||||
*
|
||||
* inline constexpr auto m = reference<dim_length, metre>{};
|
||||
* inline constexpr auto km = reference<dim_length, kilometre>{};
|
||||
*
|
||||
* }
|
||||
*
|
||||
* namespace references {
|
||||
*
|
||||
* using namespace length_references;
|
||||
*
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
* Quantity references simplify quantity creation:
|
||||
|
||||
Reference in new issue
Block a user