On 5/17/21 7:05 PM, Andy Little via Std-Discussion wrote:
>
>
> int main()
> {
> auto a = std::chrono::milliseconds{5};
> auto b = a + a; //this works fine
> auto c = a + 5ns; // so why not this?
> }
>
If this is possible, what should decltype(5ns) be?
That depends on the context, but this would clear things up:
decltype(pqs::si::5ns)
decltype(std::literals::5ns)
| | kwikius/pqsC++ Physical Quantities System. Contribute to kwikius/pqs development by creating an account on GitHub. |
|
|