Suffix for chrono literals

Howard Hinnant howard.hinnant at
Wed Jul 24 13:13:15 PDT 2013

On Jul 23, 2013, at 11:56 AM, Marshall Clow <mclow.lists at> wrote:

> On Jul 22, 2013, at 2:09 PM, Marshall Clow <mclow.lists at> wrote:
>> Implements the "s" suffix for chrono literals as called for in N3642 + tests.

Thanks Marshall!

Just a few nits:


should be:


I've added a comment concerning the inline on namespace literals as we did for <string>.

I've added static_cast for each of the integral duration udl's along the lines of:

	constexpr chrono::hours operator"" h(unsigned long long __h)
		return chrono::hours(static_cast<chrono::hours::rep>(__h));

Patch enclosed for this.

Please commit with these changes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: chrono_literals.patch
Type: application/octet-stream
Size: 3595 bytes
Desc: not available
URL: <>

More information about the cfe-commits mailing list