C++ Logo

std-discussion

Advanced search

Re: 2 big problems with User Defined literals:

From: Jason Cobb <jason.e.cobb_at_[hidden]>
Date: Mon, 17 May 2021 19:11:01 -0400
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?

-- 
Jason Cobb

Received on 2021-05-17 18:11:05