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