C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: 2 big problems with User Defined literals:
From: Jason Cobb (jason.e.cobb_at_[hidden])
Date: 2021-05-17 18:11:01


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

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups