Logo
Explore Help
Sign In
feedc0de/mp-units
1
0
Fork 0
You've already forked mp-units
forked from mpusz/mp-units
Code Pull Requests Activity
Files
792dba28fbc94e2b6659d2a2fc312d1be0eb6c78
mp-units/example/alternative_namespaces/units_str.h

11 lines
353 B
C
Raw Normal View History

examples, alternative namespaces : Part2 of put alternative namespace definitions in local headers. examples, clcpp_response,alternative_namespaces::clcpp_response : use fmt functions for showing precision of quantities examples, alternative namespaces : combined the alternative namespace quantity typedefs in header files. examples, alternative namespaces : add simple timer example
2020-03-19 11:43:12 +00:00
#pragma once
#include <units/physical/si/prefixes.h>
#include <units/quantity.h>
// get at the units text of the quantity, without its numeric value
refactor: got rid of gcc-9 backlog BREAKING CHANGE: gcc-9.3 no longer supported
2020-09-08 13:09:34 +02:00
inline auto constexpr units_str(const units::Quantity auto& q)
examples, alternative namespaces : Part2 of put alternative namespace definitions in local headers. examples, clcpp_response,alternative_namespaces::clcpp_response : use fmt functions for showing precision of quantities examples, alternative namespaces : combined the alternative namespace quantity typedefs in header files. examples, alternative namespaces : add simple timer example
2020-03-19 11:43:12 +00:00
{
typedef std::remove_cvref_t<decltype(q)> qtype;
return units::detail::unit_text<typename qtype::dimension, typename qtype::unit>();
}
Copy Permalink
Powered by Gitea Version: 1.25.1 Page: 30ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API