Closed GregKon closed 4 years ago
What exactly are you missing? I do not get what you mean by "dimensions analyse"
There is not so much more to say than what is already written in the README.md (A tiny bit more is here https://github.com/bernedom/SI/blob/master/doc/implementation-details.md) and in https://github.com/bernedom/SI/blob/master/CONTRIBUTING.md You can generate the API documentation by running doxygen.
I will try to unify or link those documents a bit better and mention the generation of the API documentation, or maybe generate and upload it to the ghpages for the releases.
for example:
some potentially more, I will try to find it out later.
Thanks for the hints, I will write some stuff and keep you in the loop for it.
@GregKon please check out the attached pull request for an attempt to document the issues you brought up.
Hi Valuable.
Am I correctly understand that: implict conversion is perform on underlaying integer type, e.g. uint16_t? it is importand since boost::units use double.
I wonder why in your implementation is limited to std::is_integral<>, what is true for all built in integers types.
I do use non built inteeger type what has all necessary operators (exepct some non obvious implict conversion) and behave like built in integer. For such purposes standard provide std::numeric_limits
The conversion is performed on whatever type is set in the template. For the literals this is either int64_t
or long double
. For arbitrarily constructed types whatever you pass. i.e metre_t<uint8_t>
would use uint8_t
, metre_t<double>
would use double
I'm using std::is_integral<> and std::is_floating_point for simplicity. But using std::numeric_limits::is_integer could work as well. This probably would enable compatibility with boost::multiprecision
and similar types.
I will consider changing that in the future if it does not interfere with SI bein 0-overhead for same-ratio units.
Dear Dominik
I am evaluating your great work. Before it may be used, it is always good idea to understand how it works. I wonder if you may add to documentation some details how the architecture works, how dimensions analyse works in your implementation, some very basic, may be few words. I suppose detail::unit_t is a most important class.
So far from documentation I know that it is: "type safety at compile time".