C++ Logo

sg16

Advanced search

__STDC_ISO_10646__

From: Fraser Gordon <fraserjgordon+cpp_at_[hidden]>
Date: Thu, 12 Jan 2023 10:50:31 -0500
Hi folks,

I know this macro has been discussed already but I wanted to throw in my
handful of cents on the topic. They've probably been covered before so
please forgive any duplication!

I'm coming at this from the point of view that the macro isn't particularly
useful as-is due to a dependence on run-time state (the current locale) and
that it isn't our macro to freely redefine (being STDC). Based on that,
there are a couple of options that come to mind:

   1. strike the macro entirely - it's conditionally-defined (so a
   conforming C++ program should not depend on it? My reading is that a
   compiler _may_ define this if the condition holds but it isn't required
   to). A compiler that defines __STDC_VERSION__ claiming to also be a C
   compiler can then define it according to the rules of C.
   2. keep the macro but use the same language as for __STDC_VERSION__ -
   whether it's defined and with what value are implementation-defined. Like
   with the version, the implication is that you'd go look up the C standard
   to find out what it means (but without making the C++ core language depend
   on C).

Fraser

Received on 2023-01-12 15:50:43