1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // WARNING, this entire header is generated by
11 // utils/generate_escaped_output_table.py
12 // DO NOT MODIFY!
13 
14 // UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
15 //
16 // See Terms of Use <https://www.unicode.org/copyright.html>
17 // for definitions of Unicode Inc.'s Data Files and Software.
18 //
19 // NOTICE TO USER: Carefully read the following legal agreement.
20 // BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
21 // DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
22 // YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
23 // TERMS AND CONDITIONS OF THIS AGREEMENT.
24 // IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
25 // THE DATA FILES OR SOFTWARE.
26 //
27 // COPYRIGHT AND PERMISSION NOTICE
28 //
29 // Copyright (c) 1991-2022 Unicode, Inc. All rights reserved.
30 // Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
31 //
32 // Permission is hereby granted, free of charge, to any person obtaining
33 // a copy of the Unicode data files and any associated documentation
34 // (the "Data Files") or Unicode software and any associated documentation
35 // (the "Software") to deal in the Data Files or Software
36 // without restriction, including without limitation the rights to use,
37 // copy, modify, merge, publish, distribute, and/or sell copies of
38 // the Data Files or Software, and to permit persons to whom the Data Files
39 // or Software are furnished to do so, provided that either
40 // (a) this copyright and permission notice appear with all copies
41 // of the Data Files or Software, or
42 // (b) this copyright and permission notice appear in associated
43 // Documentation.
44 //
45 // THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
46 // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
47 // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
48 // NONINFRINGEMENT OF THIRD PARTY RIGHTS.
49 // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
50 // NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
51 // DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
52 // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
53 // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
54 // PERFORMANCE OF THE DATA FILES OR SOFTWARE.
55 //
56 // Except as contained in this notice, the name of a copyright holder
57 // shall not be used in advertising or otherwise to promote the sale,
58 // use or other dealings in these Data Files or Software without prior
59 // written authorization of the copyright holder.
60 
61 #ifndef _LIBCPP___FORMAT_ESCAPED_OUTPUT_TABLE_H
62 #define _LIBCPP___FORMAT_ESCAPED_OUTPUT_TABLE_H
63 
64 #include <__algorithm/ranges_upper_bound.h>
65 #include <__config>
66 #include <cstddef>
67 #include <cstdint>
68 
69 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
70 #  pragma GCC system_header
71 #endif
72 
73 _LIBCPP_BEGIN_NAMESPACE_STD
74 
75 #if _LIBCPP_STD_VER >= 23
76 
77 namespace __escaped_output_table {
78 // clang-format off
79 
80 /// The entries of the characters to escape in format's debug string.
81 ///
82 /// Contains the entries for [format.string.escaped]/2.2.1.2.1
83 ///   CE is a Unicode encoding and C corresponds to either a UCS scalar value
84 ///   whose Unicode property General_Category has a value in the groups
85 ///   Separator (Z) or Other (C) or to a UCS scalar value which has the Unicode
86 ///   property Grapheme_Extend=Yes, as described by table 12 of UAX #44
87 ///
88 /// Separator (Z) consists of General_Category
89 /// - Space_Separator,
90 /// - Line_Separator,
91 /// - Paragraph_Separator.
92 ///
93 /// Other (C) consists of General_Category
94 /// - Control,
95 /// - Format,
96 /// - Surrogate,
97 /// - Private_Use,
98 /// - Unassigned.
99 ///
100 /// The data is generated from
101 /// - https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
102 /// - https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedGeneralCategory.txt
103 ///
104 /// The table is similar to the table
105 ///  __extended_grapheme_custer_property_boundary::__entries
106 /// which explains the details of these classes. The only difference is this
107 /// table lacks a property, thus having more bits available for the size.
108 ///
109 /// The data has 2 values:
110 /// - bits [0, 10] The size of the range, allowing 2048 elements.
111 /// - bits [11, 31] The lower bound code point of the range. The upper bound of
112 ///   the range is lower bound + size.
113 inline constexpr uint32_t __entries[893] = {
114     0x00000020,
115     0x0003f821,
116     0x00056800,
117     0x0018006f,
118     0x001bc001,
119     0x001c0003,
120     0x001c5800,
121     0x001c6800,
122     0x001d1000,
123     0x00241806,
124     0x00298000,
125     0x002ab801,
126     0x002c5801,
127     0x002c802d,
128     0x002df800,
129     0x002e0801,
130     0x002e2001,
131     0x002e3808,
132     0x002f5803,
133     0x002fa810,
134     0x0030800a,
135     0x0030e000,
136     0x00325814,
137     0x00338000,
138     0x0036b007,
139     0x0036f805,
140     0x00373801,
141     0x00375003,
142     0x00387001,
143     0x00388800,
144     0x0039801c,
145     0x003d300a,
146     0x003d900d,
147     0x003f5808,
148     0x003fd802,
149     0x0040b003,
150     0x0040d808,
151     0x00412802,
152     0x00414806,
153     0x0041f800,
154     0x0042c804,
155     0x0042f800,
156     0x00435804,
157     0x00447810,
158     0x00465038,
159     0x0049d000,
160     0x0049e000,
161     0x004a0807,
162     0x004a6800,
163     0x004a8806,
164     0x004b1001,
165     0x004c0800,
166     0x004c2000,
167     0x004c6801,
168     0x004c8801,
169     0x004d4800,
170     0x004d8800,
171     0x004d9802,
172     0x004dd002,
173     0x004df000,
174     0x004e0805,
175     0x004e4801,
176     0x004e6800,
177     0x004e780c,
178     0x004ef000,
179     0x004f1003,
180     0x004ff004,
181     0x00502000,
182     0x00505803,
183     0x00508801,
184     0x00514800,
185     0x00518800,
186     0x0051a000,
187     0x0051b800,
188     0x0051d003,
189     0x00520817,
190     0x0052e800,
191     0x0052f806,
192     0x00538001,
193     0x0053a800,
194     0x0053b80b,
195     0x00542000,
196     0x00547000,
197     0x00549000,
198     0x00554800,
199     0x00558800,
200     0x0055a000,
201     0x0055d002,
202     0x00560807,
203     0x00565000,
204     0x00566802,
205     0x0056880e,
206     0x00571003,
207     0x00579006,
208     0x0057d007,
209     0x00582000,
210     0x00586801,
211     0x00588801,
212     0x00594800,
213     0x00598800,
214     0x0059a000,
215     0x0059d002,
216     0x0059f001,
217     0x005a0805,
218     0x005a4801,
219     0x005a680e,
220     0x005af000,
221     0x005b1003,
222     0x005bc00a,
223     0x005c2000,
224     0x005c5802,
225     0x005c8800,
226     0x005cb002,
227     0x005cd800,
228     0x005ce800,
229     0x005d0002,
230     0x005d2802,
231     0x005d5802,
232     0x005dd004,
233     0x005e0000,
234     0x005e1802,
235     0x005e4800,
236     0x005e6802,
237     0x005e8814,
238     0x005fd805,
239     0x00602000,
240     0x00606800,
241     0x00608800,
242     0x00614800,
243     0x0061d002,
244     0x0061f002,
245     0x00622812,
246     0x0062d801,
247     0x0062f001,
248     0x00631003,
249     0x00638006,
250     0x00640800,
251     0x00646800,
252     0x00648800,
253     0x00654800,
254     0x0065a000,
255     0x0065d002,
256     0x0065f800,
257     0x00661000,
258     0x00662801,
259     0x00664800,
260     0x00666010,
261     0x0066f800,
262     0x00671003,
263     0x00678000,
264     0x0067a00d,
265     0x00686800,
266     0x00688800,
267     0x0069d801,
268     0x0069f000,
269     0x006a0804,
270     0x006a4800,
271     0x006a6800,
272     0x006a8003,
273     0x006ab800,
274     0x006b1003,
275     0x006c0001,
276     0x006c2000,
277     0x006cb802,
278     0x006d9000,
279     0x006de000,
280     0x006df001,
281     0x006e3808,
282     0x006e9005,
283     0x006ef806,
284     0x006f8001,
285     0x006fa80b,
286     0x00718800,
287     0x0071a00a,
288     0x00723807,
289     0x0072e024,
290     0x00741800,
291     0x00742800,
292     0x00745800,
293     0x00752000,
294     0x00753000,
295     0x00758800,
296     0x0075a008,
297     0x0075f001,
298     0x00762800,
299     0x00763808,
300     0x0076d001,
301     0x0077001f,
302     0x0078c001,
303     0x0079a800,
304     0x0079b800,
305     0x0079c800,
306     0x007a4000,
307     0x007b6811,
308     0x007c0004,
309     0x007c3001,
310     0x007c6830,
311     0x007e3000,
312     0x007e6800,
313     0x007ed824,
314     0x00816803,
315     0x00819005,
316     0x0081c801,
317     0x0081e801,
318     0x0082c001,
319     0x0082f002,
320     0x00838803,
321     0x00841000,
322     0x00842801,
323     0x00846800,
324     0x0084e800,
325     0x00863000,
326     0x00864004,
327     0x00867001,
328     0x00924800,
329     0x00927001,
330     0x0092b800,
331     0x0092c800,
332     0x0092f001,
333     0x00944800,
334     0x00947001,
335     0x00958800,
336     0x0095b001,
337     0x0095f800,
338     0x00960800,
339     0x00963001,
340     0x0096b800,
341     0x00988800,
342     0x0098b001,
343     0x009ad804,
344     0x009be802,
345     0x009cd005,
346     0x009fb001,
347     0x009ff001,
348     0x00b40000,
349     0x00b4e802,
350     0x00b7c806,
351     0x00b89002,
352     0x00b8b008,
353     0x00b99001,
354     0x00b9b808,
355     0x00ba900d,
356     0x00bb6800,
357     0x00bb880e,
358     0x00bda001,
359     0x00bdb806,
360     0x00be3000,
361     0x00be480a,
362     0x00bee802,
363     0x00bf5005,
364     0x00bfd005,
365     0x00c05804,
366     0x00c0d005,
367     0x00c3c806,
368     0x00c42801,
369     0x00c54800,
370     0x00c55804,
371     0x00c7b009,
372     0x00c8f803,
373     0x00c93801,
374     0x00c96003,
375     0x00c99000,
376     0x00c9c806,
377     0x00ca0802,
378     0x00cb7001,
379     0x00cba80a,
380     0x00cd6003,
381     0x00ce5005,
382     0x00ced802,
383     0x00d0b801,
384     0x00d0d802,
385     0x00d2b000,
386     0x00d2c008,
387     0x00d31000,
388     0x00d32807,
389     0x00d3980c,
390     0x00d45005,
391     0x00d4d005,
392     0x00d57055,
393     0x00d9a006,
394     0x00d9e000,
395     0x00da1000,
396     0x00da6802,
397     0x00db5808,
398     0x00dbf802,
399     0x00dd1003,
400     0x00dd4001,
401     0x00dd5802,
402     0x00df3000,
403     0x00df4001,
404     0x00df6800,
405     0x00df7802,
406     0x00dfa007,
407     0x00e16007,
408     0x00e1b004,
409     0x00e25002,
410     0x00e44806,
411     0x00e5d801,
412     0x00e6400a,
413     0x00e6a00c,
414     0x00e71006,
415     0x00e76800,
416     0x00e7a000,
417     0x00e7c001,
418     0x00e7d804,
419     0x00ee003f,
420     0x00f8b001,
421     0x00f8f001,
422     0x00fa3001,
423     0x00fa7001,
424     0x00fac000,
425     0x00fad000,
426     0x00fae000,
427     0x00faf000,
428     0x00fbf001,
429     0x00fda800,
430     0x00fe2800,
431     0x00fea001,
432     0x00fee000,
433     0x00ff8001,
434     0x00ffa800,
435     0x00fff810,
436     0x01014007,
437     0x0102f810,
438     0x01039001,
439     0x01047800,
440     0x0104e802,
441     0x0106083e,
442     0x010c6003,
443     0x01213818,
444     0x01225814,
445     0x015ba001,
446     0x015cb000,
447     0x01677802,
448     0x0167a004,
449     0x01693000,
450     0x01694004,
451     0x01697001,
452     0x016b4006,
453     0x016b880e,
454     0x016cb808,
455     0x016d3800,
456     0x016d7800,
457     0x016db800,
458     0x016df800,
459     0x016e3800,
460     0x016e7800,
461     0x016eb800,
462     0x016ef820,
463     0x0172f021,
464     0x0174d000,
465     0x0177a00b,
466     0x017eb019,
467     0x017fe004,
468     0x01815005,
469     0x01820000,
470     0x0184b803,
471     0x01880004,
472     0x01898000,
473     0x018c7800,
474     0x018f200b,
475     0x0190f800,
476     0x05246802,
477     0x05263808,
478     0x05316013,
479     0x05337803,
480     0x0533a009,
481     0x0534f001,
482     0x05378001,
483     0x0537c007,
484     0x053e5804,
485     0x053e9000,
486     0x053ea000,
487     0x053ed017,
488     0x05401000,
489     0x05403000,
490     0x05405800,
491     0x05412801,
492     0x05416003,
493     0x0541d005,
494     0x0543c007,
495     0x05462009,
496     0x0546d017,
497     0x0547f800,
498     0x05493007,
499     0x054a380a,
500     0x054aa00a,
501     0x054be805,
502     0x054d9800,
503     0x054db003,
504     0x054de001,
505     0x054e7000,
506     0x054ed003,
507     0x054f2800,
508     0x054ff800,
509     0x05514805,
510     0x05518801,
511     0x0551a80a,
512     0x05521800,
513     0x05526000,
514     0x05527001,
515     0x0552d001,
516     0x0553e000,
517     0x05558000,
518     0x05559002,
519     0x0555b801,
520     0x0555f001,
521     0x05560800,
522     0x05561817,
523     0x05576001,
524     0x0557b00a,
525     0x05583801,
526     0x05587801,
527     0x0558b808,
528     0x05593800,
529     0x05597800,
530     0x055b6003,
531     0x055f2800,
532     0x055f4000,
533     0x055f6802,
534     0x055fd005,
535     0x06bd200b,
536     0x06be3803,
537     0x06bfe7ff,
538     0x06ffe7ff,
539     0x073fe7ff,
540     0x077fe7ff,
541     0x07bfe103,
542     0x07d37001,
543     0x07d6d025,
544     0x07d8380b,
545     0x07d8c004,
546     0x07d8f000,
547     0x07d9b800,
548     0x07d9e800,
549     0x07d9f800,
550     0x07da1000,
551     0x07da2800,
552     0x07de180f,
553     0x07ec8001,
554     0x07ee4006,
555     0x07ee801f,
556     0x07f0000f,
557     0x07f0d015,
558     0x07f29800,
559     0x07f33800,
560     0x07f36003,
561     0x07f3a800,
562     0x07f7e803,
563     0x07fcf001,
564     0x07fdf802,
565     0x07fe4001,
566     0x07fe8001,
567     0x07fec001,
568     0x07fee802,
569     0x07ff3800,
570     0x07ff780c,
571     0x07fff001,
572     0x08006000,
573     0x08013800,
574     0x0801d800,
575     0x0801f000,
576     0x08027001,
577     0x0802f021,
578     0x0807d804,
579     0x08081803,
580     0x0809a002,
581     0x080c7800,
582     0x080ce802,
583     0x080d082e,
584     0x080fe882,
585     0x0814e802,
586     0x0816880f,
587     0x0817e003,
588     0x08192008,
589     0x081a5804,
590     0x081bb009,
591     0x081cf000,
592     0x081e2003,
593     0x081eb029,
594     0x0824f001,
595     0x08255005,
596     0x0826a003,
597     0x0827e003,
598     0x08294007,
599     0x082b200a,
600     0x082bd800,
601     0x082c5800,
602     0x082c9800,
603     0x082cb000,
604     0x082d1000,
605     0x082d9000,
606     0x082dd000,
607     0x082de842,
608     0x0839b808,
609     0x083ab009,
610     0x083b4017,
611     0x083c3000,
612     0x083d8800,
613     0x083dd844,
614     0x08403001,
615     0x08404800,
616     0x0841b000,
617     0x0841c802,
618     0x0841e801,
619     0x0842b000,
620     0x0844f807,
621     0x0845802f,
622     0x08479800,
623     0x0847b004,
624     0x0848e002,
625     0x0849d004,
626     0x084a003f,
627     0x084dc003,
628     0x084e8001,
629     0x0850080e,
630     0x0850a000,
631     0x0850c000,
632     0x0851b009,
633     0x08524806,
634     0x0852c806,
635     0x0855001f,
636     0x08572805,
637     0x0857b808,
638     0x0859b002,
639     0x085ab001,
640     0x085b9804,
641     0x085c9006,
642     0x085ce80b,
643     0x085d804f,
644     0x08624836,
645     0x0865980c,
646     0x08679806,
647     0x0869200b,
648     0x0869d125,
649     0x0873f800,
650     0x08755002,
651     0x08757001,
652     0x0875904d,
653     0x08794007,
654     0x087a300a,
655     0x087ad015,
656     0x087c1003,
657     0x087c5025,
658     0x087e6013,
659     0x087fb808,
660     0x08800800,
661     0x0881c00e,
662     0x08827003,
663     0x08838000,
664     0x08839801,
665     0x0883b00b,
666     0x08859803,
667     0x0885c801,
668     0x0885e800,
669     0x0886100d,
670     0x08874806,
671     0x0887d008,
672     0x08893804,
673     0x08896808,
674     0x088a4007,
675     0x088b9800,
676     0x088bb80a,
677     0x088db008,
678     0x088e4803,
679     0x088e7800,
680     0x088f0000,
681     0x088fa80a,
682     0x08909000,
683     0x08917802,
684     0x0891a000,
685     0x0891b001,
686     0x0891f000,
687     0x0892083e,
688     0x08943800,
689     0x08944800,
690     0x08947000,
691     0x0894f000,
692     0x08955005,
693     0x0896f800,
694     0x0897180c,
695     0x0897d007,
696     0x08982000,
697     0x08986801,
698     0x08988801,
699     0x08994800,
700     0x08998800,
701     0x0899a000,
702     0x0899d002,
703     0x0899f000,
704     0x089a0000,
705     0x089a2801,
706     0x089a4801,
707     0x089a7001,
708     0x089a880b,
709     0x089b209b,
710     0x08a1c007,
711     0x08a21002,
712     0x08a23000,
713     0x08a2e000,
714     0x08a2f000,
715     0x08a3101d,
716     0x08a58000,
717     0x08a59805,
718     0x08a5d000,
719     0x08a5e800,
720     0x08a5f801,
721     0x08a61001,
722     0x08a64007,
723     0x08a6d0a5,
724     0x08ad7800,
725     0x08ad9005,
726     0x08ade001,
727     0x08adf801,
728     0x08aee023,
729     0x08b19807,
730     0x08b1e800,
731     0x08b1f801,
732     0x08b2280a,
733     0x08b2d005,
734     0x08b36812,
735     0x08b55800,
736     0x08b56800,
737     0x08b58005,
738     0x08b5b800,
739     0x08b5d005,
740     0x08b65035,
741     0x08b8d804,
742     0x08b91003,
743     0x08b93808,
744     0x08ba38b8,
745     0x08c17808,
746     0x08c1c801,
747     0x08c1e063,
748     0x08c7980b,
749     0x08c83801,
750     0x08c85001,
751     0x08c8a000,
752     0x08c8b800,
753     0x08c98000,
754     0x08c9b000,
755     0x08c9c803,
756     0x08c9f000,
757     0x08ca1800,
758     0x08ca3808,
759     0x08cad045,
760     0x08cd4001,
761     0x08cea007,
762     0x08cf0000,
763     0x08cf281a,
764     0x08d00809,
765     0x08d19805,
766     0x08d1d803,
767     0x08d23808,
768     0x08d28805,
769     0x08d2c802,
770     0x08d4500c,
771     0x08d4c001,
772     0x08d5180c,
773     0x08d7c806,
774     0x08d850f5,
775     0x08e04800,
776     0x08e1800d,
777     0x08e1f800,
778     0x08e23009,
779     0x08e36802,
780     0x08e48018,
781     0x08e55006,
782     0x08e59001,
783     0x08e5a84a,
784     0x08e83800,
785     0x08e85000,
786     0x08e98814,
787     0x08ea3808,
788     0x08ead005,
789     0x08eb3000,
790     0x08eb4800,
791     0x08ec7803,
792     0x08eca800,
793     0x08ecb800,
794     0x08ecc806,
795     0x08ed5135,
796     0x08f79801,
797     0x08f7c808,
798     0x08f88800,
799     0x08f9b007,
800     0x08fa0000,
801     0x08fa1000,
802     0x08fad055,
803     0x08fd880e,
804     0x08ff900c,
805     0x091cd065,
806     0x09237800,
807     0x0923a80a,
808     0x092a27ff,
809     0x096a224b,
810     0x097f980c,
811     0x09a18010,
812     0x09a23fff,
813     0x09e23fb8,
814     0x0a323fff,
815     0x0a723fff,
816     0x0ab23fff,
817     0x0af23fff,
818     0x0b3239b8,
819     0x0b51c806,
820     0x0b52f800,
821     0x0b535003,
822     0x0b55f800,
823     0x0b565005,
824     0x0b577006,
825     0x0b57b009,
826     0x0b598006,
827     0x0b5a3009,
828     0x0b5ad000,
829     0x0b5b1000,
830     0x0b5bc004,
831     0x0b5c82af,
832     0x0b74d864,
833     0x0b7a5804,
834     0x0b7c400a,
835     0x0b7d003f,
836     0x0b7f200b,
837     0x0b7f900d,
838     0x0c3fc007,
839     0x0c66b029,
840     0x0c684fff,
841     0x0ca84fff,
842     0x0ce84fff,
843     0x0d284fff,
844     0x0d684ae6,
845     0x0d7fa000,
846     0x0d7fe000,
847     0x0d7ff800,
848     0x0d89180e,
849     0x0d89981c,
850     0x0d8a9801,
851     0x0d8ab00d,
852     0x0d8b4007,
853     0x0d97e7ff,
854     0x0dd7e103,
855     0x0de35804,
856     0x0de3e802,
857     0x0de44806,
858     0x0de4d001,
859     0x0de4e801,
860     0x0de507ff,
861     0x0e2507ff,
862     0x0e6502af,
863     0x0e7e203b,
864     0x0e87b009,
865     0x0e893801,
866     0x0e8b2800,
867     0x0e8b3802,
868     0x0e8b7014,
869     0x0e8c2806,
870     0x0e8d5003,
871     0x0e8f5814,
872     0x0e921002,
873     0x0e923079,
874     0x0e96a00b,
875     0x0e97a00b,
876     0x0e9ab808,
877     0x0e9bc886,
878     0x0ea2a800,
879     0x0ea4e800,
880     0x0ea50001,
881     0x0ea51801,
882     0x0ea53801,
883     0x0ea56800,
884     0x0ea5d000,
885     0x0ea5e000,
886     0x0ea62000,
887     0x0ea83000,
888     0x0ea85801,
889     0x0ea8a800,
890     0x0ea8e800,
891     0x0ea9d000,
892     0x0ea9f800,
893     0x0eaa2800,
894     0x0eaa3802,
895     0x0eaa8800,
896     0x0eb53001,
897     0x0ebe6001,
898     0x0ed00036,
899     0x0ed1d831,
900     0x0ed3a800,
901     0x0ed42000,
902     0x0ed46473,
903     0x0ef8f805,
904     0x0ef95904,
905     0x0f037091,
906     0x0f096809,
907     0x0f09f001,
908     0x0f0a5003,
909     0x0f0a813f,
910     0x0f157011,
911     0x0f176003,
912     0x0f17d004,
913     0x0f1801cf,
914     0x0f276003,
915     0x0f27d2e5,
916     0x0f3f3800,
917     0x0f3f6000,
918     0x0f3f7800,
919     0x0f3ff800,
920     0x0f462801,
921     0x0f46802f,
922     0x0f4a2006,
923     0x0f4a6003,
924     0x0f4ad003,
925     0x0f4b0310,
926     0x0f65a84b,
927     0x0f69f0c1,
928     0x0f702000,
929     0x0f710000,
930     0x0f711800,
931     0x0f712801,
932     0x0f714000,
933     0x0f719800,
934     0x0f71c000,
935     0x0f71d000,
936     0x0f71e005,
937     0x0f721803,
938     0x0f724000,
939     0x0f725000,
940     0x0f726000,
941     0x0f728000,
942     0x0f729800,
943     0x0f72a801,
944     0x0f72c000,
945     0x0f72d000,
946     0x0f72e000,
947     0x0f72f000,
948     0x0f730000,
949     0x0f731800,
950     0x0f732801,
951     0x0f735800,
952     0x0f739800,
953     0x0f73c000,
954     0x0f73e800,
955     0x0f73f800,
956     0x0f745000,
957     0x0f74e004,
958     0x0f752000,
959     0x0f755000,
960     0x0f75e033,
961     0x0f77910d,
962     0x0f816003,
963     0x0f84a00b,
964     0x0f857801,
965     0x0f860000,
966     0x0f868000,
967     0x0f87b009,
968     0x0f8d7037,
969     0x0f90180c,
970     0x0f91e003,
971     0x0f924806,
972     0x0f92900d,
973     0x0f933099,
974     0x0fb6c003,
975     0x0fb76802,
976     0x0fb7e802,
977     0x0fbbb803,
978     0x0fbed005,
979     0x0fbf6003,
980     0x0fbf880e,
981     0x0fc06003,
982     0x0fc24007,
983     0x0fc2d005,
984     0x0fc44007,
985     0x0fc57001,
986     0x0fc5904d,
987     0x0fd2a00b,
988     0x0fd37001,
989     0x0fd3e802,
990     0x0fd44806,
991     0x0fd5f000,
992     0x0fd63007,
993     0x0fd6e003,
994     0x0fd74806,
995     0x0fd7c806,
996     0x0fdc9800,
997     0x0fde5824,
998     0x0fdfd405,
999     0x1537001f,
1000     0x15b9d005,
1001     0x15c0f001,
1002     0x1675100d,
1003     0x175f0fff,
1004     0x179f0c1e,
1005     0x17d0f5e1,
1006     0x189a5804};
1007 
1008 /// At the end of the valid Unicode code points space a lot of code points are
1009 /// either reserved or a noncharacter. Adding all these entries to the
1010 /// lookup table would add 446 entries to the table (in Unicode 14).
1011 /// Instead the only the start of the region is stored, every code point in
1012 /// this region needs to be escaped.
1013 inline constexpr uint32_t __unallocated_region_lower_bound = 0x000323b0;
1014 
1015 /// Returns whether the code unit needs to be escaped.
1016 ///
1017 /// \pre The code point is a valid Unicode code point.
__needs_escape(const char32_t __code_point)1018 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __needs_escape(const char32_t __code_point) noexcept {
1019   // Since __unallocated_region_lower_bound contains the unshifted range do the
1020   // comparison without shifting.
1021   if (__code_point >= __unallocated_region_lower_bound)
1022     return true;
1023 
1024   ptrdiff_t __i = std::ranges::upper_bound(__entries, (__code_point << 11) | 0x7ffu) - __entries;
1025   if (__i == 0)
1026     return false;
1027 
1028   --__i;
1029   uint32_t __upper_bound = (__entries[__i] >> 11) + (__entries[__i] & 0x7ffu);
1030   return __code_point <= __upper_bound;
1031 }
1032 
1033 // clang-format on
1034 } // namespace __escaped_output_table
1035 
1036 #endif //_LIBCPP_STD_VER >= 23
1037 
1038 _LIBCPP_END_NAMESPACE_STD
1039 
1040 #endif // _LIBCPP___FORMAT_ESCAPED_OUTPUT_TABLE_H
1041