Date: Tue, 18 May 2021 11:05:36 +0000 (UTC)
On Tuesday, 18 May 2021, 00:11:15 BST, Jason Cobb via Std-Discussion <std-discussion_at_[hidden]> wrote:
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/pqs
|
|
|
| | |
|
|
|
| |
kwikius/pqs
C++ Physical Quantities System. Contribute to kwikius/pqs development by creating an account on GitHub.
|
|
|
Std-Discussion mailing list
Std-Discussion_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
Received on 2021-05-18 06:05:53