Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
time.h File Reference

units representing time values More...

#include <units/core.h>
Include dependency graph for time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  units
 Unit Conversion Library namespace.
namespace  units::time
 namespace for unit types and containers representing time values

Macros

#define units_time_h_
#define UNIT_ADD_WITH_PLURAL_TAG(namespaceName, namePlural, abbreviation, ...)
 Like UNIT_ADD, but WITHOUT the unit constant, whose name would collide with the abbreviation, e.g.

Functions

 units::UNIT_ADD_STRONG_CONVERSION_FACTOR (time, minutes, conversion_factor< std::ratio< 60 >, seconds_ >) UNIT_ADD_UNIT_DEFINITION(time
conversion_factor< std::ratio< 60 >, seconds_ > units::UNIT_ADD_NAME (time, minutes, min) UNIT_REGISTER_NAMED_CLASS(time

Variables

 units::minutes

Detailed Description

units representing time values

Macro Definition Documentation

◆ UNIT_ADD_WITH_PLURAL_TAG

#define UNIT_ADD_WITH_PLURAL_TAG ( namespaceName,
namePlural,
abbreviation,
... )
Value:
UNIT_ADD_STRONG_CONVERSION_FACTOR(namespaceName, namePlural, __VA_ARGS__) \
UNIT_ADD_UNIT_DEFINITION(namespaceName, namePlural, __VA_ARGS__) \
UNIT_ADD_NAME(namespaceName, namePlural, abbreviation) \
UNIT_REGISTER_NAMED_CLASS(namespaceName, namePlural) \
UNIT_ADD_LITERALS(namespaceName, namePlural, abbreviation)
#define UNIT_ADD_STRONG_CONVERSION_FACTOR(namespaceName, namePlural,...)
Helper macro for generating the boilerplate code generating the tags of a new unit.
Definition core.h:221

Like UNIT_ADD, but WITHOUT the unit constant, whose name would collide with the abbreviation, e.g.

minutes with abbreviation min (the constant min clashes).

Registers everything UNIT_ADD does except UNIT_ADD_CONSTANT: the strong conversion factor and the named-class registration are included so name()/abbreviation() resolve and diagnostics print the friendly type, exactly as for a UNIT_ADD unit.

See also
UNIT_ADD