arg_router  1.4.0
C++ command line argument parsing and routing
double_width.hpp
1 // Copyright (C) 2022 by Camden Mannett.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
4 
5 #pragma once
6 
7 #include "arg_router/utility/utf8/code_point.hpp"
8 
10 {
18 constexpr auto double_width_table = std::array<code_point::range, 281>{{
19  {0x001100, 0x00115F}, {0x00231A, 0x00231B}, {0x002329, 0x002329}, {0x00232A, 0x00232A},
20  {0x0023E9, 0x0023EC}, {0x0023F0, 0x0023F0}, {0x0023F3, 0x0023F3}, {0x0025FD, 0x0025FE},
21  {0x002614, 0x002615}, {0x002648, 0x002653}, {0x00267F, 0x00267F}, {0x002693, 0x002693},
22  {0x0026A1, 0x0026A1}, {0x0026AA, 0x0026AB}, {0x0026BD, 0x0026BE}, {0x0026C4, 0x0026C5},
23  {0x0026CE, 0x0026CE}, {0x0026D4, 0x0026D4}, {0x0026EA, 0x0026EA}, {0x0026F2, 0x0026F3},
24  {0x0026F5, 0x0026F5}, {0x0026FA, 0x0026FA}, {0x0026FD, 0x0026FD}, {0x002705, 0x002705},
25  {0x00270A, 0x00270B}, {0x002728, 0x002728}, {0x00274C, 0x00274C}, {0x00274E, 0x00274E},
26  {0x002753, 0x002755}, {0x002757, 0x002757}, {0x002795, 0x002797}, {0x0027B0, 0x0027B0},
27  {0x0027BF, 0x0027BF}, {0x002B1B, 0x002B1C}, {0x002B50, 0x002B50}, {0x002B55, 0x002B55},
28  {0x002E80, 0x002E99}, {0x002E9B, 0x002EF3}, {0x002F00, 0x002FD5}, {0x002FF0, 0x002FFB},
29  {0x003000, 0x003000}, {0x003001, 0x003003}, {0x003004, 0x003004}, {0x003005, 0x003005},
30  {0x003006, 0x003006}, {0x003007, 0x003007}, {0x003008, 0x003008}, {0x003009, 0x003009},
31  {0x00300A, 0x00300A}, {0x00300B, 0x00300B}, {0x00300C, 0x00300C}, {0x00300D, 0x00300D},
32  {0x00300E, 0x00300E}, {0x00300F, 0x00300F}, {0x003010, 0x003010}, {0x003011, 0x003011},
33  {0x003012, 0x003013}, {0x003014, 0x003014}, {0x003015, 0x003015}, {0x003016, 0x003016},
34  {0x003017, 0x003017}, {0x003018, 0x003018}, {0x003019, 0x003019}, {0x00301A, 0x00301A},
35  {0x00301B, 0x00301B}, {0x00301C, 0x00301C}, {0x00301D, 0x00301D}, {0x00301E, 0x00301F},
36  {0x003020, 0x003020}, {0x003021, 0x003029}, {0x00302A, 0x00302D}, {0x00302E, 0x00302F},
37  {0x003030, 0x003030}, {0x003031, 0x003035}, {0x003036, 0x003037}, {0x003038, 0x00303A},
38  {0x00303B, 0x00303B}, {0x00303C, 0x00303C}, {0x00303D, 0x00303D}, {0x00303E, 0x00303E},
39  {0x003041, 0x003096}, {0x003099, 0x00309A}, {0x00309B, 0x00309C}, {0x00309D, 0x00309E},
40  {0x00309F, 0x00309F}, {0x0030A0, 0x0030A0}, {0x0030A1, 0x0030FA}, {0x0030FB, 0x0030FB},
41  {0x0030FC, 0x0030FE}, {0x0030FF, 0x0030FF}, {0x003105, 0x00312F}, {0x003131, 0x00318E},
42  {0x003190, 0x003191}, {0x003192, 0x003195}, {0x003196, 0x00319F}, {0x0031A0, 0x0031BF},
43  {0x0031C0, 0x0031E3}, {0x0031F0, 0x0031FF}, {0x003200, 0x00321E}, {0x003220, 0x003229},
44  {0x00322A, 0x003247}, {0x003250, 0x003250}, {0x003251, 0x00325F}, {0x003260, 0x00327F},
45  {0x003280, 0x003289}, {0x00328A, 0x0032B0}, {0x0032B1, 0x0032BF}, {0x0032C0, 0x0032FF},
46  {0x003300, 0x0033FF}, {0x003400, 0x004DBF}, {0x004E00, 0x009FFF}, {0x00A000, 0x00A014},
47  {0x00A015, 0x00A015}, {0x00A016, 0x00A48C}, {0x00A490, 0x00A4C6}, {0x00A960, 0x00A97C},
48  {0x00AC00, 0x00D7A3}, {0x00F900, 0x00FA6D}, {0x00FA6E, 0x00FA6F}, {0x00FA70, 0x00FAD9},
49  {0x00FADA, 0x00FAFF}, {0x00FE10, 0x00FE16}, {0x00FE17, 0x00FE17}, {0x00FE18, 0x00FE18},
50  {0x00FE19, 0x00FE19}, {0x00FE30, 0x00FE30}, {0x00FE31, 0x00FE32}, {0x00FE33, 0x00FE34},
51  {0x00FE35, 0x00FE35}, {0x00FE36, 0x00FE36}, {0x00FE37, 0x00FE37}, {0x00FE38, 0x00FE38},
52  {0x00FE39, 0x00FE39}, {0x00FE3A, 0x00FE3A}, {0x00FE3B, 0x00FE3B}, {0x00FE3C, 0x00FE3C},
53  {0x00FE3D, 0x00FE3D}, {0x00FE3E, 0x00FE3E}, {0x00FE3F, 0x00FE3F}, {0x00FE40, 0x00FE40},
54  {0x00FE41, 0x00FE41}, {0x00FE42, 0x00FE42}, {0x00FE43, 0x00FE43}, {0x00FE44, 0x00FE44},
55  {0x00FE45, 0x00FE46}, {0x00FE47, 0x00FE47}, {0x00FE48, 0x00FE48}, {0x00FE49, 0x00FE4C},
56  {0x00FE4D, 0x00FE4F}, {0x00FE50, 0x00FE52}, {0x00FE54, 0x00FE57}, {0x00FE58, 0x00FE58},
57  {0x00FE59, 0x00FE59}, {0x00FE5A, 0x00FE5A}, {0x00FE5B, 0x00FE5B}, {0x00FE5C, 0x00FE5C},
58  {0x00FE5D, 0x00FE5D}, {0x00FE5E, 0x00FE5E}, {0x00FE5F, 0x00FE61}, {0x00FE62, 0x00FE62},
59  {0x00FE63, 0x00FE63}, {0x00FE64, 0x00FE66}, {0x00FE68, 0x00FE68}, {0x00FE69, 0x00FE69},
60  {0x00FE6A, 0x00FE6B}, {0x00FF01, 0x00FF03}, {0x00FF04, 0x00FF04}, {0x00FF05, 0x00FF07},
61  {0x00FF08, 0x00FF08}, {0x00FF09, 0x00FF09}, {0x00FF0A, 0x00FF0A}, {0x00FF0B, 0x00FF0B},
62  {0x00FF0C, 0x00FF0C}, {0x00FF0D, 0x00FF0D}, {0x00FF0E, 0x00FF0F}, {0x00FF10, 0x00FF19},
63  {0x00FF1A, 0x00FF1B}, {0x00FF1C, 0x00FF1E}, {0x00FF1F, 0x00FF20}, {0x00FF21, 0x00FF3A},
64  {0x00FF3B, 0x00FF3B}, {0x00FF3C, 0x00FF3C}, {0x00FF3D, 0x00FF3D}, {0x00FF3E, 0x00FF3E},
65  {0x00FF3F, 0x00FF3F}, {0x00FF40, 0x00FF40}, {0x00FF41, 0x00FF5A}, {0x00FF5B, 0x00FF5B},
66  {0x00FF5C, 0x00FF5C}, {0x00FF5D, 0x00FF5D}, {0x00FF5E, 0x00FF5E}, {0x00FF5F, 0x00FF5F},
67  {0x00FF60, 0x00FF60}, {0x00FFE0, 0x00FFE1}, {0x00FFE2, 0x00FFE2}, {0x00FFE3, 0x00FFE3},
68  {0x00FFE4, 0x00FFE4}, {0x00FFE5, 0x00FFE6}, {0x016FE0, 0x016FE1}, {0x016FE2, 0x016FE2},
69  {0x016FE3, 0x016FE3}, {0x016FE4, 0x016FE4}, {0x016FF0, 0x016FF1}, {0x017000, 0x0187F7},
70  {0x018800, 0x018AFF}, {0x018B00, 0x018CD5}, {0x018D00, 0x018D08}, {0x01AFF0, 0x01AFF3},
71  {0x01AFF5, 0x01AFFB}, {0x01AFFD, 0x01AFFE}, {0x01B000, 0x01B0FF}, {0x01B100, 0x01B122},
72  {0x01B150, 0x01B152}, {0x01B164, 0x01B167}, {0x01B170, 0x01B2FB}, {0x01F004, 0x01F004},
73  {0x01F0CF, 0x01F0CF}, {0x01F18E, 0x01F18E}, {0x01F191, 0x01F19A}, {0x01F200, 0x01F202},
74  {0x01F210, 0x01F23B}, {0x01F240, 0x01F248}, {0x01F250, 0x01F251}, {0x01F260, 0x01F265},
75  {0x01F300, 0x01F320}, {0x01F32D, 0x01F335}, {0x01F337, 0x01F37C}, {0x01F37E, 0x01F393},
76  {0x01F3A0, 0x01F3CA}, {0x01F3CF, 0x01F3D3}, {0x01F3E0, 0x01F3F0}, {0x01F3F4, 0x01F3F4},
77  {0x01F3F8, 0x01F3FA}, {0x01F3FB, 0x01F3FF}, {0x01F400, 0x01F43E}, {0x01F440, 0x01F440},
78  {0x01F442, 0x01F4FC}, {0x01F4FF, 0x01F53D}, {0x01F54B, 0x01F54E}, {0x01F550, 0x01F567},
79  {0x01F57A, 0x01F57A}, {0x01F595, 0x01F596}, {0x01F5A4, 0x01F5A4}, {0x01F5FB, 0x01F5FF},
80  {0x01F600, 0x01F64F}, {0x01F680, 0x01F6C5}, {0x01F6CC, 0x01F6CC}, {0x01F6D0, 0x01F6D2},
81  {0x01F6D5, 0x01F6D7}, {0x01F6DD, 0x01F6DF}, {0x01F6EB, 0x01F6EC}, {0x01F6F4, 0x01F6FC},
82  {0x01F7E0, 0x01F7EB}, {0x01F7F0, 0x01F7F0}, {0x01F90C, 0x01F93A}, {0x01F93C, 0x01F945},
83  {0x01F947, 0x01F9FF}, {0x01FA70, 0x01FA74}, {0x01FA78, 0x01FA7C}, {0x01FA80, 0x01FA86},
84  {0x01FA90, 0x01FAAC}, {0x01FAB0, 0x01FABA}, {0x01FAC0, 0x01FAC5}, {0x01FAD0, 0x01FAD9},
85  {0x01FAE0, 0x01FAE7}, {0x01FAF0, 0x01FAF6}, {0x020000, 0x02A6DF}, {0x02A6E0, 0x02A6FF},
86  {0x02A700, 0x02B738}, {0x02B739, 0x02B73F}, {0x02B740, 0x02B81D}, {0x02B81E, 0x02B81F},
87  {0x02B820, 0x02CEA1}, {0x02CEA2, 0x02CEAF}, {0x02CEB0, 0x02EBE0}, {0x02EBE1, 0x02F7FF},
88  {0x02F800, 0x02FA1D}, {0x02FA1E, 0x02FA1F}, {0x02FA20, 0x02FFFD}, {0x030000, 0x03134A},
89  {0x03134B, 0x03FFFD},
90 }};
91 } // namespace arg_router::utility::utf8
constexpr auto double_width_table