Please see the 2018 thread below. I think this macro should be added to SD-6 and the IS, and I think it should also be updated to 201811L for the P1032R1 "Misc constexpr bits" changes that made the remaining char_traits members constexpr. All the other bits of P1032R1 have their own macro now instead of __cpp_lib_constexpr_misc, but not the char_traits bits.

Libstdc++ has been defining __cpp_lib_constexpr_char_traits to 201611 for years (and I'm about to update the value to 201811 in the relevant branches).

Any objection before I open an LWG issue?

---------- Forwarded message ---------
From: Richard Smith <>
Date: Fri, 15 Jun 2018 at 19:41
Subject: Re: [SG10] Is __cpp_lib_constexpr_char_traits "official"?
To: Jonathan Wakely <>
Cc: ( <>

It seems reasonable to me, at least.

On 15 June 2018 at 17:30, Jonathan Wakely <> wrote:
I don't see it in P0096R5, although recommended it.

It seems to be useful to know whether you can use char_traits<char>::length() in a constexpr function, or whether you need to write your own.

Features mailing list