ELC in dev
ELC-lang
载入中...
搜索中...
未找到
all_defs.cpp
浏览该文件的文档.
1#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
2//all
3//at namespace ::
4/*@
5未完成的elc解释器include文件
6由steve02081504与Alex0125设计、编写
7转载时请在不对此文件做任何修改的同时注明出处
8项目地址:https://github.com/ELC-lang/ELC
9*/
10/*
11 ,??????????????????????????
12 ????????????????????????????
13 ?????????????????????????????+
14 ?????+++++++++++++++++++++++++
15 ?????+++++++++++++++++++++++++
16 ??????++++++++++++++++++++++++
17 ?????++
18 ?????+++
19 ??????+++IIIIIIIIIIIIIIIIII
20 ?????+++++IIIIIIIIIIIIIIIIII
21 ?????++++++++++++++++++++++++
22 ??????+++++++++++++++++++++++:
23 ?????++
24 ?????+++
25 ??????++
26 ??????????????????????????????II
27 ??????????????????????????????IIII
28 ,?????????????????????????????IIIII+
29 =???++++++++++++++++++++++++++III?
30 ?++++++++++++++++++++++++++++I+
31*/
32#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
33//pre_checks.hpp
34/*
35未完成的elc解释器_share文件
36由steve02081504与Alex0125设计、编写
37转载时请在不对此文件做任何修改的同时注明出处
38项目地址:https://github.com/ELC-lang/ELC
39*/
40/*
41 ,??????????????????????????
42 ????????????????????????????
43 ?????????????????????????????+
44 ?????+++++++++++++++++++++++++
45 ?????+++++++++++++++++++++++++
46 ??????++++++++++++++++++++++++
47 ?????++
48 ?????+++
49 ??????+++IIIIIIIIIIIIIIIIII
50 ?????+++++IIIIIIIIIIIIIIIIII
51 ?????++++++++++++++++++++++++
52 ??????+++++++++++++++++++++++:
53 ?????++
54 ?????+++
55 ??????++
56 ??????????????????????????????II
57 ??????????????????????????????IIII
58 ,?????????????????????????????IIIII+
59 =???++++++++++++++++++++++++++III?
60 ?++++++++++++++++++++++++++++I+
61*/
62//__cplusplus needs 20+
63#if !defined(__cplusplus)||__cplusplus<202002L
64 //if msvc, check _MSVC_LANG
65 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
66 //ok
67 #else
68 #error "elc files needs c++20 or higher"
69 #endif
70#endif
71
72//check if the compiler is msvc
73#if defined(_MSC_VER)
74 //check if _CPPRTTI
75 #if !defined(_CPPRTTI)
76 #error "elc files needs rtti"
77 #endif
78 //check _MSC_VER at last 1932
79 #if _MSC_VER<1932
80 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
81 #endif
82#endif
83
84//file_end
85
86#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
87//tool reg : \n[^\n]+\d+ (\S+)\n -> \n\t#include \"\1\"\n
88#if !defined(ELC_ALL)
89 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
90//base
91//at namespace ::
92/*@
93未完成的elc解释器include文件
94由steve02081504与Alex0125设计、编写
95转载时请在不对此文件做任何修改的同时注明出处
96项目地址:https://github.com/ELC-lang/ELC
97*/
98/*
99 ,??????????????????????????
100 ????????????????????????????
101 ?????????????????????????????+
102 ?????+++++++++++++++++++++++++
103 ?????+++++++++++++++++++++++++
104 ??????++++++++++++++++++++++++
105 ?????++
106 ?????+++
107 ??????+++IIIIIIIIIIIIIIIIII
108 ?????+++++IIIIIIIIIIIIIIIIII
109 ?????++++++++++++++++++++++++
110 ??????+++++++++++++++++++++++:
111 ?????++
112 ?????+++
113 ??????++
114 ??????????????????????????????II
115 ??????????????????????????????IIII
116 ,?????????????????????????????IIIII+
117 =???++++++++++++++++++++++++++III?
118 ?++++++++++++++++++++++++++++I+
119*/
120#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
121//pre_checks.hpp
122/*
123未完成的elc解释器_share文件
124由steve02081504与Alex0125设计、编写
125转载时请在不对此文件做任何修改的同时注明出处
126项目地址:https://github.com/ELC-lang/ELC
127*/
128/*
129 ,??????????????????????????
130 ????????????????????????????
131 ?????????????????????????????+
132 ?????+++++++++++++++++++++++++
133 ?????+++++++++++++++++++++++++
134 ??????++++++++++++++++++++++++
135 ?????++
136 ?????+++
137 ??????+++IIIIIIIIIIIIIIIIII
138 ?????+++++IIIIIIIIIIIIIIIIII
139 ?????++++++++++++++++++++++++
140 ??????+++++++++++++++++++++++:
141 ?????++
142 ?????+++
143 ??????++
144 ??????????????????????????????II
145 ??????????????????????????????IIII
146 ,?????????????????????????????IIIII+
147 =???++++++++++++++++++++++++++III?
148 ?++++++++++++++++++++++++++++I+
149*/
150//__cplusplus needs 20+
151#if !defined(__cplusplus)||__cplusplus<202002L
152 //if msvc, check _MSVC_LANG
153 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
154 //ok
155 #else
156 #error "elc files needs c++20 or higher"
157 #endif
158#endif
159
160//check if the compiler is msvc
161#if defined(_MSC_VER)
162 //check if _CPPRTTI
163 #if !defined(_CPPRTTI)
164 #error "elc files needs rtti"
165 #endif
166 //check _MSC_VER at last 1932
167 #if _MSC_VER<1932
168 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
169 #endif
170#endif
171
172//file_end
173
174#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
175#if !defined(ELC_BASE)
176 //原base的一小部分,但由于过于底层,底层到API定义都需要使用。。
177 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
178//base_defs
179//at namespace ::
180/*@
181未完成的elc解释器include文件
182由steve02081504与Alex0125设计、编写
183转载时请在不对此文件做任何修改的同时注明出处
184项目地址:https://github.com/ELC-lang/ELC
185*/
186/*
187 ,??????????????????????????
188 ????????????????????????????
189 ?????????????????????????????+
190 ?????+++++++++++++++++++++++++
191 ?????+++++++++++++++++++++++++
192 ??????++++++++++++++++++++++++
193 ?????++
194 ?????+++
195 ??????+++IIIIIIIIIIIIIIIIII
196 ?????+++++IIIIIIIIIIIIIIIIII
197 ?????++++++++++++++++++++++++
198 ??????+++++++++++++++++++++++:
199 ?????++
200 ?????+++
201 ??????++
202 ??????????????????????????????II
203 ??????????????????????????????IIII
204 ,?????????????????????????????IIIII+
205 =???++++++++++++++++++++++++++III?
206 ?++++++++++++++++++++++++++++I+
207*/
208#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
209//pre_checks.hpp
210/*
211未完成的elc解释器_share文件
212由steve02081504与Alex0125设计、编写
213转载时请在不对此文件做任何修改的同时注明出处
214项目地址:https://github.com/ELC-lang/ELC
215*/
216/*
217 ,??????????????????????????
218 ????????????????????????????
219 ?????????????????????????????+
220 ?????+++++++++++++++++++++++++
221 ?????+++++++++++++++++++++++++
222 ??????++++++++++++++++++++++++
223 ?????++
224 ?????+++
225 ??????+++IIIIIIIIIIIIIIIIII
226 ?????+++++IIIIIIIIIIIIIIIIII
227 ?????++++++++++++++++++++++++
228 ??????+++++++++++++++++++++++:
229 ?????++
230 ?????+++
231 ??????++
232 ??????????????????????????????II
233 ??????????????????????????????IIII
234 ,?????????????????????????????IIIII+
235 =???++++++++++++++++++++++++++III?
236 ?++++++++++++++++++++++++++++I+
237*/
238//__cplusplus needs 20+
239#if !defined(__cplusplus)||__cplusplus<202002L
240 //if msvc, check _MSVC_LANG
241 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
242 //ok
243 #else
244 #error "elc files needs c++20 or higher"
245 #endif
246#endif
247
248//check if the compiler is msvc
249#if defined(_MSC_VER)
250 //check if _CPPRTTI
251 #if !defined(_CPPRTTI)
252 #error "elc files needs rtti"
253 #endif
254 //check _MSC_VER at last 1932
255 #if _MSC_VER<1932
256 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
257 #endif
258#endif
259
260//file_end
261
262#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
263#if !defined(ELC_BASE_DEFS)
264 #define __builtin_is_my_dick_still_there() true
265 #include <cstddef>//nullptr_t
266 #include <cstdlib>//exit、size_t
267 #include <cstring>//strlen & memcpy
268 #include <new>//operator delete、launder
269 #include <algorithm>//max、min
270 #include <type_traits>//enable_if等
271 #include <typeinfo>//RTTI
272 #include <cmath>//sqrt
273 #include <cfenv>//rounding
274 #include <ctime>//time
275 #include <ranges>
276 #include <initializer_list>
277 #if __has_include(<stdfloat>)
278 #include <stdfloat>
279 #endif
280 #if __has_include(<intrin.h>)
281 #include <intrin.h>
282 #endif
283 #if defined(__clang__)||defined(__GNUC__)
284 #include <cxxabi.h>
285 #endif
286 #define ELC_BASE_DEFS
287 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
288//_body.hpp
289//at namespace ::
290/*
291未完成的elc解释器base_defs文件
292由steve02081504与Alex0125设计、编写
293转载时请在不对此文件做任何修改的同时注明出处
294项目地址:https://github.com/ELC-lang/ELC
295*/
296/*
297 ,??????????????????????????
298 ????????????????????????????
299 ?????????????????????????????+
300 ?????+++++++++++++++++++++++++
301 ?????+++++++++++++++++++++++++
302 ??????++++++++++++++++++++++++
303 ?????++
304 ?????+++
305 ??????+++IIIIIIIIIIIIIIIIII
306 ?????+++++IIIIIIIIIIIIIIIIII
307 ?????++++++++++++++++++++++++
308 ??????+++++++++++++++++++++++:
309 ?????++
310 ?????+++
311 ??????++
312 ??????????????????????????????II
313 ??????????????????????????????IIII
314 ,?????????????????????????????IIIII+
315 =???++++++++++++++++++++++++++III?
316 ?++++++++++++++++++++++++++++I+
317*/
318//include default_data_type:基础数据类型定义
319#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/default_data_type.hpp"
320//default_data_type.hpp
321/*
322未完成的elc解释器_share文件
323由steve02081504与Alex0125设计、编写
324转载时请在不对此文件做任何修改的同时注明出处
325项目地址:https://github.com/ELC-lang/ELC
326*/
327/*
328 ,??????????????????????????
329 ????????????????????????????
330 ?????????????????????????????+
331 ?????+++++++++++++++++++++++++
332 ?????+++++++++++++++++++++++++
333 ??????++++++++++++++++++++++++
334 ?????++
335 ?????+++
336 ??????+++IIIIIIIIIIIIIIIIII
337 ?????+++++IIIIIIIIIIIIIIIIII
338 ?????++++++++++++++++++++++++
339 ??????+++++++++++++++++++++++:
340 ?????++
341 ?????+++
342 ??????++
343 ??????????????????????????????II
344 ??????????????????????????????IIII
345 ,?????????????????????????????IIIII+
346 =???++++++++++++++++++++++++++III?
347 ?++++++++++++++++++++++++++++I+
348*/
349namespace elc{
350 /*ELC内部string统一采用char_t宽字符,使用setlocale(LC_ALL,"en_US.utf8")下的UTF编码。*/
351 typedef char32_t char_t;
352 /*c_string表示*/
354 /*c_string表示*/
356 /*ELC内部钦定int_t类型*/
357 typedef int64_t int_t;
358 /*ELC内部钦定uint_t类型*/
359 typedef uint64_t uint_t;
360 /*ELC内部钦定float_t类型*/
361 typedef double float_t;
362 /*ELC内部钦定float_size_t类型,用以描述内存大小的浮点状况*/
363 typedef long double float_size_t;
364}
365
366//file_end
367
368#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
369namespace elc::defs{ //在elc::defs中定义内容
370 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
371//_defs.hpp
372/*
373未完成的elc解释器basic文件
374由steve02081504与Alex0125设计、编写
375转载时请在不对此文件做任何修改的同时注明出处
376项目地址:https://github.com/ELC-lang/ELC
377*/
378/*
379 ,??????????????????????????
380 ????????????????????????????
381 ?????????????????????????????+
382 ?????+++++++++++++++++++++++++
383 ?????+++++++++++++++++++++++++
384 ??????++++++++++++++++++++++++
385 ?????++
386 ?????+++
387 ??????+++IIIIIIIIIIIIIIIIII
388 ?????+++++IIIIIIIIIIIIIIIIII
389 ?????++++++++++++++++++++++++
390 ??????+++++++++++++++++++++++:
391 ?????++
392 ?????+++
393 ??????++
394 ??????????????????????????????II
395 ??????????????????????????????IIII
396 ,?????????????????????????????IIIII+
397 =???++++++++++++++++++++++++++III?
398 ?++++++++++++++++++++++++++++I+
399*/
400#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
401//_defs.hpp
402/*
403未完成的elc解释器_share文件
404由steve02081504与Alex0125设计、编写
405转载时请在不对此文件做任何修改的同时注明出处
406项目地址:https://github.com/ELC-lang/ELC
407*/
408/*
409 ,??????????????????????????
410 ????????????????????????????
411 ?????????????????????????????+
412 ?????+++++++++++++++++++++++++
413 ?????+++++++++++++++++++++++++
414 ??????++++++++++++++++++++++++
415 ?????++
416 ?????+++
417 ??????+++IIIIIIIIIIIIIIIIII
418 ?????+++++IIIIIIIIIIIIIIIIII
419 ?????++++++++++++++++++++++++
420 ??????+++++++++++++++++++++++:
421 ?????++
422 ?????+++
423 ??????++
424 ??????????????????????????????II
425 ??????????????????????????????IIII
426 ,?????????????????????????????IIIII+
427 =???++++++++++++++++++++++++++III?
428 ?++++++++++++++++++++++++++++I+
429*/
430
431//undefs at "_undefs.hpp"
432
433#if defined(ELC_CODE_REALM)
434 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
435#endif
436
437//set ELC_WARNING_LEVEL default to 4(max)
438#if !defined(ELC_WARNING_LEVEL)
439 #define ELC_WARNING_LEVEL 4
440#endif
441
442#if defined(_MSC_VER)
443 #pragma warning(push,ELC_WARNING_LEVEL)
444 #pragma warning(disable:4099)//class与struct混用警告diss
445 #pragma warning(disable:4584)//重复子类警告diss
446 #pragma warning(disable:4250)//域控制继承警告diss
447 #pragma warning(disable:26432)//不完全默认方法警告diss
448 #pragma warning(disable:26435)//virtual override方法警告diss
449 #pragma warning(disable:26481)//容器安利diss
450 #pragma warning(disable:26446)//gsl::at安利diss
451 #pragma warning(disable:26434)//方法覆盖警告diss
452 #pragma warning(disable:26429)//gsl::not_null安利diss
453 #pragma warning(disable:26471)//对void*进行static_cast安利diss
454 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
455 #pragma warning(disable:26473)//相同指针显式cast警告diss
456 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
457 #pragma warning(disable:26485)//数组作指针警告diss
458 #pragma warning(disable:26490)//reinterpret_cast警告diss
459 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
460 #pragma warning(disable:26482)//非常数数组索引警告diss
461 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
462#endif
463#if defined(__GNUC__)
464 #pragma GCC diagnostic push
465 #pragma GCC diagnostic warning "-Wall"//开启所有警告
466 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
467#endif
468#if defined(_MSC_VER)
469 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
470 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
471 #define push_msvc_warning() __pragma(warning(push))
472 #define pop_msvc_warning() __pragma(warning(pop))
473 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
474#else
475 //#define suppress_msvc_warning(...)
476 #define disable_msvc_warning(...)
477 #define push_msvc_warning()
478 #define pop_msvc_warning()
479 #define push_and_disable_msvc_warning(...)
480#endif
481#if defined(_MSC_VER)
482 //push pack settings
483 #pragma pack(push)
484 #pragma pack()
485#endif
486#if defined(_MSC_VER)
487 //push and undef common macros
488 #pragma push_macro("new")
489 #undef new
490 #pragma push_macro("delete")
491 #undef delete
492 #pragma push_macro("min")
493 #undef min
494 #pragma push_macro("max")
495 #undef max
496 #pragma push_macro("abs")
497 #undef abs
498 #pragma push_macro("export")
499 #undef export
500 #pragma push_macro("rand")
501 #undef rand
502 #pragma push_macro("sqrt")
503 #undef sqrt
504 #pragma push_macro("type_info")
505 #undef type_info
506 #pragma push_macro("elc")
507 #undef elc
508#endif
509//
510#if defined(ELC_VOID_NAME)
511 #undef void
512#endif
513//
514#if defined(ELC_PUBLIC_ALL)
515 #define protected public
516 #define private public
517#endif
518//
519#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
520 #undef rand
521#endif
522
523// #define often_noexcept
524#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
525#define noexcept_as_auto MAGIC//哦现在有了
526#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
527#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
528
529#define using_method_from_base_t(name,...) \
530template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
531auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
532{\
533 return base_t::name(forward<Args>(rest)...);\
534}\
535
536#define using_method_from_value(name,value_name,...) \
537template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
538auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
539{\
540 return value_name.name(forward<Args>(rest)...);\
541}\
542
543#define floop while(__builtin_is_my_dick_still_there())
544#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
545#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
546#if defined(_MSC_VER) && _MSC_VER>=1935
547 //@see https://developercommunity.visualstudio.com/t/10193638
548 #define enable_adl(name) template<typename=void>void name()noexcept=delete
549#else
550 #define enable_adl(name) void name()noexcept=delete
551#endif
552
553#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
554#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
555
556#define declvalue(...) (::std::declval<__VA_ARGS__>())
557
559#define template_error(reason) static_assert(template_error_helper<T>,reason)
561#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
563#define template_warning(reason) template_warning_helper<T>(reason)
564
565//for type_info
566#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
567#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
568
569#define is_common_attribute(name) public attribute<T,name<T>>
570#define is_special_attribute(name) public attribute<T,name>
571
572#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
573#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
574
575//for float_size_t
576#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
577//bitnum_of
578#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
579
580//for attribute
581#define def_common_attribute_with_nothing(name) \
582template<typename T>\
583class name{}\
584
585#define def_special_attribute_with_nothing(name) \
586class name{}\
587
588#define common_attribute_t template<class>class
589#define special_attribute_t class
590
599#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
601#define enabled_by_default class enable_state=void
603#define disabled_by_default class enable_state= ::std::enable_if_t<false>
605#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
607#define enable_flag class enable_state
608
609#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
610#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
611#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
612#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
613#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
614
616#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
618#define get_recursive_λ_caller(name,...) \
619exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
620 return name(name,Args...);\
621}
623#define λ []
625#define exλ [&]
627#define λ_with_catch(...) [__VA_ARGS__]
629#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
630//recursive_λ_self_referential_reserved_symbolname
631#define λ_RLSRRS _my_jb_super_sb_name_
632
633#if defined(_MSC_VER) && !defined(__clang__)
634 #define λ_inline [[msvc::forceinline]]
635 #define λ_force_inline [[msvc::forceinline]]
636#elif
637 #define λ_inline [[gnu::always_inline]]
638 #define λ_force_inline [[gnu::always_inline]]
639#else
640 #define λ_inline
641 #define λ_force_inline
642#endif
643
644#define MAGIC//ahh,ko no tenno da!
645
647#define nothing
648
650#define elseif else if
652#define _big_than_ >
654#define _small_than_ <
655
656#if defined(_MSC_VER)
657 #define not !
658 #define and &&
659 #define or ||
660#endif
661
663#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
665#define BREAK_NAMESPACE }
666
668#define template_name template
670#define type_name class
671
672#if defined(DEBUG) || defined(_DEBUG)
673 #define not_in_debug 0
674 #define in_debug 1
675#else
676 #define not_in_debug 1
677 #define in_debug 0
678#endif
679
680#define es U""
681#define ec(ch) U ## ch
682
683#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
684 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
685#else
686 #define ELC_TEST_EVENTNAME(name)
687#endif
688
689#define override_instance_struct \
690protected:\
691 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
692 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
693 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
694 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
695 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
696
697#if defined(_MSC_VER) && !defined(__clang__)
698 #define distinctive __declspec(dllexport)
699#else
700 #define distinctive
701#endif
702
703#if defined(_MSC_VER) && !defined(__clang__)
704 #define force_inline __forceinline
705#elif defined(__GNUC__) || defined(__clang__)
706 #define force_inline __attribute__((always_inline)) inline
707#else
708 #define force_inline inline
709#endif
710
711#if defined(_MSC_VER) && !defined(__clang__)
712 #define with_no_vtable __declspec(novtable)
713#else
714 #define with_no_vtable
715#endif
716
717#define in_consteval (::std::is_constant_evaluated())
718
719#define no_vtable_struct struct with_no_vtable
720#define no_vtable_class class with_no_vtable
721
722//#define get_elc_defs using namespace ::elc::defs
723
724//file_end
725
726#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
727
728//file_end
729
730 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
731
732 namespace base{}
733 using namespace base;//导出内容:defs内的名称空间只起到大体名称分组的作用,不进行名称阻拦
734
735 //内存泄露检测
736 #if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
737 namespace memory{
738 inline void check_memory_lack()noexcept;
739 inline struct distinctive memory_lack_checker_t{
740 ~memory_lack_checker_t(){
741 check_memory_lack();
742 }
743 }memory_lack_checker{};
744 }
745 #endif
746
747 namespace base{
748 //恭喜你找到elc内大部分语法糖所在地
749 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/template_helper.hpp"
750//template_helper.hpp
751//at namespace elc::defs::base
752/*
753未完成的elc解释器base_defs文件
754由steve02081504与Alex0125设计、编写
755转载时请在不对此文件做任何修改的同时注明出处
756项目地址:https://github.com/ELC-lang/ELC
757*/
758/*
759 ,??????????????????????????
760 ????????????????????????????
761 ?????????????????????????????+
762 ?????+++++++++++++++++++++++++
763 ?????+++++++++++++++++++++++++
764 ??????++++++++++++++++++++++++
765 ?????++
766 ?????+++
767 ??????+++IIIIIIIIIIIIIIIIII
768 ?????+++++IIIIIIIIIIIIIIIIII
769 ?????++++++++++++++++++++++++
770 ??????+++++++++++++++++++++++:
771 ?????++
772 ?????+++
773 ??????++
774 ??????????????????????????????II
775 ??????????????????????????????IIII
776 ,?????????????????????????????IIIII+
777 =???++++++++++++++++++++++++++III?
778 ?++++++++++++++++++++++++++++I+
779*/
783template<class T>
784constexpr bool template_error_helper=1000-7==114514;//w.
788template<class T,class U>
789[[deprecated("this was a template warning."),nodiscard]]
790inline auto template_warning_helper(U&&a)noexcept{return 0;}
791
792//file_end
793
794 #line 53 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
795 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/using_std.hpp"
796//using_std.hpp
797//at namespace elc::defs::base
798/*
799未完成的elc解释器base_defs文件
800由steve02081504与Alex0125设计、编写
801转载时请在不对此文件做任何修改的同时注明出处
802项目地址:https://github.com/ELC-lang/ELC
803*/
804/*
805 ,??????????????????????????
806 ????????????????????????????
807 ?????????????????????????????+
808 ?????+++++++++++++++++++++++++
809 ?????+++++++++++++++++++++++++
810 ??????++++++++++++++++++++++++
811 ?????++
812 ?????+++
813 ??????+++IIIIIIIIIIIIIIIIII
814 ?????+++++IIIIIIIIIIIIIIIIII
815 ?????++++++++++++++++++++++++
816 ??????+++++++++++++++++++++++:
817 ?????++
818 ?????+++
819 ??????++
820 ??????????????????????????????II
821 ??????????????????????????????IIII
822 ,?????????????????????????????IIIII+
823 =???++++++++++++++++++++++++++III?
824 ?++++++++++++++++++++++++++++I+
825*/
826//从std中导入一些名称.
827//这不比博人传燃?
828using ::std::byte;
829using ::std::size_t;
830
831using ::std::forward;
832using ::std::addressof;
833
834template<class T>
835using remove_cvref= ::std::remove_cvref_t<T>;
836template<class T>
837using remove_cv= ::std::remove_cv_t<T>;
838template<class T>
839using remove_ref= ::std::remove_reference_t<T>;
840template<bool B,class T,class F>
841using conditional= ::std::conditional_t<B,T,F>;
842template<class T,class U>
843constexpr bool is_base_of= ::std::is_convertible_v<remove_cvref<U>*,remove_cvref<T>*>;
844//
845using ::std::partial_ordering;
846using ::std::weak_ordering;
847using ::std::strong_ordering;
848
849//file_end
850
851 #line 54 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
852 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/concept.hpp"
853//concept.hpp
854//at namespace elc::defs::base
855/*
856未完成的elc解释器base_defs文件
857由steve02081504与Alex0125设计、编写
858转载时请在不对此文件做任何修改的同时注明出处
859项目地址:https://github.com/ELC-lang/ELC
860*/
861/*
862 ,??????????????????????????
863 ????????????????????????????
864 ?????????????????????????????+
865 ?????+++++++++++++++++++++++++
866 ?????+++++++++++++++++++++++++
867 ??????++++++++++++++++++++++++
868 ?????++
869 ?????+++
870 ??????+++IIIIIIIIIIIIIIIIII
871 ?????+++++IIIIIIIIIIIIIIIIII
872 ?????++++++++++++++++++++++++
873 ??????+++++++++++++++++++++++:
874 ?????++
875 ?????+++
876 ??????++
877 ??????????????????????????????II
878 ??????????????????????????????IIII
879 ,?????????????????????????????IIIII+
880 =???++++++++++++++++++++++++++III?
881 ?++++++++++++++++++++++++++++I+
882*/
883//template<typename T,template<typename>constexpr bool name>
884//concept as_concept=name<T>;
885
886//file_end
887
888 #line 55 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
889 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/magic_number.hpp"
890//magic_number.hpp
891//at namespace elc::defs::base
892/*
893未完成的elc解释器base_defs文件
894由steve02081504与Alex0125设计、编写
895转载时请在不对此文件做任何修改的同时注明出处
896项目地址:https://github.com/ELC-lang/ELC
897*/
898/*
899 ,??????????????????????????
900 ????????????????????????????
901 ?????????????????????????????+
902 ?????+++++++++++++++++++++++++
903 ?????+++++++++++++++++++++++++
904 ??????++++++++++++++++++++++++
905 ?????++
906 ?????+++
907 ??????+++IIIIIIIIIIIIIIIIII
908 ?????+++++IIIIIIIIIIIIIIIIII
909 ?????++++++++++++++++++++++++
910 ??????+++++++++++++++++++++++:
911 ?????++
912 ?????+++
913 ??????++
914 ??????????????????????????????II
915 ??????????????????????????????IIII
916 ,?????????????????????????????IIIII+
917 =???++++++++++++++++++++++++++III?
918 ?++++++++++++++++++++++++++++I+
919*/
920namespace magic_number{
926 constexpr auto φ = 1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408807538689175212663386222353693179318006076672635443338908659593958290563832266131992829026788067520876689250171169620703222104321626954862629631361443814975870122034080588795445474924618569536486444924104432077134494704956584678850987433944221254487706647809158846074998871240076521705751797883416625624940758906970400028121042762177111777805315317141011704666599146697987317613560067087480710131795236894275219484353056783002287856997829778347845878228911097625003026961561700250464338243776486102838312683303724292675263116533924731671112115881863851331620384005222165791286675294654906811317159934323597349498509040947621322298101726107059611645629909816290555208524790352406020172799747175342777592778625619432082750513121815628551222480939471234145170223735805772786160086883829523045926478780178899219902707769038953219681986151437803149974110692608867429622675756052317277752035361393621076738937645560606059216589466759551900400555908950229530942312482355212212415444006470340565734797663972394949946584578873039623090375033993856210242369025138680414577995698122445747178034173126453220416397232134044449487302315417676893752103068737880344170093954409627955898678723209512426893557309704509595684401755519881921802064052905518934947592600734852282101088194644544222318891319294689622002301443770269923007803085261180754519288770502109684249362713592518760777884665836150238913493333122310533923213624319263728910670503399282265263556209029798642472759772565508615487543574826471814145127000602389016207773224499435308899909501680328112194320481964387675863314798571911397815397807476150772211750826945863932045652098969855567814106968372884058746103378105444390943683583581381131168993855576975484149144534150912954070050194775486163075422641729394680367319805861833918328599130396072014455950449779212076124785645916160837059498786006970189409886400764436170933417270919143365013715;//精度2000(然而只是double而已.)
927
929 constexpr auto π = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151557485724245415069595082953311686172785588907509838175463746493931925506040092770167113900984882401285836160356370766010471018194295559619894676783744944825537977472684710404753464620804668425906949129331367702898915210475216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992458631503028618297455570674983850549458858692699569092721079750930295532116534498720275596023648066549911988183479775356636980742654252786255181841757467289097777279380008164706001614524919217321721477235014144197356854816136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179049460165346680498862723279178608578438382796797668145410095388378636095068006422512520511739298489608412848862694560424196528502221066118630674427862203919494504712371378696095636437191728746776465757396241389086583264599581339047802759009;//精度2000
930
932 constexpr auto e = 2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901157383418793070215408914993488416750924476146066808226480016847741185374234544243710753907774499206955170276183860626133138458300075204493382656029760673711320070932870912744374704723069697720931014169283681902551510865746377211125238978442505695369677078544996996794686445490598793163688923009879312773617821542499922957635148220826989519366803318252886939849646510582093923982948879332036250944311730123819706841614039701983767932068328237646480429531180232878250981945581530175671736133206981125099618188159304169035159888851934580727386673858942287922849989208680582574927961048419844436346324496848756023362482704197862320900216099023530436994184914631409343173814364054625315209618369088870701676839642437814059271456354906130310720851038375051011574770417189861068739696552126715468895703503540212340784981933432106817012100562788023519303322474501585390473041995777709350366041699732972508868769664035557071622684471625607988265178713419512466520198918006308407507245458379639351364421067750539471789004518357551541252235905906872648786357525419112888773717663748602766063496035367947026923229718683277173932361920077745221262475186983349515101986426988784717193966497690708252174233656627259284406204302141137199227852699846988477023238238400556555178890876613601304770984386116870523105531491625172837327286760072481729876375698163354150746088386636406934704372066886512756882661497307886570156850169186474885416791545965072342877306998537139043002665307839877638503238182155355973235306860430106757608389086270498418885951380910304235957824951439885901131858358406674723702971497850841458530857813391562707603563907639473114554958322669457024941398316343323789759556808568362972538679132750555425244919435891284050452269538121791319145135009938463117740179715122837854601160359554028644059;//精度2000
933
934 constexpr auto god=72u;
935}
936
937//file_end
938
939 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
940
941 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/other.hpp"
942//other.hpp
943//at namespace elc::defs::base
944/*
945未完成的elc解释器base_defs文件
946由steve02081504与Alex0125设计、编写
947转载时请在不对此文件做任何修改的同时注明出处
948项目地址:https://github.com/ELC-lang/ELC
949*/
950/*
951 ,??????????????????????????
952 ????????????????????????????
953 ?????????????????????????????+
954 ?????+++++++++++++++++++++++++
955 ?????+++++++++++++++++++++++++
956 ??????++++++++++++++++++++++++
957 ?????++
958 ?????+++
959 ??????+++IIIIIIIIIIIIIIIIII
960 ?????+++++IIIIIIIIIIIIIIIIII
961 ?????++++++++++++++++++++++++
962 ??????+++++++++++++++++++++++:
963 ?????++
964 ?????+++
965 ??????++
966 ??????????????????????????????II
967 ??????????????????????????????IIII
968 ,?????????????????????????????IIIII+
969 =???++++++++++++++++++++++++++III?
970 ?++++++++++++++++++++++++++++I+
971*/
973
974template<typename T,typename U>
975inline auto&assign(T&&a,U&&b)noexcept_as(a=b){//为绕过条件内赋值时の警告而使用
976 a=b;
977 return a;
978}
979
980//fucking nodiscard.
981constexpr struct discard_t{
982 template<typename T>
983 force_inline constexpr void operator=(T&&)const noexcept{}
984 template<typename T>
985 force_inline constexpr void operator()(T&&)const noexcept{}
987
988template<typename T>
990
992template<typename T>
993static void destroy(T*a)noexcept{
994 if constexpr(was_not_an_ill_form(the_destroy(a)))
995 the_destroy(a);
996 else
997 template_error("Please overload the function the_destroy in the namespace where this type is defined.");
998}
999
1000constexpr struct do_nothing_t{
1001 template<class...Args>
1002 void operator()(Args&&...)noexcept{}
1003 constexpr bool operator==(const do_nothing_t&)noexcept{return true;}
1004 template<typename T>
1005 constexpr bool operator==(T&)noexcept{return false;}
1007
1008//swap
1009template<typename T1,typename T2>
1011 using ::std::move;
1012 auto tmp=move(b);
1013 b=move(a);
1014 a=move(tmp);
1015}
1016/*
1017如何不用中间变量swap两个值?
1018方法一:
1019a=a+b
1020b=a-b
1021a=a-b
1022方法二:
1023a^=b^=a^=b
1024道理我都懂,可是还是用中间变量快些
1025XD
1026更多方法欢迎补充
1027*/
1028template<typename T1,typename T2>
1029inline constexpr_as_auto [[nodiscard]]T1 swap(T1&a,const T2&b)noexcept_as_auto{
1030 using ::std::move;
1031 T1 tmp=move(a);
1032 a=b;
1033 return tmp;
1034}
1035
1036template<typename T>
1043 constexpr iterator_t& operator++()noexcept{
1044 ++_m->loop_times;
1045 return*this;
1046 }
1047 constexpr this_t& operator*()noexcept{
1048 return*_m;
1049 }
1050 constexpr bool operator==(auto)noexcept{
1051 return _m->loop_times==_m->loop_end_value;
1052 }
1053 };
1054 constexpr iterator_t begin(){
1055 return {this};
1056 }
1057 constexpr auto end(){return 0;}
1058 constexpr times_provider_t(const T&v)noexcept:loop_end_value(v){}
1059};
1060
1061//file_end
1062
1063 #line 58 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1064
1065 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/cast.hpp"
1066//cast.hpp
1067//at namespace elc::defs::base
1068/*
1069未完成的elc解释器base_defs文件
1070由steve02081504与Alex0125设计、编写
1071转载时请在不对此文件做任何修改的同时注明出处
1072项目地址:https://github.com/ELC-lang/ELC
1073*/
1074/*
1075 ,??????????????????????????
1076 ????????????????????????????
1077 ?????????????????????????????+
1078 ?????+++++++++++++++++++++++++
1079 ?????+++++++++++++++++++++++++
1080 ??????++++++++++++++++++++++++
1081 ?????++
1082 ?????+++
1083 ??????+++IIIIIIIIIIIIIIIIII
1084 ?????+++++IIIIIIIIIIIIIIIIII
1085 ?????++++++++++++++++++++++++
1086 ??????+++++++++++++++++++++++:
1087 ?????++
1088 ?????+++
1089 ??????++
1090 ??????????????????????????????II
1091 ??????????????????????????????IIII
1092 ,?????????????????????????????IIIII+
1093 =???++++++++++++++++++++++++++III?
1094 ?++++++++++++++++++++++++++++I+
1095*/
1097 26491//down_cast警告diss
1098 26466//down_cast警告diss
1099 26492//const_cast警告diss
1100);
1102template<typename T>
1103force_inline constexpr const T add_const(T a)noexcept{return a;}
1104template<typename T>
1105force_inline constexpr const T add_const_by_value(T a)noexcept{return a;}
1107template<typename T>
1108force_inline constexpr const T&add_const(T&a)noexcept{return a;}
1109template<typename T>
1110force_inline constexpr const T&add_const_by_ref(T&a)noexcept{return a;}
1112template<typename T>
1113force_inline constexpr T&remove_const(const T&a)noexcept{return const_cast<T&>(a);}
1114template<typename T>
1115force_inline constexpr T&remove_const_by_ref(const T&a)noexcept{return const_cast<T&>(a);}
1117template<typename T>
1118force_inline constexpr const T*add_const(T*a)noexcept{return a;}
1119template<typename T>
1120force_inline constexpr const T*add_const_by_ptr(T*a)noexcept{return a;}
1122template<typename T>
1123force_inline constexpr T*remove_const(const T*a)noexcept{return const_cast<T*>(a);}
1124template<typename T>
1125force_inline constexpr T*remove_const_by_ptr(const T*a)noexcept{return const_cast<T*>(a);}
1127template<typename T>
1128force_inline constexpr T*launder_remove_const(const T*a)noexcept{return ::std::launder(remove_const(a));}
1129template<typename T>
1130force_inline constexpr T*launder_remove_const_by_ptr(const T*a)noexcept{return ::std::launder(remove_const(a));}
1132template<typename T,typename U>
1133force_inline constexpr T down_cast(U a)noexcept{return static_cast<T>(a);}
1135
1136//file_end
1137
1138 #line 60 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1139 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/special_flags.hpp"
1140//special_flag.hpp
1141//at namespace elc::defs::base
1142/*
1143未完成的elc解释器base_defs文件
1144由steve02081504与Alex0125设计、编写
1145转载时请在不对此文件做任何修改的同时注明出处
1146项目地址:https://github.com/ELC-lang/ELC
1147*/
1148/*
1149 ,??????????????????????????
1150 ????????????????????????????
1151 ?????????????????????????????+
1152 ?????+++++++++++++++++++++++++
1153 ?????+++++++++++++++++++++++++
1154 ??????++++++++++++++++++++++++
1155 ?????++
1156 ?????+++
1157 ??????+++IIIIIIIIIIIIIIIIII
1158 ?????+++++IIIIIIIIIIIIIIIIII
1159 ?????++++++++++++++++++++++++
1160 ??????+++++++++++++++++++++++:
1161 ?????++
1162 ?????+++
1163 ??????++
1164 ??????????????????????????????II
1165 ??????????????????????????????IIII
1166 ,?????????????????????????????IIIII+
1167 =???++++++++++++++++++++++++++III?
1168 ?++++++++++++++++++++++++++++I+
1169*/
1170
1172#define defspecflag(name) \
1173constexpr struct name##_t{} name{}
1174
1181
1182#undef defspecflag
1183
1184//file_end
1185
1186 #line 61 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1187 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/non_Xable.hpp"
1188//non_Xable.hpp
1189//at namespace elc::defs::base
1190/*
1191未完成的elc解释器base_defs文件
1192由steve02081504与Alex0125设计、编写
1193转载时请在不对此文件做任何修改的同时注明出处
1194项目地址:https://github.com/ELC-lang/ELC
1195*/
1196/*
1197 ,??????????????????????????
1198 ????????????????????????????
1199 ?????????????????????????????+
1200 ?????+++++++++++++++++++++++++
1201 ?????+++++++++++++++++++++++++
1202 ??????++++++++++++++++++++++++
1203 ?????++
1204 ?????+++
1205 ??????+++IIIIIIIIIIIIIIIIII
1206 ?????+++++IIIIIIIIIIIIIIIIII
1207 ?????++++++++++++++++++++++++
1208 ??????+++++++++++++++++++++++:
1209 ?????++
1210 ?????+++
1211 ??????++
1212 ??????????????????????????????II
1213 ??????????????????????????????IIII
1214 ,?????????????????????????????IIIII+
1215 =???++++++++++++++++++++++++++III?
1216 ?++++++++++++++++++++++++++++I+
1217*/
1234
1237
1238
1255
1260
1265
1266//file_end
1267
1268 #line 62 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1269 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/attribute.hpp"
1270//attribute.hpp
1271//at namespace elc::defs::base
1272/*
1273未完成的elc解释器base_defs文件
1274由steve02081504与Alex0125设计、编写
1275转载时请在不对此文件做任何修改的同时注明出处
1276项目地址:https://github.com/ELC-lang/ELC
1277*/
1278/*
1279 ,??????????????????????????
1280 ????????????????????????????
1281 ?????????????????????????????+
1282 ?????+++++++++++++++++++++++++
1283 ?????+++++++++++++++++++++++++
1284 ??????++++++++++++++++++++++++
1285 ?????++
1286 ?????+++
1287 ??????+++IIIIIIIIIIIIIIIIII
1288 ?????+++++IIIIIIIIIIIIIIIIII
1289 ?????++++++++++++++++++++++++
1290 ??????+++++++++++++++++++++++:
1291 ?????++
1292 ?????+++
1293 ??????++
1294 ??????????????????????????????II
1295 ??????????????????????????????IIII
1296 ,?????????????????????????????IIIII+
1297 =???++++++++++++++++++++++++++III?
1298 ?++++++++++++++++++++++++++++I+
1299*/
1300template<class T,typename attribute_name>
1302protected:
1303 template<class U,special_attribute_t another_attribute_name>
1305 force_inline constexpr T*get_handle()noexcept{return down_cast<T*>(down_cast<attribute_name*>(this));}
1306
1307 template<class U,special_attribute_t another_attribute_name>
1308 friend const U*get_handle(const attribute<U,another_attribute_name>*)noexcept;
1309 force_inline constexpr const T*get_handle()const noexcept{return down_cast<const T*>(down_cast<const attribute_name*>(this));}
1310};
1311template<class T,special_attribute_t attribute_name>
1312force_inline T*get_handle(attribute<T,attribute_name>*a)noexcept{return a->get_handle();}
1313template<class T,special_attribute_t attribute_name>
1314force_inline const T*get_handle(const attribute<T,attribute_name>*a)noexcept{return a->get_handle();}
1315
1316template<class T,common_attribute_t attribute_name>
1318template<class T,common_attribute_t attribute_name>
1320
1321template<special_attribute_t attribute_name,class T>
1323 return static_cast<attribute_name*>(ptr);
1324}
1325template<special_attribute_t attribute_name,class T>
1326force_inline auto attribute_ptr_cast(const T* ptr)noexcept{
1327 return static_cast<const attribute_name*>(ptr);
1328}
1329template<common_attribute_t attribute_name,class T>
1330force_inline auto attribute_ptr_cast(T*ptr)noexcept{
1332}
1333
1334template<special_attribute_t attribute_name,class T>
1335force_inline auto& attribute_cast(T&t)noexcept{
1337}
1338template<common_attribute_t attribute_name,class T>
1339force_inline auto& attribute_cast(T&t)noexcept{
1341}
1342
1343template<special_attribute_t... attribute_names>
1344struct special_attribute_pack:virtual attribute_names...{
1345 /*兼容用*/
1346 template<class T>
1347 struct on_type:special_attribute_pack<attribute_names>...{};
1348};
1349template<common_attribute_t... attribute_names>
1351 template<class T>
1352 struct on_type:attribute_names<T>...{};
1353};
1354
1355//file_end
1356
1357 #line 63 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1358 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/special_attribute.hpp"
1359//special_attribute.hpp
1360//at namespace elc::defs::base
1361/*
1362未完成的elc解释器base_defs文件
1363由steve02081504与Alex0125设计、编写
1364转载时请在不对此文件做任何修改的同时注明出处
1365项目地址:https://github.com/ELC-lang/ELC
1366*/
1367/*
1368 ,??????????????????????????
1369 ????????????????????????????
1370 ?????????????????????????????+
1371 ?????+++++++++++++++++++++++++
1372 ?????+++++++++++++++++++++++++
1373 ??????++++++++++++++++++++++++
1374 ?????++
1375 ?????+++
1376 ??????+++IIIIIIIIIIIIIIIIII
1377 ?????+++++IIIIIIIIIIIIIIIIII
1378 ?????++++++++++++++++++++++++
1379 ??????+++++++++++++++++++++++:
1380 ?????++
1381 ?????+++
1382 ??????++
1383 ??????????????????????????????II
1384 ??????????????????????????????IIII
1385 ,?????????????????????????????IIIII+
1386 =???++++++++++++++++++++++++++III?
1387 ?++++++++++++++++++++++++++++I+
1388*/
1391
1392//file_end
1393
1394 #line 64 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1395 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/type_info.hpp"
1396//type_info.hpp
1397//at namespace elc::defs::base
1398/*
1399未完成的elc解释器base_defs文件
1400由steve02081504与Alex0125设计、编写
1401转载时请在不对此文件做任何修改的同时注明出处
1402项目地址:https://github.com/ELC-lang/ELC
1403*/
1404/*
1405 ,??????????????????????????
1406 ????????????????????????????
1407 ?????????????????????????????+
1408 ?????+++++++++++++++++++++++++
1409 ?????+++++++++++++++++++++++++
1410 ??????++++++++++++++++++++++++
1411 ?????++
1412 ?????+++
1413 ??????+++IIIIIIIIIIIIIIIIII
1414 ?????+++++IIIIIIIIIIIIIIIIII
1415 ?????++++++++++++++++++++++++
1416 ??????+++++++++++++++++++++++:
1417 ?????++
1418 ?????+++
1419 ??????++
1420 ??????????????????????????????II
1421 ??????????????????????????????IIII
1422 ,?????????????????????????????IIIII+
1423 =???++++++++++++++++++++++++++III?
1424 ?++++++++++++++++++++++++++++I+
1425*/
1426struct type_name_t;
1428private:
1429 struct type_id_t{
1430 const ::std::type_info* _m;
1431
1432 constexpr type_id_t(const ::std::type_info&a)noexcept:_m(&a){}
1433 constexpr type_id_t(const type_id_t&a)noexcept=default;
1434 [[nodiscard]]type_name_t get_name()const noexcept;//定义于type_name.hpp
1435 [[nodiscard]]size_t get_hash()const noexcept{
1436 return _m->hash_code();
1437 }
1438 [[nodiscard]]bool operator==(const type_id_t&a)const noexcept{return *_m==*a._m;}
1439 };
1440
1441 type_id_t _tid;
1442public:
1443 constexpr base_type_info_t(const ::std::type_info&a)noexcept:_tid(a){}
1444 constexpr base_type_info_t(const base_type_info_t&)noexcept=default;
1445 [[nodiscard]]type_name_t get_name()const noexcept;//定义于type_name.hpp
1446 [[nodiscard]]size_t get_hash()const noexcept{
1447 return _tid.get_hash();
1448 }
1449 [[nodiscard]]bool operator==(const base_type_info_t&a)const noexcept{return _tid==a._tid;}
1450 [[nodiscard]]bool operator==(const ::std::type_info&a)const noexcept{return _tid==type_id_t(a);}
1451};
1452template<class T>
1454 typedef T type;
1455
1456 template<class U>
1457 static constexpr bool same_as=::std::is_same_v<T,U>;
1458 template<class U>
1459 static constexpr bool not_same_as=!same_as<U>;
1460 template<class U>
1461 static constexpr bool base_on=::std::is_convertible_v<remove_cvref<T>*,remove_cvref<U>*>;
1462 template<class U>
1463 static constexpr bool not_base_on=!base_on<U>;
1464
1465 template<class U>
1466 static constexpr bool can_convert_to=::std::is_convertible_v<T,U>;
1467 template<class U>
1468 static constexpr bool can_t_convert_to=!can_convert_to<U>;
1469 template<class U>
1470 static constexpr bool can_nothrow_convert_to=::std::is_nothrow_convertible_v<T,U>;
1471 template<class U>
1472 static constexpr bool can_t_nothrow_convert_to=!can_nothrow_convert_to<U>;
1473
1474 /*
1475 //没有重载变量模板一说
1476 template<typename attribute_name>
1477 static constexpr bool has_attribute=has_attribute_helper<attribute_name>();
1478 template<typename attribute_name>
1479 static constexpr bool not_has_attribute=!has_attribute(attribute_name);
1480 */
1481 template<special_attribute_t attribute_name>
1482 static constexpr bool has_attribute_helper(){
1483 return base_on<attribute_name>;
1484 }
1485 template<common_attribute_t attribute_name>
1486 static constexpr bool has_attribute_helper(){
1487 return has_attribute_helper<attribute_name<remove_cvref<T>>>();
1488 }
1489 template<special_attribute_t attribute_name>
1490 static constexpr bool not_has_has_attribute_helper(){
1491 return!has_attribute_helper<attribute_name>();
1492 }
1493 template<common_attribute_t attribute_name>
1494 static constexpr bool not_has_has_attribute_helper(){
1495 return!has_attribute_helper<attribute_name>();
1496 }
1497
1498 // defed at defs.
1499 // #define has_attribute(...) has_attribute_helper<__VA_ARGS__>()
1500 // #define not_has_attribute(...) not_has_has_attribute_helper<__VA_ARGS__>()
1501
1502 template<common_attribute_t... common_attribute_names>
1503 struct with_common_attribute:common_attribute_pack<common_attribute_names...>::template_name on_type<T>{
1504 template<special_attribute_t... special_attribute_names>
1506 common_attribute_pack<common_attribute_names...>::template_name on_type<T>,
1507 special_attribute_pack<special_attribute_names...>::template_name on_type<T>
1508 {};
1509 };
1510 template<special_attribute_t... special_attribute_names>
1511 struct with_special_attribute:special_attribute_pack<special_attribute_names...>::template_name on_type<T>{
1512 template<common_attribute_t... common_attribute_names>
1514 special_attribute_pack<special_attribute_names...>::template_name on_type<T>,
1515 common_attribute_pack<common_attribute_names...>::template_name on_type<T>
1516 {};
1517 };
1518
1519 constexpr type_info_t()noexcept{}
1520 constexpr type_info_t(const type_info_t&)noexcept=default;
1521 [[nodiscard]]constexpr operator base_type_info_t()const noexcept{return base_type_info_t(typeid(T));}
1522 [[nodiscard]]constexpr bool operator==(const ::std::type_info&a)const noexcept{return base_type_info_t(*this)==base_type_info_t(a);}
1523 [[nodiscard]]type_name_t get_name()const noexcept;//定义于type_name.hpp
1524 [[nodiscard]]size_t get_hash()const noexcept{
1525 return base_type_info_t(*this).get_hash();
1526 }
1527};
1528
1529template<class T>
1531
1532template<class T>
1533[[nodiscard]]constexpr bool operator==(const type_info_t<T>&,const type_info_t<T>&){return true;}
1534template<class T,class U>
1535[[nodiscard]]constexpr bool operator==(const type_info_t<T>&,const type_info_t<U>&){return false;}
1536
1537/*
1538template<class T,class U>
1539consteval auto operator?:(auto a,const type_info_t<T>&b,const type_info_t<U>&c){
1540 if(a)
1541 return b;
1542 else
1543 if(!a)
1544 return c;
1545 else
1546 return b && c;
1547 else
1548 return void();
1549}
1550*/
1551
1552//file_end
1553
1554 #line 65 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1555 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/arithmetic_type_info_prover_decl.hpp"
1556//arithmetic_type_info_prover_decl.hpp
1557//at namespace elc::defs::base
1558/*
1559未完成的elc解释器base_defs文件
1560由steve02081504与Alex0125设计、编写
1561转载时请在不对此文件做任何修改的同时注明出处
1562项目地址:https://github.com/ELC-lang/ELC
1563*/
1564/*
1565 ,??????????????????????????
1566 ????????????????????????????
1567 ?????????????????????????????+
1568 ?????+++++++++++++++++++++++++
1569 ?????+++++++++++++++++++++++++
1570 ??????++++++++++++++++++++++++
1571 ?????++
1572 ?????+++
1573 ??????+++IIIIIIIIIIIIIIIIII
1574 ?????+++++IIIIIIIIIIIIIIIIII
1575 ?????++++++++++++++++++++++++
1576 ??????+++++++++++++++++++++++:
1577 ?????++
1578 ?????+++
1579 ??????++
1580 ??????????????????????????????II
1581 ??????????????????????????????IIII
1582 ,?????????????????????????????IIIII+
1583 =???++++++++++++++++++++++++++III?
1584 ?++++++++++++++++++++++++++++I+
1585*/
1586namespace math{
1589 template<typename T>
1591
1593 template<typename T>
1596 template<typename T>
1599 template<typename T>
1602 template<typename T>
1604
1607 inline namespace concepts{
1609 template<typename T>
1610 concept arithmetic_type=arithmetic_type_info_prover<remove_cvref<T>>::is_arithmetic_type;
1611 template<typename T>
1613
1615 template<typename T>
1616 concept basic_type=arithmetic_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_basic_type;
1617 template<typename T>
1619
1621 template<typename T>
1622 concept big_type=arithmetic_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_big_type;
1623 template<typename T>
1625
1627 template<typename T>
1628 concept float_type=arithmetic_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_float_type;
1629 template<typename T>
1631
1632 //浮点数类型:指数记录法
1633 template<typename T>
1634 concept exponent_float_type=is_float_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_exponent_float_type;
1635 template<typename T>
1637
1638 //浮点数类型:分数记录法
1639 template<typename T>
1640 concept fraction_float_type=is_float_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_fraction_float_type;
1641 template<typename T>
1643
1645 template<typename T>
1647 template<typename T>
1649
1651 template<typename T>
1652 concept integer_type=arithmetic_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_integer_type;
1653 template<typename T>
1655
1657 template<typename T>
1659 template<typename T>
1661
1663 template<typename T>
1664 concept signed_type=arithmetic_type<T> && arithmetic_type_info_prover<remove_cvref<T>>::is_signed;
1665 template<typename T>
1667
1669 template<typename T>
1671 template<typename T>
1673
1675 template<typename T>
1677 template<typename T>
1679
1681 template<typename T>
1683 template<typename T>
1685
1687 template<typename T>
1689 template<typename T>
1691
1693 template<typename T>
1695 template<typename T>
1697
1699 template<typename T>
1701 template<typename T>
1703
1705 template<typename T>
1707 template<typename T>
1709
1711 template<typename T>
1713 template<typename T>
1715
1717 template<typename T>
1719 template<typename T>
1721
1723 template<typename T>
1725 template<typename T>
1727
1729 template<typename T>
1731 template<typename T>
1733
1735 template<typename T>
1737 template<typename T>
1739
1741 template<typename T>
1743 template<typename T>
1745
1747 template<typename T>
1749 template<typename T>
1751
1753 template<typename T>
1755 template<typename T>
1757
1759 template<typename T>
1760 concept has_NaN=arithmetic_type_info_prover<remove_cvref<T>>::has_NaN;
1761
1763 template<typename T>
1764 concept has_inf=arithmetic_type_info_prover<remove_cvref<T>>::has_inf;
1765
1767 template<typename T>
1768 concept has_min=arithmetic_type_info_prover<remove_cvref<T>>::has_min;
1769
1771 template<typename T>
1772 concept has_max=arithmetic_type_info_prover<remove_cvref<T>>::has_max;
1773
1775 template<typename T>
1777
1779 template<typename T>
1780 concept has_ε=arithmetic_type_info_prover<remove_cvref<T>>::has_ε;
1781 }
1782}
1784using math::to_signed_t;
1787using namespace math::concepts;
1788
1789//file_end
1790
1791 #line 66 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
1792 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/compare.hpp"
1793//compare.hpp
1794//at namespace elc::defs::base
1795/*
1796未完成的elc解释器base_defs文件
1797由steve02081504与Alex0125设计、编写
1798转载时请在不对此文件做任何修改的同时注明出处
1799项目地址:https://github.com/ELC-lang/ELC
1800*/
1801/*
1802 ,??????????????????????????
1803 ????????????????????????????
1804 ?????????????????????????????+
1805 ?????+++++++++++++++++++++++++
1806 ?????+++++++++++++++++++++++++
1807 ??????++++++++++++++++++++++++
1808 ?????++
1809 ?????+++
1810 ??????+++IIIIIIIIIIIIIIIIII
1811 ?????+++++IIIIIIIIIIIIIIIIII
1812 ?????++++++++++++++++++++++++
1813 ??????+++++++++++++++++++++++:
1814 ?????++
1815 ?????+++
1816 ??????++
1817 ??????????????????????????????II
1818 ??????????????????????????????IIII
1819 ,?????????????????????????????IIIII+
1820 =???++++++++++++++++++++++++++III?
1821 ?++++++++++++++++++++++++++++I+
1822*/
1823//end_by_zero_t
1827inline constexpr struct end_by_zero_t{}end_by_zero;
1828//just_an_part_t
1832inline constexpr struct just_an_part_t{}just_an_part;
1833//equal:值相等.
1851constexpr struct equal_t{
1852 template<class T,class U=T>
1853 static constexpr bool able= was_not_an_ill_form(declvalue(T)==declvalue(U));
1854 template<class T,class U=T>
1855 static constexpr bool nothrow= was_not_an_ill_form_and_noexcept(declvalue(T)==declvalue(U));
1856
1857 template<typename T,typename U>
1858 [[nodiscard]]constexpr auto operator()(T&&a,U&&b)const noexcept(nothrow<T,U>){
1859 return a==b;
1860 }
1861 template<typename T,typename U>
1862 [[nodiscard]]constexpr bool operator()(T*a,U*b,size_t size)const noexcept(nothrow<T,U>){
1863 while(size--){
1864 if(*(a++)!=*(b++))
1865 return false;
1866 }
1867 return true;
1868 }
1869 template<typename T,typename U,size_t N1,size_t N2>
1870 [[nodiscard]]constexpr bool operator()(T(&a)[N1],U(&b)[N2])const noexcept(nothrow<T,U>){
1871 if constexpr(N1==N2)
1872 return operator()(a,b,N1);
1873 else{
1874 template_warning("N1!=N2");
1875 return false;
1876 }
1877 }
1878 template<typename T,typename U>
1879 [[nodiscard]]constexpr bool operator()(T*a,size_t size1,U*b,size_t size2)const noexcept(nothrow<T,U>){
1880 if(size1==size2)
1881 return operator()(a,b,size1);
1882 else
1883 return false;
1884 }
1885 template<typename T,typename U>
1886 [[nodiscard]]constexpr bool operator()(T*a,size_t size1,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
1887 while(size1--){
1888 if(*a!=*b || *b==U{0})
1889 return false;
1890 a++;
1891 b++;
1892 }
1893 return *b==U{0};
1894 }
1895 template<typename T,typename U>
1896 [[nodiscard]]constexpr bool operator()(T*a,end_by_zero_t,U*b,size_t size2)const noexcept(nothrow<T,U>){
1897 return operator()(b,size2,a,end_by_zero);
1898 }
1899 template<typename T,typename U>
1900 [[nodiscard]]constexpr bool operator()(T*a,end_by_zero_t,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
1901 floop{
1902 if(*a!=*b)
1903 return false;
1904 if(*a==T{0})
1905 return true;
1906 a++;
1907 b++;
1908 }
1909 }
1910 template<typename T,typename U>
1911 [[nodiscard]]constexpr bool operator()(T*a,size_t size1,just_an_part_t,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
1912 while(size1--){
1913 if(*a!=*b || *b==U{0})
1914 return false;
1915 a++;
1916 b++;
1917 }
1918 return true;
1919 }
1921
1922//eq:同一对象
1923template<typename T>
1924[[nodiscard]]constexpr auto is_eq(T&&a,T&&b)noexcept_as(&a==&b){
1925 return &a==&b;
1926}
1927template<typename T>
1928[[nodiscard]]constexpr auto is_not_eq(T&&a,T&&b)noexcept_as(!is_eq(a,b)){
1929 return!is_eq(a,b);
1930}
1931
1932//compare:三路比较
1960constexpr struct compare_t{
1961private:
1962 template<class T,class U=T>
1963 static constexpr bool r_able= was_not_an_ill_form(declvalue(T)<=>declvalue(U));
1964public:
1965 template<class T,class U=T>
1966 static constexpr bool able= r_able<T,U> ||
1968 declvalue(T)==declvalue(U),
1969 declvalue(T)<declvalue(U),
1970 declvalue(U)<declvalue(T)
1971 );
1972 template<class T,class U=T>
1973 static constexpr bool nothrow= was_not_an_ill_form_and_noexcept(declvalue(T)<=>declvalue(U)) ||
1975 declvalue(T)==declvalue(U),
1976 declvalue(T)<declvalue(U),
1977 declvalue(U)<declvalue(T)
1978 );
1979
1980private:
1981 template<class T,class U>
1982 [[nodiscard]]static constexpr auto base_call(T&&a,U&&b)noexcept(nothrow<T,U>){
1983 //在 <=> 不可用时以 < 和 == 为后备,优于直接 <=>
1984 if constexpr(r_able<T,U>)
1985 return a<=>b;
1986 else return a == b ? partial_ordering::equivalent :
1987 a < b ? partial_ordering::less :
1988 b < a ? partial_ordering::greater :
1989 partial_ordering::unordered ;
1990 }
1991public:
1992 template<class T,class U=T>
1993 using type=decltype(base_call(declvalue(T),declvalue(U)));
1994
1995 template<typename T,typename U>
1996 [[nodiscard]]constexpr auto operator()(T&&a,U&&b)const noexcept(nothrow<T,U>){
1997 return base_call(a,b);
1998 }
1999 template<typename T,typename U>
2000 [[nodiscard]]constexpr auto operator()(T*a,U*b,size_t size)const noexcept(nothrow<T,U>){
2001 while(size--){
2002 if(auto tmp=base_call(*(a++),*(b++)); tmp!=0)
2003 return tmp;
2004 }
2005 return strong_ordering::equivalent;
2006 }
2007 template<typename T,typename U,size_t N1,size_t N2>
2008 [[nodiscard]]constexpr auto operator()(T(&a)[N1],U(&b)[N2])const noexcept(nothrow<T,U>){
2009 if constexpr(N1==N2)
2010 return operator()(a,b,N1);
2011 else{
2012 template_warning("N1!=N2");
2013 return N1<=>N2;
2014 }
2015 }
2016 template<typename T,typename U>
2017 [[nodiscard]]constexpr auto operator()(T*a,size_t size1,U*b,size_t size2)const noexcept(nothrow<T,U>){
2018 type<T,U> tmp=size1<=>size2;
2019 if(tmp!=0)
2020 return tmp;
2021 else
2022 return operator()(a,b,size1);
2023 }
2024 template<typename T,typename U>
2025 [[nodiscard]]constexpr auto operator()(T*a,size_t size1,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
2026 type<T,U> tmp=strong_ordering::equivalent;
2027 while(size1--){
2028 if(*b==U{0})
2029 return strong_ordering::greater;
2030 if(tmp==0)
2031 tmp=base_call(*a,*b);
2032 a++;
2033 b++;
2034 }
2035 return *b==U{0}?tmp:strong_ordering::less;
2036 }
2037 template<typename T,typename U>
2038 [[nodiscard]]constexpr auto operator()(T*a,end_by_zero_t,U*b,size_t size2)const noexcept(nothrow<T,U>){
2039 type<T,U> tmp=strong_ordering::equivalent;
2040 while(size2--){
2041 if(*a==T{0})
2042 return strong_ordering::less;
2043 if(tmp==0)
2044 tmp=base_call(*a,*b);
2045 a++;
2046 b++;
2047 }
2048 return *b==U{0}?tmp:strong_ordering::less;
2049 }
2050 template<typename T,typename U>
2051 [[nodiscard]]constexpr auto operator()(T*a,end_by_zero_t,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
2052 type<T,U> tmp=strong_ordering::equivalent;
2053 floop{
2054 if(*a==T{0})
2055 return *b==U{0}?tmp:strong_ordering::less;
2056 if(tmp==0)
2057 tmp=base_call(*a,*b);
2058 a++;
2059 b++;
2060 }
2061 }
2062 template<typename T,typename U>
2063 [[nodiscard]]constexpr auto operator()(T*a,size_t size1,just_an_part_t,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
2064 type<T,U> tmp=strong_ordering::equivalent;
2065 while(size1--){
2066 if(*b==U{0})
2067 return strong_ordering::greater;
2068 if(tmp==0)
2069 tmp=base_call(*a,*b);
2070 a++;
2071 b++;
2072 }
2073 return tmp;
2074 }
2075 template<typename T,typename U>
2076 [[nodiscard]]constexpr auto lexicographical(T*a,size_t size1,U*b,size_t size2)const noexcept(nothrow<T,U>){
2077 using ::std::min;//elc的min依赖compare,而compare还没有定义完全,所以这里用std的
2078 if(auto tmp=operator()(a,b,min(size1,size2)); tmp!=0)
2079 return tmp;
2080 else
2081 return size1<=>size2;
2082 }
2083 template<typename T,typename U,size_t N1,size_t N2>
2084 [[nodiscard]]constexpr auto lexicographical(T(&a)[N1],U(&b)[N2])const noexcept(nothrow<T,U>){
2085 return lexicographical(a,N1,b,N2);
2086 }
2087 template<typename T,typename U>
2088 [[nodiscard]]constexpr auto lexicographical(T*a,size_t size1,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
2089 while(size1--){
2090 if(*b==U{0})
2091 return strong_ordering::greater;
2092 if(auto tmp=base_call(*a,*b); tmp!=0)
2093 return tmp;
2094 a++;
2095 b++;
2096 }
2097 return *b==U{0}?strong_ordering::equivalent:
2098 strong_ordering::less;
2099 }
2100 template<typename T,typename U>
2101 [[nodiscard]]constexpr auto lexicographical(T*a,end_by_zero_t,U*b,size_t size2)const noexcept(nothrow<T,U>){
2102 while(size2--){
2103 if(*a==T{0})
2104 return strong_ordering::less;
2105 if(auto tmp=base_call(*a,*b); tmp!=0)
2106 return tmp;
2107 a++;
2108 b++;
2109 }
2110 return *b==U{0}?strong_ordering::equivalent:
2111 strong_ordering::less;
2112 }
2113 template<typename T,typename U>
2114 [[nodiscard]]constexpr auto lexicographical(T*a,end_by_zero_t,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
2115 floop{
2116 if(*a==T{0})
2117 return *b==U{0}?strong_ordering::equivalent:
2118 strong_ordering::less;
2119 if(auto tmp=base_call(*a,*b); tmp!=0)
2120 return tmp;
2121 a++;
2122 b++;
2123 }
2124 }
2125 template<typename T,typename U>
2126 [[nodiscard]]constexpr auto lexicographical(T*a,size_t size1,just_an_part_t,U*b,end_by_zero_t)const noexcept(nothrow<T,U>){
2127 while(size1--){
2128 if(*b==U{0})
2129 return strong_ordering::greater;
2130 if(auto tmp=base_call(*a,*b); tmp!=0)
2131 return tmp;
2132 a++;
2133 b++;
2134 }
2135 return strong_ordering::equivalent;
2136 }
2137 //
2138 [[nodiscard]]constexpr auto reverse(partial_ordering odr)const noexcept{
2139 if(odr==partial_ordering::greater)
2140 return partial_ordering::less;
2141 elseif(odr==partial_ordering::less)
2142 return partial_ordering::greater;
2143 else
2144 return odr;
2145 }
2146 [[nodiscard]]constexpr auto reverse(weak_ordering odr)const noexcept{
2147 if(odr==weak_ordering::greater)
2148 return weak_ordering::less;
2149 elseif(odr==weak_ordering::less)
2150 return weak_ordering::greater;
2151 else
2152 return odr;
2153 }
2154 [[nodiscard]]constexpr auto reverse(strong_ordering odr)const noexcept{
2155 if(odr==strong_ordering::greater)
2156 return strong_ordering::less;
2157 elseif(odr==strong_ordering::less)
2158 return strong_ordering::greater;
2159 else
2160 return odr;
2161 }
2163
2164//file_end
2165
2166 #line 67 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
2167 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/min_max.hpp"
2168//min_max.hpp
2169//at namespace elc::defs::base
2170/*
2171未完成的elc解释器base_defs文件
2172由steve02081504与Alex0125设计、编写
2173转载时请在不对此文件做任何修改的同时注明出处
2174项目地址:https://github.com/ELC-lang/ELC
2175*/
2176/*
2177 ,??????????????????????????
2178 ????????????????????????????
2179 ?????????????????????????????+
2180 ?????+++++++++++++++++++++++++
2181 ?????+++++++++++++++++++++++++
2182 ??????++++++++++++++++++++++++
2183 ?????++
2184 ?????+++
2185 ??????+++IIIIIIIIIIIIIIIIII
2186 ?????+++++IIIIIIIIIIIIIIIIII
2187 ?????++++++++++++++++++++++++
2188 ??????+++++++++++++++++++++++:
2189 ?????++
2190 ?????+++
2191 ??????++
2192 ??????????????????????????????II
2193 ??????????????????????????????IIII
2194 ,?????????????????????????????IIIII+
2195 =???++++++++++++++++++++++++++III?
2196 ?++++++++++++++++++++++++++++I+
2197*/
2206constexpr struct max_t{
2207private:
2208 template<class A>
2209 static constexpr A type_helper()noexcept{
2210 return declvalue(A);
2211 }
2212 template<class A,class B>
2213 static constexpr auto type_helper()noexcept{
2214 return 1?declvalue(A):declvalue(B);
2215 }
2216 template<class A,class B,class C,class...Args>
2217 static constexpr auto type_helper()noexcept{
2218 return type_helper<A,decltype(type_helper<B,C,Args...>())>();
2219 }
2220public:
2221 template<class...Args>
2222 using type=decltype(type_helper<Args...>());
2223private:
2224 template<class A>
2225 static constexpr bool able_helper()noexcept{
2226 return true;
2227 }
2228 template<class A,class B>
2229 static constexpr bool able_helper()noexcept{
2230 return compare.able<A,B>;
2231 }
2232 template<class A,class B,class C,class...Args>
2233 static constexpr bool able_helper()noexcept{
2234 if constexpr(!able_helper<B,C,Args...>())
2235 return false;
2236 else
2237 return able_helper<A,type<B,C,Args...>>();
2238 }
2239public:
2240 template<class...Args>
2241 static constexpr bool able=able_helper<Args...>();
2242private:
2243 template<class A>
2244 static constexpr bool nothrow_helper()noexcept{
2245 return true;
2246 }
2247 template<class A,class B>
2248 static constexpr bool nothrow_helper()noexcept{
2249 return compare.nothrow<A,B>;
2250 }
2251 template<class A,class B,class C,class...Args>
2252 static constexpr bool nothrow_helper()noexcept{
2253 if constexpr(!nothrow_helper<B,C,Args...>())
2254 return false;
2255 else
2256 return nothrow_helper<A,type<B,C,Args...>>();
2257 }
2258public:
2259 template<class...Args>
2260 static constexpr bool nothrow=nothrow_helper<Args...>();
2261
2262 template<typename T>
2263 static constexpr bool get_limit_able=math::arithmetic_type_info_prover<T>::has_max;
2264private:
2265 template<class A,class B> requires able<A,B>
2266 [[nodiscard]]static constexpr auto base_call(A&&a,B&&b)noexcept{
2267 const auto v=compare(a,b);
2268 return v<0?b:a;
2269 }
2270 template<class A,class B,class C,class...Args> requires able<A,B,Args...>
2271 [[nodiscard]]static constexpr auto base_call(A&&a,B&&b,C&&c,Args&&...rest)noexcept{
2272 return base_call(forward<A>(a),base_call(forward<B>(b),forward<C>(c),forward<Args>(rest)...));
2273 }
2274public:
2275 template<class...Args> requires able<Args...>
2276 [[nodiscard]]constexpr auto operator()(Args&&...rest)const noexcept{
2277 return base_call(forward<Args>(rest)...);
2278 }
2279 template<typename T>
2281 [[nodiscard]]constexpr auto operator()(::std::initializer_list<T>l)const noexcept requires able<const T,const T>{
2282 auto maxlest=l.begin();
2283 for(const auto&i:l){
2284 const auto v=compare(*maxlest,i);
2285 if(v<0)
2286 maxlest=&i;
2287 }
2288 return *maxlest;
2289 }
2290 template<class...Args>
2291 [[nodiscard]]constexpr auto operator()(Args&&...rest)const noexcept{
2292 return base_call(T(forward<Args>(rest))...);
2293 }
2294 };
2295 template<typename T>
2296 static constexpr for_type_t<T>for_type{};
2297
2298 template<class T> requires able<const T,const T>
2299 [[nodiscard]]constexpr auto operator()(::std::initializer_list<T>l)const noexcept{
2300 return for_type<T>(l);
2301 }
2302 template<typename T> requires get_limit_able<T>
2303 [[nodiscard]]constexpr auto operator()(const type_info_t<T>&)const noexcept{
2305 }
2315constexpr struct min_t{
2316private:
2317 template<class A>
2318 static constexpr A type_helper()noexcept{
2319 return declvalue(A);
2320 }
2321 template<class A,class B>
2322 static constexpr auto type_helper()noexcept{
2323 return 1?declvalue(A):declvalue(B);
2324 }
2325 template<class A,class B,class C,class...Args>
2326 static constexpr auto type_helper()noexcept{
2327 return type_helper<A,decltype(type_helper<B,C,Args...>())>();
2328 }
2329public:
2330 template<class...Args>
2331 using type=decltype(type_helper<Args...>());
2332private:
2333 template<class A>
2334 static constexpr bool able_helper()noexcept{
2335 return true;
2336 }
2337 template<class A,class B>
2338 static constexpr bool able_helper()noexcept{
2339 return compare.able<A,B>;
2340 }
2341 template<class A,class B,class C,class...Args>
2342 static constexpr bool able_helper()noexcept{
2343 if constexpr(!able_helper<B,C,Args...>())
2344 return false;
2345 else
2346 return able_helper<A,type<B,C,Args...>>();
2347 }
2348public:
2349 template<class...Args>
2350 static constexpr bool able=able_helper<Args...>();
2351private:
2352 template<class A>
2353 static constexpr bool nothrow_helper()noexcept{
2354 return true;
2355 }
2356 template<class A,class B>
2357 static constexpr bool nothrow_helper()noexcept{
2358 return compare.nothrow<A,B>;
2359 }
2360 template<class A,class B,class C,class...Args>
2361 static constexpr bool nothrow_helper()noexcept{
2362 if constexpr(!nothrow_helper<B,C,Args...>())
2363 return false;
2364 else
2365 return nothrow_helper<A,type<B,C,Args...>>();
2366 }
2367public:
2368 template<class...Args>
2369 static constexpr bool nothrow=nothrow_helper<Args...>();
2370
2371 template<typename T>
2372 static constexpr bool get_limit_able=math::arithmetic_type_info_prover<T>::has_min;
2373private:
2374 template<class A,class B> requires able<A,B>
2375 [[nodiscard]]static constexpr auto base_call(A&&a,B&&b)noexcept{
2376 const auto v=compare(a,b);
2377 return v<0?a:b;
2378 }
2379 template<class A,class B,class C,class...Args> requires able<A,B,Args...>
2380 [[nodiscard]]static constexpr auto base_call(A&&a,B&&b,C&&c,Args&&...rest)noexcept{
2381 return base_call(forward<A>(a),base_call(forward<B>(b),forward<C>(c),forward<Args>(rest)...));
2382 }
2383public:
2384 template<class...Args> requires able<Args...>
2385 [[nodiscard]]constexpr auto operator()(Args&&...rest)const noexcept{
2386 return base_call(forward<Args>(rest)...);
2387 }
2388 template<typename T>
2390 [[nodiscard]]constexpr auto operator()(::std::initializer_list<T>l)const noexcept requires able<const T,const T>{
2391 auto minlest=l.begin();
2392 for(const auto&i:l){
2393 const auto v=compare(*minlest,i);
2394 if(v>0)
2395 minlest=&i;
2396 }
2397 return *minlest;
2398 }
2399 template<class...Args>
2400 [[nodiscard]]constexpr auto operator()(Args&&...rest)const noexcept{
2401 return base_call(T(forward<Args>(rest))...);
2402 }
2403 };
2404 template<typename T>
2405 static constexpr for_type_t<T>for_type{};
2406
2407 template<class T> requires able<const T,const T>
2408 [[nodiscard]]constexpr auto operator()(::std::initializer_list<T>l)const noexcept{
2409 return for_type<T>(l);
2410 }
2411 template<typename T> requires get_limit_able<T>
2412 [[nodiscard]]constexpr auto operator()(const type_info_t<T>&)const noexcept{
2414 }
2416
2417//file_end
2418
2419 #line 68 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
2420 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/literal_support.hpp"
2421//literal_support.hpp
2422//at namespace elc::defs::base
2423/*
2424未完成的elc解释器base_defs文件
2425由steve02081504与Alex0125设计、编写
2426转载时请在不对此文件做任何修改的同时注明出处
2427项目地址:https://github.com/ELC-lang/ELC
2428*/
2429/*
2430 ,??????????????????????????
2431 ????????????????????????????
2432 ?????????????????????????????+
2433 ?????+++++++++++++++++++++++++
2434 ?????+++++++++++++++++++++++++
2435 ??????++++++++++++++++++++++++
2436 ?????++
2437 ?????+++
2438 ??????+++IIIIIIIIIIIIIIIIII
2439 ?????+++++IIIIIIIIIIIIIIIIII
2440 ?????++++++++++++++++++++++++
2441 ??????+++++++++++++++++++++++:
2442 ?????++
2443 ?????+++
2444 ??????++
2445 ??????????????????????????????II
2446 ??????????????????????????????IIII
2447 ,?????????????????????????????IIIII+
2448 =???++++++++++++++++++++++++++III?
2449 ?++++++++++++++++++++++++++++I+
2450*/
2451namespace literal_support{
2452 constexpr uint8_t hexval(char c)noexcept{
2453 if constexpr('a'>'A'){
2454 if(c>='a')
2455 return c+10-'a';
2456 elseif(c>='A')
2457 return c+10-'A';
2458 }
2459 else{
2460 if(c>='A')
2461 return c+10-'A';
2462 elseif(c>='a')
2463 return c+10-'a';
2464 }
2465 return c-'0';
2466 }
2467 using ::std::move;
2468
2469 template<class integer_T,unsigned base>
2471 integer_T& _val;
2472 public:
2473 constexpr integer_iterator(integer_T& val)noexcept:_val(val){}
2474 constexpr_as_auto void operator()(char c)noexcept{
2475 _val*=base;
2476 _val+=hexval(c);
2477 }
2478 };
2479 template<class integer_T,unsigned base>
2481 size_t _var_block=0,_scale=1;
2482 integer_T& _val;
2483 public:
2484 constexpr fast_integer_iterator(integer_T& val)noexcept:_val(val){}
2485 constexpr_as_auto void operator()(char c)noexcept{
2486 const size_t new_scale=_scale*base;
2487 if(_scale>new_scale){//溢出,建立新块
2488 _val=move(_val)*_scale+_var_block;
2489 _var_block=hexval(c);
2490 _scale=base;
2491 }
2492 else{
2493 _var_block=_var_block*base+hexval(c);
2494 _scale=new_scale;
2495 }
2496 }
2498 _val=move(_val)*_scale+_var_block;
2499 }
2500 };
2501
2502 template<class integer_T,unsigned base>
2504
2505 template<unsigned base>
2506 constexpr void base_checker()noexcept{
2507 static_assert(base==16||base==10||base==8||base==2,"base must be 16,10,8 or 2");
2508 }
2509 template<unsigned base,char c>
2510 constexpr void char_checker()noexcept{
2511 static_assert(c>='0'&&c<='9'||c>='a'&&c<='f'||c>='A'&&c<='F',"invalid char");
2512 static_assert(base>hexval(c),"invalid char");
2513 }
2514
2515 template<class integer_T>
2517 template<unsigned base>
2518 static constexpr_as_auto void eval_impl(integer_iterator_t<integer_T,base>&)noexcept{}
2519 template<unsigned base,char c,char...cs>
2520 static constexpr_as_auto void eval_impl(integer_iterator_t<integer_T,base>&iter)noexcept{
2521 if constexpr(c!='\''){
2522 char_checker<base,c>();
2523 iter(c);
2524 }
2525 eval_impl<base,cs...>(iter);
2526 }
2527
2528 template<unsigned base,char...cs>
2529 static constexpr_as_auto integer_T do_eval()noexcept{
2530 base_checker<base>();
2531 integer_T val{};
2532 {
2534 eval_impl<base,cs...>(iter);
2535 }
2536 return move(val);
2537 }
2538
2539 template<unsigned default_base,char...cs>
2540 struct eval_differ{
2541 static constexpr_as_auto integer_T eval()noexcept{
2542 return do_eval<default_base,cs...>();
2543 }
2544 };
2545 template<unsigned default_base,char...cs>
2546 struct eval_differ<default_base,'0','x',cs...>{
2547 static constexpr_as_auto integer_T eval()noexcept{
2548 return do_eval<16,cs...>();
2549 }
2550 };
2551 template<unsigned default_base,char...cs>
2552 struct eval_differ<default_base,'0','X',cs...>{
2553 static constexpr_as_auto integer_T eval()noexcept{
2554 return do_eval<16,cs...>();
2555 }
2556 };
2557 template<unsigned default_base,char...cs>
2558 struct eval_differ<default_base,'0','b',cs...>{
2559 static constexpr_as_auto integer_T eval()noexcept{
2560 return do_eval<2,cs...>();
2561 }
2562 };
2563 template<unsigned default_base,char...cs>
2564 struct eval_differ<default_base,'0','B',cs...>{
2565 static constexpr_as_auto integer_T eval()noexcept{
2566 return do_eval<2,cs...>();
2567 }
2568 };
2569 template<unsigned default_base,char...cs>
2570 struct eval_differ<default_base,'0',cs...>{
2571 static constexpr_as_auto integer_T eval()noexcept{
2572 return do_eval<8,cs...>();
2573 }
2574 };
2575 public:
2576 template<unsigned default_base,char...cs>
2577 static constexpr_as_auto integer_T eval_with_base()noexcept{
2578 return eval_differ<default_base,cs...>::eval();
2579 }
2580 template<char...cs>
2581 static constexpr_as_auto integer_T eval()noexcept{
2582 return eval_with_base<10,cs...>();
2583 }
2584 };
2585 template<class integer_T,class unsigned_integer_T>
2587 template<unsigned default_base,char...cs>
2588 struct eval_differ{
2589 static constexpr_as_auto integer_T eval()noexcept{
2590 return unsigned_integer_literal_evaler<unsigned_integer_T>::template eval_with_base<default_base,cs...>();
2591 }
2592 };
2593 template<unsigned default_base,char...cs>
2594 struct eval_differ<default_base,'-',cs...>{
2595 static constexpr_as_auto integer_T eval()noexcept{
2596 return -static_cast<integer_T>(unsigned_integer_literal_evaler<unsigned_integer_T>::template eval_with_base<default_base,cs...>());
2597 }
2598 };
2599 public:
2600 template<unsigned default_base,char...cs>
2601 static constexpr_as_auto integer_T eval_with_base()noexcept{
2602 return eval_differ<default_base,cs...>::eval();
2603 }
2604 template<char...cs>
2605 static constexpr_as_auto integer_T eval()noexcept{
2606 return eval_with_base<10,cs...>();
2607 }
2608 };
2609 template<class float_T,class base_process_T,class exp_process_integer_T,class exp_process_unsigned_integer_T>
2611 template<unsigned base,char exp_char,bool pointed>
2612 static constexpr_as_auto void eval_impl(integer_iterator_t<base_process_T,base>&,exp_process_integer_T&)noexcept{}
2613 template<unsigned base,char exp_char,bool pointed,char c,char...cs>
2614 static constexpr_as_auto void eval_impl(integer_iterator_t<base_process_T,base>&iter,exp_process_integer_T&exp)noexcept{
2615 if constexpr(c=='.'){
2616 static_assert(!pointed,"pointed twice");
2617 eval_impl<base,exp_char,true,cs...>(iter,exp);
2618 }
2619 elseif constexpr(c==exp_char || c==exp_char+('A'-'a')){
2621 eval_impl<base,exp_char,pointed>(iter,exp);
2622 }
2623 else{
2624 if constexpr(c!='\''){
2625 if constexpr(pointed)
2626 --exp;
2627 char_checker<base,c>();
2628 iter(c);
2629 }
2630 eval_impl<base,exp_char,pointed,cs...>(iter,exp);
2631 }
2632 }
2633
2634 template<unsigned base,char exp_char,char...cs>
2635 static constexpr_as_auto float_T do_eval()noexcept{
2636 base_checker<base>();
2637 base_process_T val{};exp_process_integer_T exp{};
2638 {
2640 eval_impl<base,exp_char,false,cs...>(iter,exp);
2641 }
2642 float_T aret=move(val);
2643 aret*=pow(base,move(exp));
2644 return move(aret);
2645 }
2646
2647 template<unsigned default_base,char default_exp_char,char...cs>
2648 struct eval_differ{
2649 static constexpr_as_auto float_T eval()noexcept{
2650 return do_eval<default_base,default_exp_char,cs...>();
2651 }
2652 };
2653 template<unsigned default_base,char default_exp_char,char...cs>
2654 struct eval_differ<default_base,default_exp_char,'0','x',cs...>{
2655 static constexpr_as_auto float_T eval()noexcept{
2656 return do_eval<16,'p',cs...>();
2657 }
2658 };
2659 template<unsigned default_base,char default_exp_char,char...cs>
2660 struct eval_differ<default_base,default_exp_char,'0','X',cs...>{
2661 static constexpr_as_auto float_T eval()noexcept{
2662 return do_eval<16,'p',cs...>();
2663 }
2664 };
2665 public:
2666 template<unsigned default_base,char default_exp_char,char...cs>
2667 static constexpr_as_auto float_T eval_with_base()noexcept{
2668 return eval_differ<default_base,default_exp_char,cs...>::eval();
2669 }
2670 template<char...cs>
2671 static constexpr_as_auto float_T eval()noexcept{
2672 return eval_with_base<10,'e',cs...>();
2673 }
2674 };
2675 template<class float_T,class unsigned_float_T,class base_process_T,class exp_process_integer_T,class exp_process_unsigned_integer_T>
2677 template<unsigned default_base,char default_exp_char,char...cs>
2678 struct eval_differ{
2679 static constexpr_as_auto float_T eval()noexcept{
2681 }
2682 };
2683 template<unsigned default_base,char default_exp_char,char...cs>
2684 struct eval_differ<default_base,default_exp_char,'-',cs...>{
2685 static constexpr_as_auto float_T eval()noexcept{
2686 return -static_cast<float_T>(unsigned_float_literal_evaler<unsigned_float_T,base_process_T,exp_process_integer_T,exp_process_unsigned_integer_T>::template eval_with_base<default_base,default_exp_char,cs...>());
2687 }
2688 };
2689 public:
2690 template<unsigned default_base,char default_exp_char,char...cs>
2691 static constexpr_as_auto float_T eval_with_base()noexcept{
2692 return eval_differ<default_base,default_exp_char,cs...>::eval();
2693 }
2694 template<char...cs>
2695 static constexpr_as_auto float_T eval()noexcept{
2696 return eval_with_base<10,'e',cs...>();
2697 }
2698 };
2699}
2700
2701//file_end
2702
2703 #line 69 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
2704 }
2705
2706 //由于vcruntime的type_info在全局定义,这里需要额外声明使用base::type_info.
2707 #if defined(_VCRUNTIME_H)
2708 using base::type_info;
2709 #endif
2710
2711 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
2712//_undefs.hpp
2713/*
2714未完成的elc解释器basic文件
2715由steve02081504与Alex0125设计、编写
2716转载时请在不对此文件做任何修改的同时注明出处
2717项目地址:https://github.com/ELC-lang/ELC
2718*/
2719/*
2720 ,??????????????????????????
2721 ????????????????????????????
2722 ?????????????????????????????+
2723 ?????+++++++++++++++++++++++++
2724 ?????+++++++++++++++++++++++++
2725 ??????++++++++++++++++++++++++
2726 ?????++
2727 ?????+++
2728 ??????+++IIIIIIIIIIIIIIIIII
2729 ?????+++++IIIIIIIIIIIIIIIIII
2730 ?????++++++++++++++++++++++++
2731 ??????+++++++++++++++++++++++:
2732 ?????++
2733 ?????+++
2734 ??????++
2735 ??????????????????????????????II
2736 ??????????????????????????????IIII
2737 ,?????????????????????????????IIIII+
2738 =???++++++++++++++++++++++++++III?
2739 ?++++++++++++++++++++++++++++I+
2740*/
2741#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
2742//_undefs.hpp
2743/*
2744未完成的elc解释器_share文件
2745由steve02081504与Alex0125设计、编写
2746转载时请在不对此文件做任何修改的同时注明出处
2747项目地址:https://github.com/ELC-lang/ELC
2748*/
2749/*
2750 ,??????????????????????????
2751 ????????????????????????????
2752 ?????????????????????????????+
2753 ?????+++++++++++++++++++++++++
2754 ?????+++++++++++++++++++++++++
2755 ??????++++++++++++++++++++++++
2756 ?????++
2757 ?????+++
2758 ??????+++IIIIIIIIIIIIIIIIII
2759 ?????+++++IIIIIIIIIIIIIIIIII
2760 ?????++++++++++++++++++++++++
2761 ??????+++++++++++++++++++++++:
2762 ?????++
2763 ?????+++
2764 ??????++
2765 ??????????????????????????????II
2766 ??????????????????????????????IIII
2767 ,?????????????????????????????IIIII+
2768 =???++++++++++++++++++++++++++III?
2769 ?++++++++++++++++++++++++++++I+
2770*/
2771
2772//defs at "_defs.hpp"
2773
2774#if defined(_MSC_VER)
2775 #pragma warning(pop)
2776#endif
2777//#undef suppress_msvc_warning
2778#undef disable_msvc_warning
2779#undef push_msvc_warning
2780#undef pop_msvc_warning
2781#undef push_and_disable_msvc_warning
2782#if defined(_MSC_VER)
2783 #pragma pack(pop)
2784#endif
2785#if defined(__GNUC__)
2786 #pragma GCC diagnostic pop
2787#endif
2788#if defined(_MSC_VER)
2789 #pragma pop_macro("new")
2790 #pragma pop_macro("delete")
2791 #pragma pop_macro("min")
2792 #pragma pop_macro("max")
2793 #pragma pop_macro("abs")
2794 #pragma pop_macro("export")
2795 #pragma pop_macro("rand")
2796 #pragma pop_macro("sqrt")
2797 #pragma pop_macro("type_info")
2798 #pragma pop_macro("elc")
2799#endif
2800
2801//
2802#if defined(ELC_VOID_NAME)
2803 #define void the_void
2804#endif
2805//
2806#if defined(ELC_PUBLIC_ALL)
2807 #undef protected
2808 #undef private
2809#endif
2810//
2811#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
2812 #define rand the_rand
2813#endif
2814
2815// #undef often_noexcept
2816#undef noexcept_as
2817#undef noexcept_as_auto
2818#undef constexpr_as
2819#undef constexpr_as_auto
2820
2821#undef using_method_from_base_t
2822#undef using_method_from_value
2823
2824#undef floop
2825#undef times
2826#undef debug_times
2827#undef enable_adl
2828
2829#undef re_declvalue
2830#undef re_decltype
2831
2832#undef declvalue
2833
2834#undef template_error
2835#undef template_error_of_type
2836#undef template_warning
2837
2838#undef type_info_of
2839#undef type_name_of
2840
2841#undef is_common_attribute
2842#undef is_special_attribute
2843
2844#undef has_attribute
2845#undef not_has_attribute
2846
2847#undef float_size_of
2848#undef bitnum_of
2849
2850#undef def_common_attribute_with_nothing
2851#undef def_special_attribute_with_nothing
2852
2853#undef common_attribute_t
2854#undef special_attribute_t
2855
2856#undef enable_if
2857#undef enabled_by_default
2858#undef disabled_by_default
2859#undef enable_if_not_ill_form
2860#undef enable_flag
2861
2862#undef was_an_ill_form
2863#undef was_an_ill_form_with_parameter
2864#undef was_not_an_ill_form
2865#undef was_not_an_ill_form_and_noexcept
2866#undef was_not_an_ill_form_with_parameter
2867
2868#undef recursive_λ
2869#undef get_recursive_λ_caller
2870#undef λ
2871#undef exλ
2872#undef λ_with_catch
2873#undef self_recursion
2874#undef λ_RLSRRS
2875#undef λ_inline
2876#undef λ_force_inline
2877
2878#undef MAGIC
2879
2880#undef nothing
2881
2882#undef elseif
2883#undef _big_than_
2884#undef _small_than_
2885
2886#if defined(_MSC_VER)
2887 #undef not
2888 #undef and
2889 #undef or
2890#endif
2891
2892#undef INTER_NAMESPACE
2893#undef BREAK_NAMESPACE
2894
2895#undef szie
2896#undef form
2897
2898#undef template_name
2899#undef type_name
2900
2901#undef not_in_debug
2902
2903#undef es
2904#undef ec
2905
2906#undef ELC_TEST_EVENTNAME
2907
2908#undef override_instance_struct
2909
2910#undef distinctive
2911
2912#undef force_inline
2913
2914#undef with_no_vtable
2915
2916#undef in_consteval
2917
2918#undef no_vtable_struct
2919#undef no_vtable_class
2920
2921//#undef get_elc_defs
2922
2923//file_end
2924
2925#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
2926
2927//file_end
2928
2929 #line 77 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
2930}
2931#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/pre_math.hpp"
2932//pre_math.hpp
2933/*
2934未完成的elc解释器_share文件
2935由steve02081504与Alex0125设计、编写
2936转载时请在不对此文件做任何修改的同时注明出处
2937项目地址:https://github.com/ELC-lang/ELC
2938*/
2939/*
2940 ,??????????????????????????
2941 ????????????????????????????
2942 ?????????????????????????????+
2943 ?????+++++++++++++++++++++++++
2944 ?????+++++++++++++++++++++++++
2945 ??????++++++++++++++++++++++++
2946 ?????++
2947 ?????+++
2948 ??????+++IIIIIIIIIIIIIIIIII
2949 ?????+++++IIIIIIIIIIIIIIIIII
2950 ?????++++++++++++++++++++++++
2951 ??????+++++++++++++++++++++++:
2952 ?????++
2953 ?????+++
2954 ??????++
2955 ??????????????????????????????II
2956 ??????????????????????????????IIII
2957 ,?????????????????????????????IIIII+
2958 =???++++++++++++++++++++++++++III?
2959 ?++++++++++++++++++++++++++++I+
2960*/
2961namespace elc::defs{
2962 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_defs.hpp"
2963//_defs.hpp
2964/*
2965未完成的elc解释器_share文件
2966由steve02081504与Alex0125设计、编写
2967转载时请在不对此文件做任何修改的同时注明出处
2968项目地址:https://github.com/ELC-lang/ELC
2969*/
2970/*
2971 ,??????????????????????????
2972 ????????????????????????????
2973 ?????????????????????????????+
2974 ?????+++++++++++++++++++++++++
2975 ?????+++++++++++++++++++++++++
2976 ??????++++++++++++++++++++++++
2977 ?????++
2978 ?????+++
2979 ??????+++IIIIIIIIIIIIIIIIII
2980 ?????+++++IIIIIIIIIIIIIIIIII
2981 ?????++++++++++++++++++++++++
2982 ??????+++++++++++++++++++++++:
2983 ?????++
2984 ?????+++
2985 ??????++
2986 ??????????????????????????????II
2987 ??????????????????????????????IIII
2988 ,?????????????????????????????IIIII+
2989 =???++++++++++++++++++++++++++III?
2990 ?++++++++++++++++++++++++++++I+
2991*/
2992
2993//undefs at "_undefs.hpp"
2994
2995#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
2996//_defs.hpp
2997/*
2998未完成的elc解释器_share文件
2999由steve02081504与Alex0125设计、编写
3000转载时请在不对此文件做任何修改的同时注明出处
3001项目地址:https://github.com/ELC-lang/ELC
3002*/
3003/*
3004 ,??????????????????????????
3005 ????????????????????????????
3006 ?????????????????????????????+
3007 ?????+++++++++++++++++++++++++
3008 ?????+++++++++++++++++++++++++
3009 ??????++++++++++++++++++++++++
3010 ?????++
3011 ?????+++
3012 ??????+++IIIIIIIIIIIIIIIIII
3013 ?????+++++IIIIIIIIIIIIIIIIII
3014 ?????++++++++++++++++++++++++
3015 ??????+++++++++++++++++++++++:
3016 ?????++
3017 ?????+++
3018 ??????++
3019 ??????????????????????????????II
3020 ??????????????????????????????IIII
3021 ,?????????????????????????????IIIII+
3022 =???++++++++++++++++++++++++++III?
3023 ?++++++++++++++++++++++++++++I+
3024*/
3025
3026//undefs at "_undefs.hpp"
3027
3028#if defined(ELC_CODE_REALM)
3029 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
3030#endif
3031
3032//set ELC_WARNING_LEVEL default to 4(max)
3033#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
3034
3035#if defined(_MSC_VER)
3036 #pragma warning(push,ELC_WARNING_LEVEL)
3037 #pragma warning(disable:4099)//class与struct混用警告diss
3038 #pragma warning(disable:4584)//重复子类警告diss
3039 #pragma warning(disable:4250)//域控制继承警告diss
3040 #pragma warning(disable:26432)//不完全默认方法警告diss
3041 #pragma warning(disable:26435)//virtual override方法警告diss
3042 #pragma warning(disable:26481)//容器安利diss
3043 #pragma warning(disable:26446)//gsl::at安利diss
3044 #pragma warning(disable:26434)//方法覆盖警告diss
3045 #pragma warning(disable:26429)//gsl::not_null安利diss
3046 #pragma warning(disable:26471)//对void*进行static_cast安利diss
3047 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
3048 #pragma warning(disable:26473)//相同指针显式cast警告diss
3049 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
3050 #pragma warning(disable:26485)//数组作指针警告diss
3051 #pragma warning(disable:26490)//reinterpret_cast警告diss
3052 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
3053 #pragma warning(disable:26482)//非常数数组索引警告diss
3054 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
3055#endif
3056#if defined(__GNUC__)
3057 #pragma GCC diagnostic push
3058 #pragma GCC diagnostic warning "-Wall"//开启所有警告
3059 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
3060#endif
3061#if defined(_MSC_VER)
3062 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
3063 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
3064 #define push_msvc_warning() __pragma(warning(push))
3065 #define pop_msvc_warning() __pragma(warning(pop))
3066 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
3067#else
3068 //#define suppress_msvc_warning(...)
3069 #define disable_msvc_warning(...)
3070 #define push_msvc_warning()
3071 #define pop_msvc_warning()
3072 #define push_and_disable_msvc_warning(...)
3073#endif
3074#if defined(_MSC_VER)
3075 //push pack settings
3076 #pragma pack(push)
3077 #pragma pack()
3078#endif
3079#if defined(_MSC_VER)
3080 //push and undef common macros
3081 #pragma push_macro("new")
3082 #undef new
3083 #pragma push_macro("delete")
3084 #undef delete
3085 #pragma push_macro("min")
3086 #undef min
3087 #pragma push_macro("max")
3088 #undef max
3089 #pragma push_macro("abs")
3090 #undef abs
3091 #pragma push_macro("export")
3092 #undef export
3093 #pragma push_macro("rand")
3094 #undef rand
3095 #pragma push_macro("sqrt")
3096 #undef sqrt
3097 #pragma push_macro("type_info")
3098 #undef type_info
3099 #pragma push_macro("elc")
3100 #undef elc
3101#endif
3102//
3103#if defined(ELC_VOID_NAME)
3104 #undef void
3105#endif
3106//
3107#if defined(ELC_PUBLIC_ALL)
3108 #define protected public
3109 #define private public
3110#endif
3111//
3112#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
3113 #undef rand
3114#endif
3115
3116// #define often_noexcept
3117#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
3118#define noexcept_as_auto MAGIC//哦现在有了
3119#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
3120#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
3121
3122#define using_method_from_base_t(name,...) \
3123template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
3124auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
3125{\
3126 return base_t::name(forward<Args>(rest)...);\
3127}\
3128
3129#define using_method_from_value(name,value_name,...) \
3130template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
3131auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
3132{\
3133 return value_name.name(forward<Args>(rest)...);\
3134}\
3135
3136#define floop while(__builtin_is_my_dick_still_there())
3137#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
3138#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
3139#if defined(_MSC_VER) && _MSC_VER>=1935
3140 //@see https://developercommunity.visualstudio.com/t/10193638
3141 #define enable_adl(name) template<typename=void>void name()noexcept=delete
3142#else
3143 #define enable_adl(name) void name()noexcept=delete
3144#endif
3145
3146#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
3147#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
3148
3149#define declvalue(...) (::std::declval<__VA_ARGS__>())
3150
3152#define template_error(reason) static_assert(template_error_helper<T>,reason)
3154#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
3156#define template_warning(reason) template_warning_helper<T>(reason)
3157
3158//for type_info
3159#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
3160#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
3161
3162#define is_common_attribute(name) public attribute<T,name<T>>
3163#define is_special_attribute(name) public attribute<T,name>
3164
3165#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
3166#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
3167
3168//for float_size_t
3169#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
3170//bitnum_of
3171#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
3172
3173//for attribute
3174#define def_common_attribute_with_nothing(name) \
3175template<typename T>\
3176class name{}\
3177
3178#define def_special_attribute_with_nothing(name) \
3179class name{}\
3180
3181#define common_attribute_t template<class>class
3182#define special_attribute_t class
3183
3192#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
3194#define enabled_by_default class enable_state=void
3196#define disabled_by_default class enable_state= ::std::enable_if_t<false>
3198#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
3200#define enable_flag class enable_state
3201
3202#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
3203#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
3204#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
3205#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
3206#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
3207
3209#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
3211#define get_recursive_λ_caller(name,...) \
3212exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
3213 return name(name,Args...);\
3214}
3216#define λ []
3218#define exλ [&]
3220#define λ_with_catch(...) [__VA_ARGS__]
3222#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
3223//recursive_λ_self_referential_reserved_symbolname
3224#define λ_RLSRRS _my_jb_super_sb_name_
3225
3226#if defined(_MSC_VER) && !defined(__clang__)
3227 #define λ_inline [[msvc::forceinline]]
3228 #define λ_force_inline [[msvc::forceinline]]
3229#elif
3230 #define λ_inline [[gnu::always_inline]]
3231 #define λ_force_inline [[gnu::always_inline]]
3232#else
3233 #define λ_inline
3234 #define λ_force_inline
3235#endif
3236
3237#define MAGIC//ahh,ko no tenno da!
3238
3240#define nothing
3241
3243#define elseif else if
3245#define _big_than_ >
3247#define _small_than_ <
3248
3249#if defined(_MSC_VER)
3250 #define not !
3251 #define and &&
3252 #define or ||
3253#endif
3254
3256#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
3258#define BREAK_NAMESPACE }
3259
3261#define template_name template
3263#define type_name class
3264
3265#if defined(DEBUG) || defined(_DEBUG)
3266 #define not_in_debug 0
3267 #define in_debug 1
3268#else
3269 #define not_in_debug 1
3270 #define in_debug 0
3271#endif
3272
3273#define es U""
3274#define ec(ch) U ## ch
3275
3276#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
3277 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
3278#else
3279 #define ELC_TEST_EVENTNAME(name)
3280#endif
3281
3282#define override_instance_struct \
3283protected:\
3284 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
3285 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
3286 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
3287 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
3288 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
3289
3290#if defined(_MSC_VER) && !defined(__clang__)
3291 #define distinctive __declspec(dllexport)
3292#else
3293 #define distinctive
3294#endif
3295
3296#if defined(_MSC_VER) && !defined(__clang__)
3297 #define force_inline __forceinline
3298#elif defined(__GNUC__) || defined(__clang__)
3299 #define force_inline __attribute__((always_inline)) inline
3300#else
3301 #define force_inline inline
3302#endif
3303
3304#if defined(_MSC_VER) && !defined(__clang__)
3305 #define with_no_vtable __declspec(novtable)
3306#else
3307 #define with_no_vtable
3308#endif
3309
3310#define in_consteval (::std::is_constant_evaluated())
3311
3312#define no_vtable_struct struct with_no_vtable
3313#define no_vtable_class class with_no_vtable
3314
3315//#define get_elc_defs using namespace ::elc::defs
3316
3317//file_end
3318
3319#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_defs.hpp"
3320
3321// 定义一个宏来检测是否支持GCC内置函数
3322#if defined(__GNUC__) || defined(__clang__)
3323 #define HAS_GCC_BUILTINS 1
3324#else
3325 #define HAS_GCC_BUILTINS 0
3326#endif
3327
3328// 定义一个宏来检测是否支持MSVC内置函数
3329#if defined(_MSC_VER) && !defined(__clang__)
3330 #define HAS_MSVC_INTRINSICS 1
3331#else
3332 #define HAS_MSVC_INTRINSICS 0
3333#endif
3334
3335// 定义一个宏来检测是否支持x86汇编
3336#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
3337 #define HAS_X86_ASM 1
3338#else
3339 #define HAS_X86_ASM 0
3340#endif
3341
3342// 定义一个宏来检测是否支持x86-64汇编
3343#if defined(__x86_64__) || defined(_M_X64)
3344 #define HAS_X86_64_ASM 1
3345#else
3346 #define HAS_X86_64_ASM 0
3347#endif
3348
3349// 定义一个宏来检测是否支持ARM汇编
3350#if defined(__arm__) || defined(_M_ARM)
3351 #define HAS_ARM_ASM 1
3352#else
3353 #define HAS_ARM_ASM 0
3354#endif
3355
3356// 定义一个宏来检测是否支持ARM64汇编
3357#if defined(__aarch64__)
3358 #define HAS_ARM64_ASM 1
3359#else
3360 #define HAS_ARM64_ASM 0
3361#endif
3362
3363//file_end
3364
3365 #line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/pre_math.hpp"
3366
3367 namespace basic_environment{
3370 constexpr size_t BIT_POSSIBILITY=1<<1;
3371
3372 typedef bool bit_type;
3373 [[nodiscard]]constexpr force_inline bool is_rounding_bit(bit_type v)noexcept{
3374 if constexpr(BIT_POSSIBILITY==2)
3375 return v;
3376 else{
3378 return v>=BIT_POSSIBILITY/2;
3380 }
3381 }
3382
3383 #if defined(__SIZEOF_INT128__)
3384 #define ELC_BASE_ENV_HAS_INT128
3385 typedef __uint128_t uint128_t;
3386 typedef __int128_t int128_t;
3387 #endif
3388 #if defined(ELC_BASE_ENV_HAS_INT128)
3389 typedef uint128_t uint_fast128_t;
3390 typedef int128_t int_fast128_t;
3391 template<char...cs>
3392 constexpr uint128_t operator ""_u128()noexcept{
3394 }
3395 template<char...cs>
3396 constexpr int128_t operator ""_i128()noexcept{
3397 return literal_support::signed_integer_literal_evaler<int128_t,uint128_t>::eval<cs...>();
3398 }
3399 #endif
3400 //基础的uintmax_t
3401 typedef ::std::uintmax_t basic_uintmax_t;
3402 typedef ::std::intmax_t basic_intmax_t;
3403 //更新uintmax_t和intmax_t的代指
3404 typedef decltype(λ{
3405 #if defined(ELC_BASE_ENV_HAS_INT128)
3406 if constexpr(sizeof(basic_uintmax_t) < sizeof(uint128_t))
3407 return uint128_t{};
3408 else
3409 #endif
3410 return basic_uintmax_t{};
3411 }()) uintmax_t;
3412 typedef decltype(λ{
3413 #if defined(ELC_BASE_ENV_HAS_INT128)
3414 if constexpr(sizeof(basic_intmax_t) < sizeof(int128_t))
3415 return int128_t{};
3416 else
3417 #endif
3418 return basic_intmax_t{};
3419 }()) intmax_t;
3420 //众所周知,class不能作为数组下标,所以uintmax_index_t等类型的存在是有必要的
3423
3424 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/float_info.hpp"
3425//float_info.hpp
3426/*
3427未完成的elc解释器_share文件
3428由steve02081504与Alex0125设计、编写
3429转载时请在不对此文件做任何修改的同时注明出处
3430项目地址:https://github.com/ELC-lang/ELC
3431*/
3432/*
3433 ,??????????????????????????
3434 ????????????????????????????
3435 ?????????????????????????????+
3436 ?????+++++++++++++++++++++++++
3437 ?????+++++++++++++++++++++++++
3438 ??????++++++++++++++++++++++++
3439 ?????++
3440 ?????+++
3441 ??????+++IIIIIIIIIIIIIIIIII
3442 ?????+++++IIIIIIIIIIIIIIIIII
3443 ?????++++++++++++++++++++++++
3444 ??????+++++++++++++++++++++++:
3445 ?????++
3446 ?????+++
3447 ??????++
3448 ??????????????????????????????II
3449 ??????????????????????????????IIII
3450 ,?????????????????????????????IIIII+
3451 =???++++++++++++++++++++++++++III?
3452 ?++++++++++++++++++++++++++++I+
3453*/
3454/*
3455参考信息:
3456float:
3457 Sign bit: 1 bit
3458 Exponent width: 8 bits
3459 Significand precision: 24 bits (23 explicitly stored)
3460double:
3461 Sign bit: 1 bit
3462 Exponent: 11 bits
3463 Significand precision: 53 bits (52 explicitly stored)
3464IEEE-754 binary128:
3465 Sign bit: 1 bit
3466 Exponent width: 15 bits
3467 Significand precision: 113 bits (112 explicitly stored)
3468注意一下long double在msvc上是double,得预处理判断一下
3469*/
3470namespace float_infos{
3472 //精确数部分的掩码
3473 static constexpr auto precision_mask=uint16_t(0x07FFu);
3474 //精确数的无符号整数类型
3476
3477 //浮点数的无符号整数数据类型
3478 typedef uint16_t data_type;
3479
3480 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
3481 static constexpr auto precision_base=uint16_t(0x0800u);
3482 //自浮点数获取精确数的基的位数(如float是23)
3483 static constexpr auto precision_base_bit=11u;
3484 //浮点数的指数部分的diff(如float是127,double是1023,long double是16383)
3485 static constexpr auto exponent_diff=15;
3486 //浮点数的指数部分的min(如float是-126,double是-1022,long double是-16382)
3487 static constexpr auto exponent_min=-14;
3488 //浮点数的指数部分的max(如float是127,double是1023,long double是16383)
3489 static constexpr auto exponent_max=15;
3490
3491 //浮点数的指数部分的无符号整数类型
3492 typedef uint8_t exponent_unsigned_type;
3493 //浮点数的指数部分的经过偏移后的有符号整数类型
3494 typedef int8_t exponent_signed_type;
3495 //浮点数的指数部分的掩码
3496 static constexpr auto exponent_mask=uint16_t(0x7FFFu);
3497
3498 //快速开方魔数
3499 static constexpr auto quick_invsqrt_magic_number=uint16_t(0xB350u);//59a7 : 0.00187549, 59a8 : 0.0016386, 59a9 : 0.00181447
3500 };
3502 //精确数部分的掩码
3503 static constexpr auto precision_mask=uint32_t(0x007FFFFFu);
3504 //精确数的无符号整数类型
3506
3507 //浮点数的无符号整数数据类型
3508 typedef uint32_t data_type;
3509
3510 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
3511 static constexpr auto precision_base=uint32_t(0x800000u);
3512 //自浮点数获取精确数的基的位数(如float是23)
3513 static constexpr auto precision_base_bit=23u;
3514 //浮点数的指数部分的diff(如float是127,double是1023,long double是16383)
3515 static constexpr auto exponent_diff=127;
3516 //浮点数的指数部分的min(如float是-126,double是-1022,long double是-16382)
3517 static constexpr auto exponent_min=-126;
3518 //浮点数的指数部分的max(如float是127,double是1023,long double是16383)
3519 static constexpr auto exponent_max=127;
3520
3521 //浮点数的指数部分的无符号整数类型
3522 typedef uint8_t exponent_unsigned_type;
3523 //浮点数的指数部分的经过偏移后的有符号整数类型
3524 typedef int8_t exponent_signed_type;
3525 //浮点数的指数部分的掩码
3526 static constexpr auto exponent_mask=uint32_t(0x7FFFFFFFu);
3527
3528 //快速开方魔数
3529 static constexpr auto quick_invsqrt_magic_number=uint32_t(0xBE6EB50Cu);
3530 };
3532 //精确数部分的掩码
3533 static constexpr auto precision_mask=uint64_t(0x000FFFFFFFFFFFFFu);
3534 //精确数的无符号整数类型
3536
3537 //浮点数的无符号整数数据类型
3538 typedef uint64_t data_type;
3539
3540 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
3541 static constexpr auto precision_base=uint64_t(0x10000000000000u);
3542 //自浮点数获取精确数的基的位数(如float是23)
3543 static constexpr auto precision_base_bit=52u;
3544 //浮点数的指数部分的diff(如float是127,double是1023,long double是16383)
3545 static constexpr auto exponent_diff=1023;
3546 //浮点数的指数部分的min(如float是-126,double是-1022,long double是-16382)
3547 static constexpr auto exponent_min=-1022;
3548 //浮点数的指数部分的max(如float是127,double是1023,long double是16383)
3549 static constexpr auto exponent_max=1023;
3550
3551 //浮点数的指数部分的无符号整数类型
3552 typedef uint16_t exponent_unsigned_type;
3553 //浮点数的指数部分的经过偏移后的有符号整数类型
3554 typedef int16_t exponent_signed_type;
3555 //浮点数的指数部分的掩码
3556 static constexpr auto exponent_mask=uint64_t(0x7FFFFFFFFFFFFFFFu);
3557
3558 //快速开方魔数
3559 static constexpr auto quick_invsqrt_magic_number=uint64_t(0xBFCDD6A18F6A6F52u);
3560 };
3561 #if defined(ELC_BASE_ENV_HAS_INT128)
3562 struct float128_float_info{
3563 //精确数部分的掩码
3564 static constexpr auto precision_mask=0x0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128;
3565 //精确数的无符号整数类型
3566 typedef decltype(precision_mask) precision_type;
3567
3568 //浮点数的无符号整数数据类型
3569 typedef uint128_t data_type;
3570
3571 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
3572 static constexpr auto precision_base=0x10000000000000000000000000000_u128;
3573 //自浮点数获取精确数的基的位数(如float是23)
3574 static constexpr auto precision_base_bit=112u;
3575 //浮点数的指数部分的diff(如float是127,double是1023,long double是16383)
3576 static constexpr auto exponent_diff=16383;
3577 //浮点数的指数部分的min(如float是-126,double是-1022,long double是-16382)
3578 static constexpr auto exponent_min=-16382;
3579 //浮点数的指数部分的max(如float是127,double是1023,long double是16383)
3580 static constexpr auto exponent_max=16383;
3581
3582 //浮点数的指数部分的无符号整数类型
3583 typedef uint16_t exponent_unsigned_type;
3584 //浮点数的指数部分的经过偏移后的有符号整数类型
3585 typedef int16_t exponent_signed_type;
3586 //浮点数的指数部分的掩码
3587 static constexpr auto exponent_mask=0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128;
3588
3589 //快速开方魔数
3590 static constexpr auto quick_invsqrt_magic_number=0xBFFCDD90BCFBC61B561FEEE8A556CED2_u128;
3591 };
3592 #endif
3594 //精确数部分的掩码
3595 static constexpr auto precision_mask=uint16_t(0x00FFu);
3596 //精确数的无符号整数类型
3598
3599 //浮点数的无符号整数数据类型
3600 typedef uint16_t data_type;
3601
3602 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
3603 static constexpr auto precision_base=uint16_t(0x0100u);
3604 //自浮点数获取精确数的基的位数(如float是23)
3605 static constexpr auto precision_base_bit=8u;
3606 //浮点数的指数部分的diff(如float是127,double是1023,long double是16383)
3607 static constexpr auto exponent_diff=127;
3608 //浮点数的指数部分的min(如float是-126,double是-1022,long double是-16382)
3609 static constexpr auto exponent_min=-126;
3610 //浮点数的指数部分的max(如float是127,double是1023,long double是16383)
3611 static constexpr auto exponent_max=127;
3612
3613 //浮点数的指数部分的无符号整数类型
3614 typedef uint8_t exponent_unsigned_type;
3615 //浮点数的指数部分的经过偏移后的有符号整数类型
3616 typedef int8_t exponent_signed_type;
3617 //浮点数的指数部分的掩码
3618 static constexpr auto exponent_mask=uint16_t(0x7FFFu);
3619
3620 //快速开方魔数
3621 static constexpr auto quick_invsqrt_magic_number=uint16_t(0xBE6Au);//5f34 : 0.0035338, 5f35 : 0.00163863, 5f36 : 0.00357427
3622 };
3623
3624 template<basic_float_type T>
3625 static constexpr auto get_float_info()noexcept{
3626 #if defined(__STDCPP_FLOAT16_T__)
3627 if constexpr(type_info<T> == type_info<::std::float16_t>)
3628 return float16_float_info{};
3629 #endif
3630 #if defined(__STDCPP_FLOAT32_T__)
3631 if constexpr(type_info<T> == type_info<::std::float32_t>)
3632 return float32_float_info{};
3633 #endif
3634 #if defined(__STDCPP_FLOAT64_T__)
3635 if constexpr(type_info<T> == type_info<::std::float64_t>)
3636 return float64_float_info{};
3637 #endif
3638 #if defined(__STDCPP_FLOAT128_T__)
3639 #if defined(ELC_BASE_ENV_HAS_INT128)
3640 if constexpr(type_info<T> == type_info<::std::float128_t>)
3641 return float128_float_info{};
3642 #else
3643 //"float128_t is not supported"
3644 #endif
3645 #endif
3646 #if defined(__STDCPP_BFLOAT16_T__)
3647 if constexpr(type_info<T> == type_info<::std::bfloat16_t>)
3648 return bfloat16_float_info{};
3649 #endif
3650 if constexpr(type_info<T> == type_info<float>)
3651 return float32_float_info{};
3652 elseif constexpr(type_info<T> == type_info<double>)
3653 return float64_float_info{};
3654 elseif constexpr(type_info<T> == type_info<long double>){
3655 #if defined(_MSC_VER)//msvc上long double就是double
3656 return float64_float_info{};
3657 #elif defined(ELC_BASE_ENV_HAS_INT128) && defined(__aarch64__)//aarch64上long double是float128
3658 return float128_float_info{};
3659 #else
3660 //"long double is not supported"
3661 #endif
3662 }
3663 }
3664 template<basic_float_type T>
3665 using float_info=decltype(get_float_info<T>());
3666
3667 //精确数部分的掩码
3668 template<basic_float_type T>
3670 //精确数的无符号整数类型
3671 template<basic_float_type T>
3673
3674 //浮点数的无符号整数数据类型
3675 template<basic_float_type T>
3677
3678 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
3679 template<basic_float_type T>
3681
3682 //自浮点数获取精确数的基的位数(如float是23)
3683 template<basic_float_type T>
3685
3686 //浮点数的指数部分的diff(如float是127,double是1023,long double是16383)
3687 template<basic_float_type T>
3689 //浮点数的指数部分的min(如float是-126,double是-1022,long double是-16382)
3690 template<basic_float_type T>
3692 //浮点数的指数部分的max(如float是127,double是1023,long double是16383)
3693 template<basic_float_type T>
3695
3696 //浮点数的指数部分的无符号整数类型
3697 template<basic_float_type T>
3699 //浮点数的指数部分的经过偏移后的有符号整数类型
3700 template<basic_float_type T>
3702 //浮点数的指数部分的掩码
3703 template<basic_float_type T>
3705
3706 //快速开方魔数
3707 template<basic_float_type T>
3709}
3710
3711//file_end
3712
3713 #line 90 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/pre_math.hpp"
3714 }
3715 using basic_environment::BIT_POSSIBILITY;
3716
3717 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_undefs.hpp"
3718//_undefs.hpp
3719/*
3720未完成的elc解释器_share文件
3721由steve02081504与Alex0125设计、编写
3722转载时请在不对此文件做任何修改的同时注明出处
3723项目地址:https://github.com/ELC-lang/ELC
3724*/
3725/*
3726 ,??????????????????????????
3727 ????????????????????????????
3728 ?????????????????????????????+
3729 ?????+++++++++++++++++++++++++
3730 ?????+++++++++++++++++++++++++
3731 ??????++++++++++++++++++++++++
3732 ?????++
3733 ?????+++
3734 ??????+++IIIIIIIIIIIIIIIIII
3735 ?????+++++IIIIIIIIIIIIIIIIII
3736 ?????++++++++++++++++++++++++
3737 ??????+++++++++++++++++++++++:
3738 ?????++
3739 ?????+++
3740 ??????++
3741 ??????????????????????????????II
3742 ??????????????????????????????IIII
3743 ,?????????????????????????????IIIII+
3744 =???++++++++++++++++++++++++++III?
3745 ?++++++++++++++++++++++++++++I+
3746*/
3747
3748//defs at "_defs.hpp"
3749
3750#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
3751//_undefs.hpp
3752/*
3753未完成的elc解释器_share文件
3754由steve02081504与Alex0125设计、编写
3755转载时请在不对此文件做任何修改的同时注明出处
3756项目地址:https://github.com/ELC-lang/ELC
3757*/
3758/*
3759 ,??????????????????????????
3760 ????????????????????????????
3761 ?????????????????????????????+
3762 ?????+++++++++++++++++++++++++
3763 ?????+++++++++++++++++++++++++
3764 ??????++++++++++++++++++++++++
3765 ?????++
3766 ?????+++
3767 ??????+++IIIIIIIIIIIIIIIIII
3768 ?????+++++IIIIIIIIIIIIIIIIII
3769 ?????++++++++++++++++++++++++
3770 ??????+++++++++++++++++++++++:
3771 ?????++
3772 ?????+++
3773 ??????++
3774 ??????????????????????????????II
3775 ??????????????????????????????IIII
3776 ,?????????????????????????????IIIII+
3777 =???++++++++++++++++++++++++++III?
3778 ?++++++++++++++++++++++++++++I+
3779*/
3780
3781//defs at "_defs.hpp"
3782
3783#if defined(_MSC_VER)
3784 #pragma warning(pop)
3785#endif
3786//#undef suppress_msvc_warning
3787#undef disable_msvc_warning
3788#undef push_msvc_warning
3789#undef pop_msvc_warning
3790#undef push_and_disable_msvc_warning
3791#if defined(_MSC_VER)
3792 #pragma pack(pop)
3793#endif
3794#if defined(__GNUC__)
3795 #pragma GCC diagnostic pop
3796#endif
3797#if defined(_MSC_VER)
3798 #pragma pop_macro("new")
3799 #pragma pop_macro("delete")
3800 #pragma pop_macro("min")
3801 #pragma pop_macro("max")
3802 #pragma pop_macro("abs")
3803 #pragma pop_macro("export")
3804 #pragma pop_macro("rand")
3805 #pragma pop_macro("sqrt")
3806 #pragma pop_macro("type_info")
3807 #pragma pop_macro("elc")
3808#endif
3809
3810//
3811#if defined(ELC_VOID_NAME)
3812 #define void the_void
3813#endif
3814//
3815#if defined(ELC_PUBLIC_ALL)
3816 #undef protected
3817 #undef private
3818#endif
3819//
3820#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
3821 #define rand the_rand
3822#endif
3823
3824// #undef often_noexcept
3825#undef noexcept_as
3826#undef noexcept_as_auto
3827#undef constexpr_as
3828#undef constexpr_as_auto
3829
3830#undef using_method_from_base_t
3831#undef using_method_from_value
3832
3833#undef floop
3834#undef times
3835#undef debug_times
3836#undef enable_adl
3837
3838#undef re_declvalue
3839#undef re_decltype
3840
3841#undef declvalue
3842
3843#undef template_error
3844#undef template_error_of_type
3845#undef template_warning
3846
3847#undef type_info_of
3848#undef type_name_of
3849
3850#undef is_common_attribute
3851#undef is_special_attribute
3852
3853#undef has_attribute
3854#undef not_has_attribute
3855
3856#undef float_size_of
3857#undef bitnum_of
3858
3859#undef def_common_attribute_with_nothing
3860#undef def_special_attribute_with_nothing
3861
3862#undef common_attribute_t
3863#undef special_attribute_t
3864
3865#undef enable_if
3866#undef enabled_by_default
3867#undef disabled_by_default
3868#undef enable_if_not_ill_form
3869#undef enable_flag
3870
3871#undef was_an_ill_form
3872#undef was_an_ill_form_with_parameter
3873#undef was_not_an_ill_form
3874#undef was_not_an_ill_form_and_noexcept
3875#undef was_not_an_ill_form_with_parameter
3876
3877#undef recursive_λ
3878#undef get_recursive_λ_caller
3879#undef λ
3880#undef exλ
3881#undef λ_with_catch
3882#undef self_recursion
3883#undef λ_RLSRRS
3884#undef λ_inline
3885#undef λ_force_inline
3886
3887#undef MAGIC
3888
3889#undef nothing
3890
3891#undef elseif
3892#undef _big_than_
3893#undef _small_than_
3894
3895#if defined(_MSC_VER)
3896 #undef not
3897 #undef and
3898 #undef or
3899#endif
3900
3901#undef INTER_NAMESPACE
3902#undef BREAK_NAMESPACE
3903
3904#undef szie
3905#undef form
3906
3907#undef template_name
3908#undef type_name
3909
3910#undef not_in_debug
3911
3912#undef es
3913#undef ec
3914
3915#undef ELC_TEST_EVENTNAME
3916
3917#undef override_instance_struct
3918
3919#undef distinctive
3920
3921#undef force_inline
3922
3923#undef with_no_vtable
3924
3925#undef in_consteval
3926
3927#undef no_vtable_struct
3928#undef no_vtable_class
3929
3930//#undef get_elc_defs
3931
3932//file_end
3933
3934#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_undefs.hpp"
3935
3936#undef HAS_GCC_BUILTINS
3937#undef HAS_MSVC_INTRINSICS
3938#undef HAS_X86_ASM
3939#undef HAS_X86_64_ASM
3940#undef HAS_ARM_ASM
3941#undef HAS_ARM64_ASM
3942
3943//file_end
3944
3945 #line 94 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/pre_math.hpp"
3946}
3947
3948//file_end
3949
3950#line 79 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
3951namespace elc::defs{ //在elc::defs中定义内容
3952 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
3953//_defs.hpp
3954/*
3955未完成的elc解释器basic文件
3956由steve02081504与Alex0125设计、编写
3957转载时请在不对此文件做任何修改的同时注明出处
3958项目地址:https://github.com/ELC-lang/ELC
3959*/
3960/*
3961 ,??????????????????????????
3962 ????????????????????????????
3963 ?????????????????????????????+
3964 ?????+++++++++++++++++++++++++
3965 ?????+++++++++++++++++++++++++
3966 ??????++++++++++++++++++++++++
3967 ?????++
3968 ?????+++
3969 ??????+++IIIIIIIIIIIIIIIIII
3970 ?????+++++IIIIIIIIIIIIIIIIII
3971 ?????++++++++++++++++++++++++
3972 ??????+++++++++++++++++++++++:
3973 ?????++
3974 ?????+++
3975 ??????++
3976 ??????????????????????????????II
3977 ??????????????????????????????IIII
3978 ,?????????????????????????????IIIII+
3979 =???++++++++++++++++++++++++++III?
3980 ?++++++++++++++++++++++++++++I+
3981*/
3982#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
3983//_defs.hpp
3984/*
3985未完成的elc解释器_share文件
3986由steve02081504与Alex0125设计、编写
3987转载时请在不对此文件做任何修改的同时注明出处
3988项目地址:https://github.com/ELC-lang/ELC
3989*/
3990/*
3991 ,??????????????????????????
3992 ????????????????????????????
3993 ?????????????????????????????+
3994 ?????+++++++++++++++++++++++++
3995 ?????+++++++++++++++++++++++++
3996 ??????++++++++++++++++++++++++
3997 ?????++
3998 ?????+++
3999 ??????+++IIIIIIIIIIIIIIIIII
4000 ?????+++++IIIIIIIIIIIIIIIIII
4001 ?????++++++++++++++++++++++++
4002 ??????+++++++++++++++++++++++:
4003 ?????++
4004 ?????+++
4005 ??????++
4006 ??????????????????????????????II
4007 ??????????????????????????????IIII
4008 ,?????????????????????????????IIIII+
4009 =???++++++++++++++++++++++++++III?
4010 ?++++++++++++++++++++++++++++I+
4011*/
4012
4013//undefs at "_undefs.hpp"
4014
4015#if defined(ELC_CODE_REALM)
4016 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
4017#endif
4018
4019//set ELC_WARNING_LEVEL default to 4(max)
4020#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
4021
4022#if defined(_MSC_VER)
4023 #pragma warning(push,ELC_WARNING_LEVEL)
4024 #pragma warning(disable:4099)//class与struct混用警告diss
4025 #pragma warning(disable:4584)//重复子类警告diss
4026 #pragma warning(disable:4250)//域控制继承警告diss
4027 #pragma warning(disable:26432)//不完全默认方法警告diss
4028 #pragma warning(disable:26435)//virtual override方法警告diss
4029 #pragma warning(disable:26481)//容器安利diss
4030 #pragma warning(disable:26446)//gsl::at安利diss
4031 #pragma warning(disable:26434)//方法覆盖警告diss
4032 #pragma warning(disable:26429)//gsl::not_null安利diss
4033 #pragma warning(disable:26471)//对void*进行static_cast安利diss
4034 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
4035 #pragma warning(disable:26473)//相同指针显式cast警告diss
4036 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
4037 #pragma warning(disable:26485)//数组作指针警告diss
4038 #pragma warning(disable:26490)//reinterpret_cast警告diss
4039 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
4040 #pragma warning(disable:26482)//非常数数组索引警告diss
4041 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
4042#endif
4043#if defined(__GNUC__)
4044 #pragma GCC diagnostic push
4045 #pragma GCC diagnostic warning "-Wall"//开启所有警告
4046 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
4047#endif
4048#if defined(_MSC_VER)
4049 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
4050 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
4051 #define push_msvc_warning() __pragma(warning(push))
4052 #define pop_msvc_warning() __pragma(warning(pop))
4053 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
4054#else
4055 //#define suppress_msvc_warning(...)
4056 #define disable_msvc_warning(...)
4057 #define push_msvc_warning()
4058 #define pop_msvc_warning()
4059 #define push_and_disable_msvc_warning(...)
4060#endif
4061#if defined(_MSC_VER)
4062 //push pack settings
4063 #pragma pack(push)
4064 #pragma pack()
4065#endif
4066#if defined(_MSC_VER)
4067 //push and undef common macros
4068 #pragma push_macro("new")
4069 #undef new
4070 #pragma push_macro("delete")
4071 #undef delete
4072 #pragma push_macro("min")
4073 #undef min
4074 #pragma push_macro("max")
4075 #undef max
4076 #pragma push_macro("abs")
4077 #undef abs
4078 #pragma push_macro("export")
4079 #undef export
4080 #pragma push_macro("rand")
4081 #undef rand
4082 #pragma push_macro("sqrt")
4083 #undef sqrt
4084 #pragma push_macro("type_info")
4085 #undef type_info
4086 #pragma push_macro("elc")
4087 #undef elc
4088#endif
4089//
4090#if defined(ELC_VOID_NAME)
4091 #undef void
4092#endif
4093//
4094#if defined(ELC_PUBLIC_ALL)
4095 #define protected public
4096 #define private public
4097#endif
4098//
4099#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
4100 #undef rand
4101#endif
4102
4103// #define often_noexcept
4104#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
4105#define noexcept_as_auto MAGIC//哦现在有了
4106#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
4107#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
4108
4109#define using_method_from_base_t(name,...) \
4110template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
4111auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
4112{\
4113 return base_t::name(forward<Args>(rest)...);\
4114}\
4115
4116#define using_method_from_value(name,value_name,...) \
4117template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
4118auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
4119{\
4120 return value_name.name(forward<Args>(rest)...);\
4121}\
4122
4123#define floop while(__builtin_is_my_dick_still_there())
4124#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
4125#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
4126#if defined(_MSC_VER) && _MSC_VER>=1935
4127 //@see https://developercommunity.visualstudio.com/t/10193638
4128 #define enable_adl(name) template<typename=void>void name()noexcept=delete
4129#else
4130 #define enable_adl(name) void name()noexcept=delete
4131#endif
4132
4133#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
4134#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
4135
4136#define declvalue(...) (::std::declval<__VA_ARGS__>())
4137
4139#define template_error(reason) static_assert(template_error_helper<T>,reason)
4141#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
4143#define template_warning(reason) template_warning_helper<T>(reason)
4144
4145//for type_info
4146#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
4147#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
4148
4149#define is_common_attribute(name) public attribute<T,name<T>>
4150#define is_special_attribute(name) public attribute<T,name>
4151
4152#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
4153#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
4154
4155//for float_size_t
4156#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
4157//bitnum_of
4158#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
4159
4160//for attribute
4161#define def_common_attribute_with_nothing(name) \
4162template<typename T>\
4163class name{}\
4164
4165#define def_special_attribute_with_nothing(name) \
4166class name{}\
4167
4168#define common_attribute_t template<class>class
4169#define special_attribute_t class
4170
4179#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
4181#define enabled_by_default class enable_state=void
4183#define disabled_by_default class enable_state= ::std::enable_if_t<false>
4185#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
4187#define enable_flag class enable_state
4188
4189#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
4190#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
4191#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
4192#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
4193#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
4194
4196#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
4198#define get_recursive_λ_caller(name,...) \
4199exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
4200 return name(name,Args...);\
4201}
4203#define λ []
4205#define exλ [&]
4207#define λ_with_catch(...) [__VA_ARGS__]
4209#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
4210//recursive_λ_self_referential_reserved_symbolname
4211#define λ_RLSRRS _my_jb_super_sb_name_
4212
4213#if defined(_MSC_VER) && !defined(__clang__)
4214 #define λ_inline [[msvc::forceinline]]
4215 #define λ_force_inline [[msvc::forceinline]]
4216#elif
4217 #define λ_inline [[gnu::always_inline]]
4218 #define λ_force_inline [[gnu::always_inline]]
4219#else
4220 #define λ_inline
4221 #define λ_force_inline
4222#endif
4223
4224#define MAGIC//ahh,ko no tenno da!
4225
4227#define nothing
4228
4230#define elseif else if
4232#define _big_than_ >
4234#define _small_than_ <
4235
4236#if defined(_MSC_VER)
4237 #define not !
4238 #define and &&
4239 #define or ||
4240#endif
4241
4243#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
4245#define BREAK_NAMESPACE }
4246
4248#define template_name template
4250#define type_name class
4251
4252#if defined(DEBUG) || defined(_DEBUG)
4253 #define not_in_debug 0
4254 #define in_debug 1
4255#else
4256 #define not_in_debug 1
4257 #define in_debug 0
4258#endif
4259
4260#define es U""
4261#define ec(ch) U ## ch
4262
4263#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
4264 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
4265#else
4266 #define ELC_TEST_EVENTNAME(name)
4267#endif
4268
4269#define override_instance_struct \
4270protected:\
4271 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
4272 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
4273 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
4274 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
4275 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
4276
4277#if defined(_MSC_VER) && !defined(__clang__)
4278 #define distinctive __declspec(dllexport)
4279#else
4280 #define distinctive
4281#endif
4282
4283#if defined(_MSC_VER) && !defined(__clang__)
4284 #define force_inline __forceinline
4285#elif defined(__GNUC__) || defined(__clang__)
4286 #define force_inline __attribute__((always_inline)) inline
4287#else
4288 #define force_inline inline
4289#endif
4290
4291#if defined(_MSC_VER) && !defined(__clang__)
4292 #define with_no_vtable __declspec(novtable)
4293#else
4294 #define with_no_vtable
4295#endif
4296
4297#define in_consteval (::std::is_constant_evaluated())
4298
4299#define no_vtable_struct struct with_no_vtable
4300#define no_vtable_class class with_no_vtable
4301
4302//#define get_elc_defs using namespace ::elc::defs
4303
4304//file_end
4305
4306#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
4307
4308//file_end
4309
4310 #line 81 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
4311
4312 namespace base{
4313 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/math.hpp"
4314//math.hpp
4315//at namespace elc::defs::base
4316/*
4317未完成的elc解释器base_defs文件
4318由steve02081504与Alex0125设计、编写
4319转载时请在不对此文件做任何修改的同时注明出处
4320项目地址:https://github.com/ELC-lang/ELC
4321*/
4322/*
4323 ,??????????????????????????
4324 ????????????????????????????
4325 ?????????????????????????????+
4326 ?????+++++++++++++++++++++++++
4327 ?????+++++++++++++++++++++++++
4328 ??????++++++++++++++++++++++++
4329 ?????++
4330 ?????+++
4331 ??????+++IIIIIIIIIIIIIIIIII
4332 ?????+++++IIIIIIIIIIIIIIIIII
4333 ?????++++++++++++++++++++++++
4334 ??????+++++++++++++++++++++++:
4335 ?????++
4336 ?????+++
4337 ??????++
4338 ??????????????????????????????II
4339 ??????????????????????????????IIII
4340 ,?????????????????????????????IIIII+
4341 =???++++++++++++++++++++++++++III?
4342 ?++++++++++++++++++++++++++++I+
4343*/
4344namespace math{
4345 using ::std::move;
4346
4347 //isNaN
4348 template<arithmetic_type T>
4349 [[nodiscard]]force_inline constexpr bool isNaN(const T&v)noexcept{
4350 if constexpr(has_NaN<T>)
4351 return v!=v;
4352 else
4353 return false;
4354 }
4355 //isInf
4356 template<basic_type T>
4357 [[nodiscard]]force_inline constexpr bool isInf(const T&v)noexcept{
4358 if constexpr(has_inf<T>)
4360 else
4361 return false;
4362 }
4363 template<arithmetic_type T> requires(!has_inf<T>)
4364 [[nodiscard]]force_inline constexpr bool isInf(const T&)noexcept{
4365 return false;
4366 }
4368 template<arithmetic_type T>
4369 [[nodiscard]]force_inline constexpr bool is_negative(const T&x)noexcept{
4370 if constexpr(is_signed<T>){
4371 if constexpr(has_NaN<T>)
4372 if(isNaN(x))
4373 return false;
4374 return x<T{};
4375 }
4376 else
4377 return false;
4378 }
4380 template<typename T=void,typename Arg_t=void>
4381 [[nodiscard]]force_inline constexpr auto copy_as_negative(Arg_t x,bool negative=1)noexcept{
4382 if constexpr(is_unsigned<T>)
4383 template_error("copy_as_negative:unsigned type");
4384 elseif constexpr(type_info<T> == type_info<void>)
4385 return copy_as_negative<to_signed_t<Arg_t>>(x,negative);
4386 elseif constexpr(is_basic_type<Arg_t>) {
4387 if constexpr(is_float_type<Arg_t>)
4388 return(T)::std::copysign(x,negative?-1:1);
4389 else
4390 return(T)negative?T{}-x:x;
4391 }
4392 else
4393 return(T)negative?T{}-x:x;
4394 }
4395 //copy_as_not_negative? 那不就是abs吗
4397 template<arithmetic_type T>
4398 [[nodiscard]]force_inline constexpr auto reverse_sign(const T&x)noexcept{
4399 return copy_as_negative(x,!is_negative(x));
4400 }
4402 template<arithmetic_type T>
4403 [[nodiscard]]force_inline constexpr auto reverse_sign_if(bool x,const T&y)noexcept{
4404 return x?reverse_sign(y):y;
4405 }
4407 template<basic_float_type T>
4408 [[nodiscard]]force_inline constexpr auto reciprocal(const T&x)noexcept{
4409 return T{1}/x;
4410 }
4412 template<arithmetic_type T,arithmetic_type U>
4413 [[nodiscard]]force_inline constexpr T safe_arithmetic_cast(U x)noexcept{
4414 if constexpr(basic_float_type<U> && unsigned_type<T>)
4415 if(is_negative(x))
4416 return (T)(intmax_t)x;
4417 else{
4418 push_and_disable_msvc_warning(26467);//x已非负
4419 return (T)(uintmax_t)x;
4421 }
4422 else
4423 return (T)x;
4424 }
4426 template<arithmetic_type T>
4427 [[nodiscard]]force_inline constexpr size_t to_size_t(T x)noexcept{
4428 return safe_arithmetic_cast<size_t>(x);
4429 }
4431 template<arithmetic_type T>
4432 [[nodiscard]]force_inline constexpr uintmax_t to_uintmax_t(T x)noexcept{
4433 return safe_arithmetic_cast<uintmax_t>(x);
4434 }
4436 template<arithmetic_type T1,arithmetic_type T2>
4437 [[nodiscard]]force_inline constexpr auto mod(const T1&a,const T2&b){
4438 if constexpr(basic_float_type<T1>||basic_float_type<T2>)
4439 return ::std::fmod(a,b);
4440 else
4441 return a%b;
4442 }
4443 //is_odd
4444 template<arithmetic_type T>
4445 [[nodiscard]]force_inline constexpr bool is_odd(const T&x)noexcept{
4446 if constexpr(is_integer_type<T>)
4447 return x&1;
4448 else
4449 return mod(x,T(2));
4450 }
4451 //is_even
4452 template<arithmetic_type T>
4453 [[nodiscard]]force_inline constexpr bool is_even(const T&x)noexcept{
4454 return !is_odd(x);
4455 }
4456 //divmod
4457 template<arithmetic_type T1,arithmetic_type T2> requires(!is_big_type<T1>&&!is_big_type<T2>)
4458 [[nodiscard]]force_inline constexpr auto divmod(const T1&a,const T2&b){
4459 typedef decltype(a/b) quot_t;
4460 typedef decltype(a%b) mod_t;
4461 struct divmod_result{
4462 quot_t quot;
4463 mod_t mod;
4464 };
4465 if constexpr(basic_float_type<T1>||basic_float_type<T2>)
4466 return divmod_result{::std::floor(a/b),::std::fmod(a,b)};
4467 else
4468 return divmod_result{a/b,a%b};
4469 }
4470 //ceil_div
4471 template<arithmetic_type T,arithmetic_type U>
4472 [[nodiscard]]force_inline constexpr auto ceil_div(const T&a,const U&b)noexcept{
4473 const auto[quot,mod]=divmod(a,b);
4474 return quot+(mod?1u:0u);
4475 }
4476
4478 template<typename T>
4479 force_inline constexpr void set_rounding(int mode){
4480 if constexpr(basic_float_type<T>)
4481 ::std::fesetround(mode);
4482 }
4484 template<typename T>
4485 [[nodiscard]]force_inline constexpr int get_rounding(){
4486 if constexpr(basic_float_type<T>)
4487 return ::std::fegetround();
4488 else
4489 return 0;
4490 }
4492 template<typename T>
4495 rounding_auto_setter(int new_rounding){
4496 old_rounding=get_rounding<T>();
4497 set_rounding<T>(new_rounding);
4498 }
4500 set_rounding<T>(old_rounding);
4501 }
4502 };
4503
4504 //abs
4505 template<arithmetic_type T>
4506 [[nodiscard]]force_inline constexpr auto abs(const T&v)noexcept{
4507 if constexpr(is_signed<T>){
4508 //符号转无符号而不是num=-num避免INT_MAX这种情况下的溢出
4509 typedef to_unsigned_t<T> UT;
4510 return is_negative(v)?UT(-v):UT(v);
4511 }
4512 else
4513 return v;
4514 }
4515 //is_close
4516 template<arithmetic_type T>
4517 [[nodiscard]]force_inline constexpr bool is_close(const T&a,const T&b)noexcept{
4518 if constexpr(basic_float_type<T>)
4520 else
4521 return a==b;
4522 }
4523 //sub
4524 template<arithmetic_type T1,arithmetic_type T2>
4525 [[nodiscard]]force_inline constexpr auto sub(const T1&a,const T2&b)noexcept{
4526 if constexpr(is_basic_type<T1>&&is_basic_type<T2>){
4527 if constexpr(is_float_type<T1>||is_float_type<T2>)
4528 return a-b;
4529 else{
4530 using signedT = ::std::make_signed_t<::std::common_type_t<T1,T2,signed char>>;
4531 return static_cast<signedT>(a)-static_cast<signedT>(b);
4532 }
4533 }
4534 else
4535 return a-b;
4536 }
4537 //exp
4538 //不使用std版本而是自己写的原因:std版本不是constexpr,标准会傻逼
4539 template<float_type T>
4540 [[nodiscard]]force_inline constexpr T exp(const T&v)noexcept{
4541 if(in_consteval||!is_basic_type<T>){
4542 typedef decltype(λ{
4543 if constexpr(is_basic_type<T>)
4544 return ::std::exp(T{});
4545 else
4546 return T{};
4547 }()) RT;
4548 auto exp_impl = recursive_λ(RT x,RT sum,RT n,size_t i,RT t)noexcept -> RT{
4549 const auto ε=sum+t/n;
4550 if(is_close(sum,ε))
4551 return sum;
4552 else
4553 return self_recursion(x,ε,n*i,i+1,t*x);
4554 };
4555 auto exp_impl_caller = get_recursive_λ_caller(exp_impl);
4556 return exp_impl_caller(RT{v},RT{1u},RT{1u},2,RT{v});
4557 }
4558 elseif constexpr(is_basic_type<T>)
4559 return ::std::exp(v);
4560 }
4561 //log
4562 //不使用std版本而是自己写的原因:std版本不是constexpr,标准会傻逼
4563 template<arithmetic_type T>
4564 [[nodiscard]]force_inline constexpr auto log(const T&a)noexcept{
4565 if(in_consteval||!is_basic_type<T>){
4566 typedef decltype(λ()noexcept{
4567 if constexpr(is_basic_type<T>)
4568 return ::std::log(T{});
4569 else
4570 return T{};
4571 }()) RT;
4572 auto log_impl = recursive_λ(const RT x,const RT y)noexcept -> RT{
4573 auto log_iter = λ(RT x,RT y)noexcept{
4574 const auto exp_y = exp(y);
4575 return y + T{2u}*(x-exp_y)/(x+exp_y);
4576 };
4577 return RT(is_close(y,log_iter(x,y)) ? y : self_recursion(x,log_iter(x,y)));
4578 };
4579 auto log_impl_caller = get_recursive_λ_caller(log_impl);
4580 return log_impl_caller((RT)a,RT{0u});
4581 }
4582 elseif constexpr(is_basic_type<T>)
4583 return ::std::log(a);
4584 }
4585 template<arithmetic_type T,arithmetic_type U>
4586 [[nodiscard]]force_inline constexpr auto log(const T&a,const U&b)noexcept{
4587 return log(a)/log(b);
4588 }
4589 //integer_log
4590 template<unsigned_integer_type T>
4591 [[nodiscard]]force_inline constexpr size_t integer_log(const T& a,const auto& b)noexcept{
4592 auto integer_log_impl = recursive_λ(const T& a,T& tester,const T this_lv,const size_t num)noexcept -> size_t{
4593 size_t aret=0;
4594 {
4595 const auto next_lv=this_lv*this_lv;
4596 if(next_lv<a)
4597 aret=self_recursion(a,tester,next_lv,num*2);
4598 }
4599 floop
4600 if(auto tmp=tester*this_lv;tmp>a)return aret;
4601 else{
4602 tester=move(tmp);
4603 aret+=num;
4604 }
4605 };
4606 auto integer_log_impl_caller = get_recursive_λ_caller(integer_log_impl,noexcept);
4607 T tester=1u;
4608 return integer_log_impl_caller(a,tester,move(b),1u);
4609 }
4610
4611 //pow
4612 //不使用std版本而是自己写的原因:std版本不是constexpr,标准会傻逼
4613 template<arithmetic_type T,arithmetic_type U=unsigned> requires(!is_big_type<T>)
4614 [[nodiscard]]force_inline constexpr auto pow(const T&a,const U&b=2)noexcept{
4615 if(in_consteval||!is_basic_type<T>){
4616 typedef decltype(::std::pow(a,b)) RT;
4617 return RT(exp(b*log(a)));
4618 }
4619 elseif constexpr(is_basic_type<T>)
4620 return ::std::pow(a,b);
4621 }
4622 template<big_type T,unsigned_integer_type U=unsigned>
4623 [[nodiscard]]force_inline constexpr auto pow(T a,U b=2)noexcept{
4624 if constexpr(is_signed<T>){
4625 const bool isneg=is_negative(a) && is_odd(b);
4626 const auto abs_ret=pow(abs(a),b);
4627 return copy_as_negative(abs_ret,isneg);
4628 }
4629 else{
4630 T aret=1u;
4631 while(b){
4632 if(is_odd(b))aret*=a;
4633 a*=a;
4634 b>>=1u;
4635 }
4636 return aret;
4637 }
4638 }
4639 //trunc
4640 //不使用std版本而是自己写的原因:std版本不是constexpr,标准会傻逼
4641 template<float_type T> requires is_basic_type<T>
4642 [[nodiscard]]force_inline constexpr auto trunc(const T&v)noexcept{
4643 if in_consteval{
4644 typedef decltype(::std::trunc(v)) RT;
4645 return static_cast<RT>((intmax_t)v);
4646 }
4647 else
4648 return ::std::trunc(v);
4649 }
4650 //ceil
4651 //不使用std版本而是自己写的原因:std版本不是constexpr,标准会傻逼
4652 template<float_type T> requires is_basic_type<T>
4653 [[nodiscard]]force_inline constexpr auto ceil(const T&v)noexcept{
4654 if in_consteval{
4655 auto ceil_impl = λ(T x, T y)noexcept{
4656 return is_close(x,y) ? y : y+T{1};
4657 };
4658 return v<0 ? -static_cast<T>(to_uintmax_t(-v)) : ceil_impl(v,static_cast<T>(to_uintmax_t(v)));
4659 }
4660 else
4661 return ::std::ceil(v);
4662 }
4663 //floor
4664 //不使用std版本而是自己写的原因:std版本不是constexpr,标准会傻逼
4665 template<float_type T> requires is_basic_type<T>
4666 [[nodiscard]]force_inline constexpr auto floor(const T&v)noexcept{
4667 if in_consteval{
4668 auto floor_impl = λ(T x, T y)noexcept{
4669 return is_close(x,y) ? y : y-T{1};
4670 };
4671 return v<0 ? -static_cast<T>(to_uintmax_t(-v+T{1})) : floor_impl(v,static_cast<T>(to_uintmax_t(v)));
4672 }
4673 else
4674 return ::std::floor(v);
4675 }
4676 //invsqrt
4677 template<float_type T> requires(has_ε<T>)
4678 [[nodiscard]]force_inline constexpr T invsqrt(const T&v)noexcept;
4679 template<float_type T,arithmetic_type U=T>
4680 inline constexpr T invsqrt_iteration(const T&num,const U&v)noexcept{
4681 //newton-raphson
4682 return num*(3u-v*num*num)/2u;
4683 }
4684 template<float_type T,arithmetic_type U=T>
4685 inline constexpr T invsqrt_to_new_ε(T num,const U&v,const to_unsigned_t<T>&ε,to_unsigned_t<T>&ε_saver)noexcept{
4686 while(ε_saver>ε){
4687 auto next_ret=invsqrt_iteration(num,v);
4688 ε_saver=abs(next_ret-num);
4689 num=move(next_ret);
4690 }
4691 return num;
4692 }
4693 template<float_type T>
4694 [[nodiscard]]inline constexpr T quick_invsqrt(const T&v)noexcept{
4695 if constexpr(BIT_POSSIBILITY==2)// evil floating point bit level hacking
4696 if(!in_consteval)//编译期计算不能使用union_cast,让编译器慢慢算去吧
4697 if constexpr(is_big_type<T>)
4698 return quick_invsqrt(static_cast<long double>(v));
4699 else{
4700 using namespace basic_environment::float_infos;
4701 return union_cast<T>((quick_invsqrt_magic_number<T> - union_cast<const data_type<T>>(v))>>1);
4702 }
4703 return 2u/v;
4704 }
4705 template<float_type T>
4706 [[nodiscard]]inline constexpr T invsqrt(const T&v,const to_unsigned_t<T>&ε,to_unsigned_t<T>&ε_saver)noexcept{
4707 if constexpr(has_NaN<T> && has_inf<T>)
4708 if(v < 0u || v >= arithmetic_type_info_prover<T>::Inf())
4710 return invsqrt_to_new_ε(quick_invsqrt(v),v,ε,ε_saver);
4711 }
4712 template<float_type T>
4713 [[nodiscard]]inline constexpr T invsqrt(const T&v,const to_unsigned_t<T>&ε)noexcept{
4714 if constexpr(has_NaN<T> && has_inf<T>)
4715 if(v < 0u || v >= arithmetic_type_info_prover<T>::Inf())
4717 return invsqrt_to_new_ε(quick_invsqrt(v),v,ε);
4718 }
4719 //invsqrt with one parameter
4720 template<float_type T> requires(has_ε<T>)
4721 [[nodiscard]]force_inline constexpr T invsqrt(const T&v)noexcept{
4723 }
4724 template<integer_type T>
4725 [[nodiscard]]force_inline constexpr auto invsqrt(const T&v)noexcept{
4726 return invsqrt(static_cast<float_type_of<T>>(v));
4727 }
4728 //sqrt
4729 template<float_type T> requires(has_ε<T>)
4730 [[nodiscard]]force_inline constexpr T sqrt(const T&v)noexcept;
4731 template<float_type T,arithmetic_type U=T>
4732 inline constexpr T sqrt_iteration(const T&num,const U&v)noexcept{
4733 //newton-raphson
4734 return (num+v/num)/2u;
4735 }
4736 template<float_type T,arithmetic_type U=T>
4737 inline constexpr T sqrt_to_new_ε(T num,const U&v,const to_unsigned_t<T>&ε,to_unsigned_t<T>&ε_saver)noexcept{
4738 while(ε_saver>ε){
4739 auto next_ret=sqrt_iteration(num,v);
4740 ε_saver=abs(next_ret-num);
4741 num=move(next_ret);
4742 }
4743 return num;
4744 }
4745 template<float_type T,arithmetic_type U=T>
4746 inline constexpr T sqrt_to_new_ε(T num,const U&v,const to_unsigned_t<T>&ε)noexcept{
4747 auto ε_saver=to_unsigned_t<T>{ε*BIT_POSSIBILITY};
4748 return sqrt_to_new_ε(num,v,ε,ε_saver);
4749 }
4750 template<float_type T>
4751 [[nodiscard]]inline constexpr T quick_sqrt(const T&v)noexcept{
4752 if constexpr(BIT_POSSIBILITY==2)// evil floating point bit level hacking
4753 if(!in_consteval)//编译期计算不能使用union_cast,让编译器慢慢算去吧
4754 if constexpr(is_big_type<T>)
4755 return quick_sqrt(static_cast<long double>(v));
4756 else{
4757 using namespace basic_environment::float_infos;
4758 return union_cast<T>((union_cast<const data_type<T>>(v)>>1) + (data_type<T>(exponent_diff<T>) << (precision_base_bit<T> - 1)));
4759 }
4760 return v/2u;
4761 //return reciprocal(quick_invsqrt(v));
4762 }
4763 template<float_type T>
4764 [[nodiscard]]inline constexpr T sqrt(const T&v,const to_unsigned_t<T>&ε,to_unsigned_t<T>&ε_saver)noexcept{
4765 if constexpr(has_NaN<T> && has_inf<T>)
4766 if(v < 0u || v >= arithmetic_type_info_prover<T>::Inf())
4768 return sqrt_to_new_ε(quick_sqrt(v),v,ε,ε_saver);
4769 }
4770 template<float_type T>
4771 [[nodiscard]]inline constexpr T sqrt(const T&v,const to_unsigned_t<T>&ε)noexcept{
4772 if constexpr(has_NaN<T> && has_inf<T>)
4773 if(v < 0u || v >= arithmetic_type_info_prover<T>::Inf())
4775 return sqrt_to_new_ε(quick_sqrt(v),v,ε);
4776 }
4777 //sqrt with one parameter
4778 template<float_type T> requires(has_ε<T>)
4779 [[nodiscard]]force_inline constexpr T sqrt(const T&v)noexcept{
4781 }
4782 template<integer_type T>
4783 [[nodiscard]]force_inline constexpr auto sqrt(const T&v)noexcept{
4784 return sqrt(static_cast<float_type_of<T>>(v));
4785 }
4787 template<arithmetic_type T>
4788 [[nodiscard]]inline constexpr bool is_prime_num_no_pre_check(T a)noexcept{
4789 /*
4790 应某人的要求补注释(都是主人的任务罢了.).
4791 建议先看有预先检查的部分以便理解思路.
4792 */
4793 T b=safe_arithmetic_cast<T>(sqrt(a));//若一个数可以分解为两因数之积,其中一个因数必定≤其开方:反指数式减少遍历范围.
4794 /*
4795 接下来:
4796 设要判定的数n(6x±1的缩写).
4797 测试数可以看为6i-1 6i 6i+1 6i+2 6i+3 6i+4的其中之一,同样以6为周期.
4798 对于测试数的整个周期,其中:
4799 如果n能被6i 6i+2 6i+4整除:则n要是偶数,但±1,排除.
4800 如果n能被6i+3整除:则n要是3倍数,但±1,排除.
4801 综上,循环中只要考虑6i±1的情况.
4802 所以以5起始,前进6(自然选择号,前进4!),逐次判断0与+2.
4803 虽然很想写成以6为起始逐次判断±1的对称格式但是这样会加重时空负担.(不甘心.....)
4804 */
4805 for(T c=5u;c<=b;c+=6u)//遍历判断是否能被因数分解——不会有人看不懂吧?
4806 if((!mod(a,c))||(!mod(a,(c+2u))))
4807 return false;
4808 /*
4809 最后,为什么是6?
4810 就结论来说,此数值选择最常出现的两因数(除0或1外.)之积可以最大程度减少时间占用.
4811 所以虽然更喜欢7/8/9之类的数不过使用6收益最大.
4812 要不是这样早就写成7了.
4813 */
4814 return true;
4815 }
4817 template<arithmetic_type T>
4818 [[nodiscard]]inline constexpr bool is_prime_num(T a)noexcept{
4819 if constexpr(is_float_type<T>)
4820 if(a != ceil(a))
4821 return false;
4822 auto b=abs(a);
4823
4824 if(b<4)
4825 return true;//1和0也是prime,我不管.
4826 /*
4827 当x≥1,那么≥5的自然数如下:
4828 6x-1 6x 6x+1 6x+2 6x+3 6x+4
4829 6(x+1)-1 6(x+1) 6(x+1)+1 ... //这已经是下一周期了.
4830
4831 考虑单个周期:
4832 6x+2 6x+3 6x+4 是 2(3x+1) 3(2x+1) 2(3x+2),排除.
4833 6x,排除.
4834 那么,只用考虑6x±1是否是prime.
4835 */
4836 if(mod(mod(b,6)-1u,4u))
4837 return false;
4838 /*
4839 因为no_pre_check判定没有考虑到≤5的数,所以本函数第一个if进行判定补全.
4840 */
4841 return is_prime_num_no_pre_check(b);
4842 }
4844 template<arithmetic_type T>
4845 [[nodiscard]]inline constexpr T get_prime_num_less_or_eq_than(T a)noexcept;
4847 template<arithmetic_type T>
4848 [[nodiscard]]inline constexpr T get_prime_num_big_or_eq_than(T a)noexcept{
4849 if constexpr(is_float_type<T>)
4850 a=ceil(a);
4851 if constexpr(is_signed<T>)
4852 if(is_negative(a)){
4853 auto tmp = get_prime_num_less_or_eq_than(abs(a));
4854 return copy_as_negative(tmp);
4855 }
4856 if(a<4u)return a;
4857 //将a转换为6x-1的形式.
4858 {
4859 T b=mod(a,6u);
4860 if(b==1u && is_prime_num_no_pre_check(a))return a;
4861 a+=b?5u-b:1u;
4862 }
4863 //循环判断.
4864 for(;;a+=6u)
4865 if(is_prime_num_no_pre_check(a))return a;
4866 elseif(is_prime_num_no_pre_check(a+2u))return a+2u;
4867 }
4869 template<arithmetic_type T>
4870 [[nodiscard]]inline constexpr T get_prime_num_less_or_eq_than(T a)noexcept{
4871 if constexpr(is_float_type<T>)
4872 a=floor(a);
4873 if constexpr(is_signed<T>)
4874 if(is_negative(a)){
4875 auto tmp = get_prime_num_big_or_eq_than(abs(a));
4876 return copy_as_negative(tmp);
4877 }
4878 if(a<4u)return a;
4879 //将a转换为6x-1的形式.
4880 {
4881 T b=mod(a,6u);
4882 if(b==1u && is_prime_num_no_pre_check(a))return a;
4883 a-=b?b-1u:5u;
4884 }
4885 //循环判断.
4886 for(;;a-=6u)
4887 if(is_prime_num_no_pre_check(a))return a;
4888 elseif(is_prime_num_no_pre_check(a-2u))return a-2u;
4889 }
4891 template<arithmetic_type T>
4892 [[nodiscard]]inline constexpr auto get_prime_num_big_than(T a)noexcept{
4893 return get_prime_num_big_or_eq_than(a+1u);
4894 }
4895 push_and_disable_msvc_warning(26467);//φ永远为正数
4897 template<unsigned_integer_type size_T>
4898 [[nodiscard]]inline constexpr size_T get_next_gold_size_to_resize_for_array(size_T size)noexcept{
4899 /*
4900 每次扩容后的空间与原空间比大致为φ可以最小化时空负担.
4901 */
4902 return size_T(size*magic_number::φ);
4903 }
4905 template<unsigned_integer_type size_T>
4906 [[nodiscard]]inline constexpr size_T get_next_gold_size_to_resize_for_hash(size_T size)noexcept{
4907 /*
4908 素数大小的桶数可以使hash table中的每个桶尽可能活跃.
4909 每次扩容后的空间与原空间比大致为φ可以最小化时空负担.
4910 */
4911 return size_T(get_prime_num_big_or_eq_than(size*magic_number::φ));
4912 }
4914
4916 namespace linear_interpolation{
4917 template<arithmetic_type T1,arithmetic_type T2,arithmetic_type result_T>
4918 [[nodiscard]]inline constexpr auto get_k(T1 y1,T2 y2,result_T δx)noexcept{
4919 auto δy=sub(y2,y1);
4920 auto k=δy/δx;
4921 return k;
4922 }
4923 template<arithmetic_type T1,arithmetic_type T2>
4924 [[nodiscard]]inline constexpr auto get_k(T1 y1,T2 y2)noexcept{
4925 return get_k(y1,y2,1.0);
4926 }
4927 [[nodiscard]]inline constexpr auto get_result(auto y1,auto k,auto δx)noexcept{
4928 auto diff=k*δx;
4929 return y1+diff;
4930 }
4931 [[nodiscard]]inline constexpr auto get_reverse_result(auto k,auto δx,auto y)noexcept{
4932 auto diff=k*δx;
4933 return y-diff;
4934 }
4935 }
4936 //质因数分解
4937 //由于array在之后定义所以泛型容器
4938 //用法 get_prime_factorization(num).to<容器类型>(); 或 get_prime_factorization(num).unique().to<容器类型>();
4940 template<class T>
4942 T _m;
4943 public:
4944 template<class container_t>
4945 static constexpr bool able=was_not_an_ill_form(declvalue(container_t&).push_back(declvalue(T)));
4946
4947 constexpr force_inline result_t(T m)noexcept:_m(m){}
4948
4949 template<class container_t> requires able<container_t>
4950 [[nodiscard]]constexpr container_t to()const noexcept{
4951 container_t aret{};
4952 //思路:获取小于等于m的所有素数,依次除以m,若能整除则将素数加入结果,否则跳过,直到m为1.
4953 T i=T{2u},m=abs(_m);
4954 while(m!=1){
4955 while(!(m%i)){
4956 aret.push_back(i);
4957 m/=i;
4958 }
4960 }
4961 if constexpr(signed_type<T>)
4962 if(is_negative(_m))
4963 aret.push_back(T{-1});
4964 return aret;
4965 }
4966 //operator container_t()
4967 template<class container_t>
4968 [[nodiscard]]constexpr force_inline operator container_t()const noexcept{
4969 return to<container_t>();
4970 }
4972 T _m;
4973 public:
4974 constexpr force_inline unique_t(T m)noexcept:_m(m){}
4975
4976 template<class container_t> requires able<container_t>
4977 [[nodiscard]]constexpr container_t to()const noexcept{
4978 container_t aret{};
4979 //思路:获取小于等于m的所有素数,依次除以m,若能整除则将素数加入结果,否则跳过,直到m为1.
4980 T i=T{2u},m=abs(_m);
4981 while(m!=1){
4982 if(!(m%i)){
4983 aret.push_back(i);
4984 do m/=i;while(!(m%i));
4985 }
4987 }
4988 if constexpr(signed_type<T>)
4989 if(is_negative(_m))
4990 aret.push_back(T{-1});
4991 return aret;
4992 }
4993 //operator container_t()
4994 template<class container_t>
4995 [[nodiscard]]constexpr force_inline operator container_t()const noexcept{
4996 return to<container_t>();
4997 }
4998 };
4999 [[nodiscard]]constexpr force_inline auto unique()const noexcept{
5000 return unique_t{_m};
5001 }
5002 };
5003 template<arithmetic_type T>
5004 [[nodiscard]]constexpr force_inline auto operator()(T m)const noexcept{
5005 return result_t<T>{m};
5006 }
5007 }get_prime_factorization{};
5008 //编译时质因数分解到质因数表
5009 template<unsigned_integer_type number_T,number_T number>
5012 static constexpr size_t table_size=λ{
5013 number_T i=2,m=number;
5014 size_t aret=0;
5015 while(m!=1){
5016 while(!(m%i)){
5017 ++aret;
5018 m/=i;
5019 }
5021 }
5022 return aret;
5023 }();
5024 number_T _table[table_size];
5026 number_T i=2,m=number;
5027 number_T index=0;
5028 while(m!=1){
5029 while(!(m%i)){
5030 _table[index++]=i;
5031 m/=i;
5032 }
5034 }
5035 }
5036 [[nodiscard]]constexpr force_inline number_T operator[](size_t index)const noexcept{
5037 return _table[index];
5038 }
5039 //begin and end for range for
5040 [[nodiscard]]constexpr force_inline number_T* begin()noexcept{
5041 return _table;
5042 }
5043 [[nodiscard]]constexpr force_inline number_T* end()noexcept{
5044 return _table+table_size;
5045 }
5046 [[nodiscard]]constexpr force_inline const number_T* begin()const noexcept{
5047 return _table;
5048 }
5049 [[nodiscard]]constexpr force_inline const number_T* end()const noexcept{
5050 return _table+table_size;
5051 }
5052 //size
5053 [[nodiscard]]constexpr force_inline size_t size()const noexcept{
5054 return table_size;
5055 }
5056 //friend
5057 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5058 [[nodiscard]]friend inline auto size_of_array_like(const this_t&)noexcept{
5059 return table_size;
5060 }
5061 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5062 [[nodiscard]]friend inline auto begin_of_array_like(this_t&table)noexcept{
5063 return table.begin();
5064 }
5065 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5066 [[nodiscard]]friend inline auto end_of_array_like(this_t&table)noexcept{
5067 return table.end();
5068 }
5069 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5070 [[nodiscard]]friend inline auto begin_of_array_like(const this_t&table)noexcept{
5071 return table.begin();
5072 }
5073 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5074 [[nodiscard]]friend inline auto end_of_array_like(const this_t&table)noexcept{
5075 return table.end();
5076 }
5077 };
5078 //编译时的唯一质因数分解到质因数表
5079 template<unsigned_integer_type number_T,number_T number>
5082 static constexpr size_t table_size=λ{
5083 number_T i=2,m=number;
5084 size_t aret=0;
5085 while(m!=1){
5086 if(!(m%i)){
5087 ++aret;
5088 do m/=i;while(!(m%i));
5089 }
5091 }
5092 return aret;
5093 }();
5094 number_T _table[table_size]={};
5096 number_T i=2,m=number;
5097 size_t index=0;
5098 while(m!=1){
5099 if(!(m%i)){
5100 _table[index++]=i;
5101 do m/=i;while(!(m%i));
5102 }
5104 }
5105 }
5106 [[nodiscard]]constexpr force_inline number_T operator[](size_t index)const noexcept{
5107 return _table[index];
5108 }
5109 //begin and end for range for
5110 [[nodiscard]]constexpr force_inline number_T* begin()noexcept{
5111 return _table;
5112 }
5113 [[nodiscard]]constexpr force_inline number_T* end()noexcept{
5114 return _table+table_size;
5115 }
5116 [[nodiscard]]constexpr force_inline const number_T* begin()const noexcept{
5117 return _table;
5118 }
5119 [[nodiscard]]constexpr force_inline const number_T* end()const noexcept{
5120 return _table+table_size;
5121 }
5122 //size
5123 [[nodiscard]]constexpr force_inline size_t size()const noexcept{
5124 return table_size;
5125 }
5126 //friend
5127 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5128 [[nodiscard]]friend inline auto size_of_array_like(const this_t&)noexcept{
5129 return table_size;
5130 }
5131 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5132 [[nodiscard]]friend inline auto begin_of_array_like(this_t&table)noexcept{
5133 return table.begin();
5134 }
5135 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5136 [[nodiscard]]friend inline auto end_of_array_like(this_t&table)noexcept{
5137 return table.end();
5138 }
5139 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5140 [[nodiscard]]friend inline auto begin_of_array_like(const this_t&table)noexcept{
5141 return table.begin();
5142 }
5143 template<class T> requires(type_info<remove_cv<T>> == type_info<number_T>)
5144 [[nodiscard]]friend inline auto end_of_array_like(const this_t&table)noexcept{
5145 return table.end();
5146 }
5147 };
5148 //阶乘快速计算
5149 template<unsigned_integer_type T>
5150 [[nodiscard]]constexpr inline auto factorial(unsigned n,unsigned start=1u)noexcept{
5151 constexpr size_t threshold=1<<4;
5152 if (n < threshold) {
5153 T s = 1u;
5154 unsigned end = start + n;
5155 while(start < end)
5156 s *= start++;
5157 return s;
5158 }
5159 unsigned m = (n+1u)/2;
5160 return factorial<T>(m,start)*factorial<T>(n-m,start+m);
5161 }
5162}
5163using math::is_negative;
5165using math::reverse_sign;
5167using math::to_size_t;
5168using math::mod;
5169using math::is_odd;
5170using math::is_even;
5171using math::divmod;
5172using math::ceil_div;
5173using math::set_rounding;
5174using math::get_rounding;
5176using math::is_close;
5177using math::isNaN;
5178using math::isInf;
5179using math::abs;
5180using math::exp;
5181using math::log;
5182using math::integer_log;
5183using math::pow;
5184using math::ceil;
5185using math::floor;
5189using math::invsqrt;
5192using math::quick_sqrt;
5193using math::sqrt;
5194using math::trunc;
5195using math::is_prime_num;
5203using math::factorial;
5204
5205namespace bit{
5206 template<unsigned_basic_integer_type T>
5207 [[nodiscard]]force_inline constexpr size_t countl_zero(const T v)noexcept;
5208 template<unsigned_basic_integer_type T>
5209 [[nodiscard]]force_inline constexpr size_t countr_zero(const T v)noexcept;
5210 template<unsigned_basic_integer_type T>
5211 [[nodiscard]]force_inline constexpr size_t countl_one(const T v)noexcept;
5212 template<unsigned_basic_integer_type T>
5213 [[nodiscard]]force_inline constexpr size_t countr_one(const T v)noexcept;
5214 template<unsigned_basic_integer_type T>
5215 [[nodiscard]]force_inline constexpr size_t get_bitnum(const T v)noexcept;
5216 template<signed_basic_integer_type T>
5217 [[nodiscard]]force_inline constexpr size_t get_bitnum(const T v)noexcept;
5218}
5219using namespace bit;//干净的符号导出!
5220
5221namespace math{
5222 using ::std::move;
5223
5224 //求出最大公约数
5225 template<integer_type T>
5226 [[nodiscard]]inline auto binary_gcd(T x, T y)noexcept{
5227 static_assert(BIT_POSSIBILITY==2);
5228 size_t shift = 0;
5229 while(y){
5230 //都是偶数时,shift++并位移
5231 const auto x_rzero=countr_zero(x);
5232 const auto y_rzero=countr_zero(y);
5234 //一偶一奇时,只移动偶数 直到都是奇数
5235 x>>=x_rzero;
5236 y>>=y_rzero;
5237 //都是奇数时,大数-=小数
5238 if(x < y)swap(x, y);
5239 x-=y;
5240 }
5241 // 返回 x 左移 shift 位的结果
5242 return move(x) << shift;
5243 }
5244 //求出最大公约数:欧几里得算法
5245 template<integer_type T>
5246 [[nodiscard]]inline auto euclidean_gcd(T x, T y)noexcept{
5247 if constexpr(is_signed<T>)
5248 if(is_negative(x) && is_negative(y))
5249 return euclidean_gcd(abs(x), abs(y));
5250 while(y){
5251 if(x < y)swap(x, y);
5252 x = swap(y, x%y);
5253 }
5254 return x;
5255 }
5256 template<integer_type T>
5257 [[nodiscard]]inline auto base_gcd(T x, T y)noexcept{
5258 if constexpr(BIT_POSSIBILITY==2)
5259 return binary_gcd(move(x), move(y));
5260 else
5261 return euclidean_gcd(move(x), move(y));
5262 }
5263 template<unsigned_big_integer_type T>
5264 [[nodiscard]]inline auto lehmer_gcd(T x, T y)noexcept{
5265 //假设x≥y
5266 if(x < y)swap(x, y);
5267
5268 size_t m=y.size_in_base_type();
5269 if(m <= 1)return base_gcd(move(x), move(y));//如果y只包含一位数(或根本没有),则使用其他方法求出结果
5270 T A, B, C, D;
5271 outer_loop:
5272 while(x && y) {//外循环
5273 --m;//提高精度
5274 T a = x.right_shift_in_base_type(m), b = y.right_shift_in_base_type(m);//取最显著数位
5275 /*初始化矩阵[A B a]为扩展的同一矩阵[1 0 a]
5276 [C D b] [0 1 b]
5277 */
5278 A = D = 1u; B = C = T{};
5279 //对(a+A,b+C)和(a+B,b+D)同时执行欧几里得算法,直到商不同为止
5280 do{//内循环
5281 const auto w = (a+A) / (b+C);//w为欧几里得算法长除法链中当前长除法的商
5282 {
5283 const auto w2 = (a+B) / (b+D);
5284 if(w != w2)break;
5285 }
5286 /*根据扩展欧几里得算法的矩阵表述替换当前矩阵[A B a]到矩阵积[0 1] [A B a] [C D a ]
5287 [C D b] ⋅ =
5288 [1 −w] [C D b] [A−wC B−wD a−wb]
5289 */
5290 A-=w*C;swap(A,C);
5291 B-=w*D;swap(B,D);
5292 a-=w*b;swap(a,b);
5293 }while(B);//B≠0则继续
5294 if(!B){//B=0意味着陷入了死锁;执行欧几里得算法的正常步骤,然后重新开始外循环
5295 x = swap(y, x%y);
5296 goto outer_loop;
5297 }
5298 //将对压缩形式的前数位执行的欧几里得算法步骤应用到x和y上
5299 auto new_x = A*x+B*y, new_y = C*x+D*y;
5300 x = move(new_x),y = move(new_y);
5301 }
5302 return x;
5303 }
5304 template<basic_integer_type T>
5305 [[nodiscard]]force_inline auto lehmer_gcd(T x, T y)noexcept{
5306 return euclidean_gcd(move(x), move(y));
5307 }
5308 template<signed_big_integer_type T>
5309 [[nodiscard]]force_inline auto lehmer_gcd(T x, T y)noexcept{
5310 const bool sign = is_negative(x) && is_negative(y);
5311 return copy_as_negative(gcd(abs(move(x)), abs(move(y))), sign);
5312 }
5313
5314 template<integer_type T>
5315 [[nodiscard]]inline auto gcd(T x, T y)noexcept{
5316 if constexpr(BIT_POSSIBILITY==2){
5317 if constexpr(is_big_type<T>){
5318 constexpr size_t lehmer_threshold = 1<<8;
5319 if(max(x.size_in_base_type(),y.size_in_base_type()) >= lehmer_threshold)
5320 return lehmer_gcd(move(x), move(y));
5321 }
5322 return binary_gcd(move(x), move(y));
5323 }
5324 else
5325 return lehmer_gcd(move(x), move(y));
5326 }
5327}
5328using math::gcd;
5329
5330namespace magic_number{
5331 using ::std::move;
5332
5333 template<unsigned_big_float_type T>
5335 private:
5336 typedef to_signed_t<T> float_t;
5337 typedef to_unsigned_t<T> ufloat_t;
5338 typedef integer_type_of<T> int_t;
5339 typedef to_unsigned_t<int_t> uint_t;
5340
5341 ufloat_t ε=reciprocal(ufloat_t{30u});
5342 float_t result{}, sum=ε;
5343 /*论证6k、3k、k不需要用大数:
5344 6k的迭代次数是max(type_info<size_t>) / 6
5345 考虑每次迭代π的有效位数增加14位(10进制下),那么即使在64bit的古董计算机下6k溢出时π可以达到的有效位数大约是4.3042403e+19个(十进制位)
5346 这远远超过了一般的计算机算力和大多数的精度要求,所以我们可以放心地使用size_t而不是uint_t来存储6k的值,更不用说3k和k了
5347 */
5348 size_t k{}, _3k{}, _6k{}; bool sign = true;
5349 uint_t _545140134k_p13591409 = 13591409u; // 545140134*k+13591409
5350 uint_t _3k_factorial = 1u, _6k_factorial = 1u, k_factorial_pow_3 = 1u;
5351 ufloat_t sqrt_640320_ε_saver=reciprocal(ufloat_t{5u});
5352 ufloat_t sqrt_640320 = 800u;//我们需要缓存这个与ε有关的值 以便在下一次更高精度的迭代中对缓存的值进行利用
5353 uint_t _640320_pow_3kplus1 = 640320u;//初始值1次方
5354 static constexpr auto _640320pow3 = 262537412640768000u;
5355 size_t base_accurate = 0,sqrt_accuracy_multiplier = 3;//考虑到sqrt_iteration每次都会精度翻倍,而base_iteration每次只会精度增加14,所以我们可以通过追加这个值来省去一些不必要的sqrt迭代
5356
5357 public:
5358 constexpr π_with_ε_impl_t()noexcept{}
5359 [[nodiscard]]constexpr T take_value()noexcept{
5360 return reciprocal(12u*abs(base_accurate?result:21u)/sqrt_640320);
5361 }
5362 constexpr void do_base_iteration()noexcept{
5363 sum = copy_as_negative(ufloat_t
5364 ( _545140134k_p13591409 * _6k_factorial )
5365 / //= --------------------------------------------------------
5366 ( _3k_factorial*k_factorial_pow_3 * _640320_pow_3kplus1 )
5367 ,sign);
5368 for times(3) _3k_factorial *= ++_3k;
5369 for times(6) _6k_factorial *= ++_6k;
5370 k_factorial_pow_3 *= pow<uint_t>(++k,3u);
5371 _545140134k_p13591409 += 545140134u;
5372 _640320_pow_3kplus1 *= _640320pow3;
5373 sign = !sign;
5374
5375 result += sum;
5376 base_accurate += 14;
5377 }
5378 constexpr void do_sqrt_iteration()noexcept{
5379 sqrt_640320=sqrt_iteration(sqrt_640320,640320u);
5380 sqrt_accuracy_multiplier++;
5381 }
5382 constexpr void do_iteration()noexcept{
5384 if(base_accurate && (base_accurate-8) >> sqrt_accuracy_multiplier)
5386 }
5387 constexpr void clean_up()noexcept{
5388 simplify(sqrt_640320);
5389 simplify(result);
5390 }
5391 [[nodiscard]]constexpr T operator()()noexcept{
5392 if(!base_accurate)do_base_iteration();
5393 return take_value();
5394 }
5395 [[nodiscard]]constexpr T operator()(ufloat_t new_ε)noexcept{
5396 if(new_ε < ε){
5397 if(sqrt_640320_ε_saver>new_ε)//ε变小了,我们需要重新计算sqrt_640320
5398 sqrt_640320=sqrt_to_new_ε(sqrt_640320,640320u,new_ε,sqrt_640320_ε_saver);
5399 //更新ε.
5400 ε = move(new_ε);
5401 while (abs(sum) > ε)
5403 }
5404 return take_value();
5405 }
5406 };
5407 template<arithmetic_type T>
5409 distinctive inline constexpr struct π_with_ε_t{
5410 template<unsigned_big_float_type T>
5412 template<float_type T>
5413 auto operator()(T&&ε)const noexcept{
5414 if constexpr(is_basic_float_type<T>)
5415 return (T)π;//啊?
5416 else
5417 return for_type<T>(forward<T>(ε));
5418 }
5420}
5422
5423namespace math{
5424 template<signed_float_type T>
5425 [[nodiscard]]constexpr T sin(T num, const to_unsigned_t<T>&ε)noexcept{
5426 size_t i = 1; bool negation = false; // 取反
5427 T base = num, result = num, num_pow = pow(num); // 求num2的次方
5428 while (abs(base) > ε) {
5429 base *= num_pow/((i+1)*(i+2)); // 求阶乘
5430 negation = !negation; // 每次循环取反
5431 result += reverse_sign_if(negation,base); // 求和
5432 i += 2;
5433 }
5434 return result;
5435 }
5436 template<signed_float_type T> requires(has_ε<T>)
5437 [[nodiscard]]force_inline constexpr T sin(T num)noexcept{
5439 }
5440
5441 template<float_type T>
5442 [[nodiscard]]constexpr T arctan(T num, const to_unsigned_t<T>&ε)noexcept{
5443 /*
5444 arctan (-x) = -arctan(x)
5445 arctan (1/x) = 0.5 * π - arctan(x) [x > 0]
5446 */
5447 if constexpr(signed_type<T>)
5448 if (num < 0) return -arctan(abs(num), ε);
5449 if (num > 1) return π_with_ε(ε)/2u - arctan(reciprocal(move(num)), ε);
5450
5451 size_t i = 1; bool negation = false; // 取反
5452 to_signed_t<T> result = num;
5453 T numerator_base = num, sum, num_pow = pow(num); // 求num2的次方
5454 do {
5455 numerator_base *= num_pow; // 求阶乘
5456 negation = !negation; // 每次循环取反
5457 sum = numerator_base/i; // 单步计算结果
5458 result += reverse_sign_if(negation,sum); // 求和
5459 i += 2;
5460 }while (abs(sum) > ε);
5461 return (T)result;
5462 }
5463 template<float_type T> requires(has_ε<T>)
5464 [[nodiscard]]force_inline constexpr T arctan(T num)noexcept{
5466 }
5467
5468 template<signed_float_type T>
5469 [[nodiscard]]constexpr T cos(T num, const to_unsigned_t<T>&ε)noexcept{
5470 return sin(π_with_ε(ε)/2u - num, ε);
5471 }
5472 template<signed_float_type T> requires(has_ε<T>)
5473 [[nodiscard]]force_inline constexpr T cos(T num)noexcept{
5475 }
5476
5477 template<signed_float_type T>
5478 [[nodiscard]]constexpr T tan(T num, const to_unsigned_t<T>&ε)noexcept{
5479 return sin(num, ε)/cos(num, ε);
5480 }
5481 template<signed_float_type T> requires(has_ε<T>)
5482 [[nodiscard]]force_inline constexpr T tan(T num)noexcept{
5484 }
5485
5486 template<signed_float_type T>
5487 [[nodiscard]]constexpr T cot(T num, const to_unsigned_t<T>&ε)noexcept{
5488 return cos(num, ε)/sin(num, ε);
5489 }
5490 template<signed_float_type T> requires(has_ε<T>)
5491 [[nodiscard]]force_inline constexpr T cot(T num)noexcept{
5493 }
5494
5495 template<signed_float_type T>
5496 [[nodiscard]]constexpr T sec(T num, const to_unsigned_t<T>&ε)noexcept{
5497 return reciprocal(cos(num, ε));
5498 }
5499 template<signed_float_type T> requires(has_ε<T>)
5500 [[nodiscard]]force_inline constexpr T sec(T num)noexcept{
5502 }
5503
5504 template<signed_float_type T>
5505 [[nodiscard]]constexpr T csc(T num, const to_unsigned_t<T>&ε)noexcept{
5506 return reciprocal(sin(num, ε));
5507 }
5508 template<signed_float_type T> requires(has_ε<T>)
5509 [[nodiscard]]force_inline constexpr T csc(T num)noexcept{
5511 }
5512
5513 template<signed_float_type T>
5514 [[nodiscard]]constexpr to_unsigned_t<T> arccos(T num, const to_unsigned_t<T>&ε)noexcept{
5515 return to_unsigned_t<T>(π_with_ε(ε)/2u - arctan(num, ε));
5516 }
5517 template<signed_float_type T> requires(has_ε<T>)
5521
5522 template<float_type T>
5523 [[nodiscard]]constexpr T arcsin(T num, const to_unsigned_t<T>&ε)noexcept{
5524 return arctan(num/reciprocal(sqrt(1-pow(num), ε)), ε);
5525 }
5526 template<float_type T> requires(has_ε<T>)
5527 [[nodiscard]]force_inline constexpr T arcsin(T num)noexcept{
5529 }
5530
5531 template<signed_float_type T>
5532 [[nodiscard]]constexpr to_unsigned_t<T> arccot(T num, const to_unsigned_t<T>&ε)noexcept{
5533 return to_unsigned_t<T>(π_with_ε(ε)/2u - arctan(num, ε));
5534 }
5535 template<signed_float_type T> requires(has_ε<T>)
5539
5540 template<signed_float_type T>
5541 [[nodiscard]]constexpr T arcsec(T num, const to_unsigned_t<T>&ε)noexcept{
5542 return arccos(reciprocal(num), ε);
5543 }
5544 template<signed_float_type T> requires(has_ε<T>)
5545 [[nodiscard]]force_inline constexpr T arcsec(T num)noexcept{
5547 }
5548
5549 template<float_type T>
5550 [[nodiscard]]constexpr T arccsc(T num, const to_unsigned_t<T>&ε)noexcept{
5551 return arcsin(reciprocal(num), ε);
5552 }
5553 template<float_type T> requires(has_ε<T>)
5554 [[nodiscard]]force_inline constexpr T arccsc(T num)noexcept{
5556 }
5557}
5558using math::sin;
5559using math::cos;
5560using math::tan;
5561using math::arccos;
5562using math::arcsin;
5563using math::arctan;
5564using math::cot;
5565using math::sec;
5566using math::csc;
5567using math::arccot;
5568using math::arcsec;
5569using math::arccsc;
5570
5571//file_end
5572
5573 #line 84 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
5574 }
5575
5576 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
5577//_undefs.hpp
5578/*
5579未完成的elc解释器basic文件
5580由steve02081504与Alex0125设计、编写
5581转载时请在不对此文件做任何修改的同时注明出处
5582项目地址:https://github.com/ELC-lang/ELC
5583*/
5584/*
5585 ,??????????????????????????
5586 ????????????????????????????
5587 ?????????????????????????????+
5588 ?????+++++++++++++++++++++++++
5589 ?????+++++++++++++++++++++++++
5590 ??????++++++++++++++++++++++++
5591 ?????++
5592 ?????+++
5593 ??????+++IIIIIIIIIIIIIIIIII
5594 ?????+++++IIIIIIIIIIIIIIIIII
5595 ?????++++++++++++++++++++++++
5596 ??????+++++++++++++++++++++++:
5597 ?????++
5598 ?????+++
5599 ??????++
5600 ??????????????????????????????II
5601 ??????????????????????????????IIII
5602 ,?????????????????????????????IIIII+
5603 =???++++++++++++++++++++++++++III?
5604 ?++++++++++++++++++++++++++++I+
5605*/
5606#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
5607//_undefs.hpp
5608/*
5609未完成的elc解释器_share文件
5610由steve02081504与Alex0125设计、编写
5611转载时请在不对此文件做任何修改的同时注明出处
5612项目地址:https://github.com/ELC-lang/ELC
5613*/
5614/*
5615 ,??????????????????????????
5616 ????????????????????????????
5617 ?????????????????????????????+
5618 ?????+++++++++++++++++++++++++
5619 ?????+++++++++++++++++++++++++
5620 ??????++++++++++++++++++++++++
5621 ?????++
5622 ?????+++
5623 ??????+++IIIIIIIIIIIIIIIIII
5624 ?????+++++IIIIIIIIIIIIIIIIII
5625 ?????++++++++++++++++++++++++
5626 ??????+++++++++++++++++++++++:
5627 ?????++
5628 ?????+++
5629 ??????++
5630 ??????????????????????????????II
5631 ??????????????????????????????IIII
5632 ,?????????????????????????????IIIII+
5633 =???++++++++++++++++++++++++++III?
5634 ?++++++++++++++++++++++++++++I+
5635*/
5636
5637//defs at "_defs.hpp"
5638
5639#if defined(_MSC_VER)
5640 #pragma warning(pop)
5641#endif
5642//#undef suppress_msvc_warning
5643#undef disable_msvc_warning
5644#undef push_msvc_warning
5645#undef pop_msvc_warning
5646#undef push_and_disable_msvc_warning
5647#if defined(_MSC_VER)
5648 #pragma pack(pop)
5649#endif
5650#if defined(__GNUC__)
5651 #pragma GCC diagnostic pop
5652#endif
5653#if defined(_MSC_VER)
5654 #pragma pop_macro("new")
5655 #pragma pop_macro("delete")
5656 #pragma pop_macro("min")
5657 #pragma pop_macro("max")
5658 #pragma pop_macro("abs")
5659 #pragma pop_macro("export")
5660 #pragma pop_macro("rand")
5661 #pragma pop_macro("sqrt")
5662 #pragma pop_macro("type_info")
5663 #pragma pop_macro("elc")
5664#endif
5665
5666//
5667#if defined(ELC_VOID_NAME)
5668 #define void the_void
5669#endif
5670//
5671#if defined(ELC_PUBLIC_ALL)
5672 #undef protected
5673 #undef private
5674#endif
5675//
5676#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
5677 #define rand the_rand
5678#endif
5679
5680// #undef often_noexcept
5681#undef noexcept_as
5682#undef noexcept_as_auto
5683#undef constexpr_as
5684#undef constexpr_as_auto
5685
5686#undef using_method_from_base_t
5687#undef using_method_from_value
5688
5689#undef floop
5690#undef times
5691#undef debug_times
5692#undef enable_adl
5693
5694#undef re_declvalue
5695#undef re_decltype
5696
5697#undef declvalue
5698
5699#undef template_error
5700#undef template_error_of_type
5701#undef template_warning
5702
5703#undef type_info_of
5704#undef type_name_of
5705
5706#undef is_common_attribute
5707#undef is_special_attribute
5708
5709#undef has_attribute
5710#undef not_has_attribute
5711
5712#undef float_size_of
5713#undef bitnum_of
5714
5715#undef def_common_attribute_with_nothing
5716#undef def_special_attribute_with_nothing
5717
5718#undef common_attribute_t
5719#undef special_attribute_t
5720
5721#undef enable_if
5722#undef enabled_by_default
5723#undef disabled_by_default
5724#undef enable_if_not_ill_form
5725#undef enable_flag
5726
5727#undef was_an_ill_form
5728#undef was_an_ill_form_with_parameter
5729#undef was_not_an_ill_form
5730#undef was_not_an_ill_form_and_noexcept
5731#undef was_not_an_ill_form_with_parameter
5732
5733#undef recursive_λ
5734#undef get_recursive_λ_caller
5735#undef λ
5736#undef exλ
5737#undef λ_with_catch
5738#undef self_recursion
5739#undef λ_RLSRRS
5740#undef λ_inline
5741#undef λ_force_inline
5742
5743#undef MAGIC
5744
5745#undef nothing
5746
5747#undef elseif
5748#undef _big_than_
5749#undef _small_than_
5750
5751#if defined(_MSC_VER)
5752 #undef not
5753 #undef and
5754 #undef or
5755#endif
5756
5757#undef INTER_NAMESPACE
5758#undef BREAK_NAMESPACE
5759
5760#undef szie
5761#undef form
5762
5763#undef template_name
5764#undef type_name
5765
5766#undef not_in_debug
5767
5768#undef es
5769#undef ec
5770
5771#undef ELC_TEST_EVENTNAME
5772
5773#undef override_instance_struct
5774
5775#undef distinctive
5776
5777#undef force_inline
5778
5779#undef with_no_vtable
5780
5781#undef in_consteval
5782
5783#undef no_vtable_struct
5784#undef no_vtable_class
5785
5786//#undef get_elc_defs
5787
5788//file_end
5789
5790#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
5791
5792//file_end
5793
5794 #line 87 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
5795}
5796#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
5797//after_math.hpp
5798/*
5799未完成的elc解释器_share文件
5800由steve02081504与Alex0125设计、编写
5801转载时请在不对此文件做任何修改的同时注明出处
5802项目地址:https://github.com/ELC-lang/ELC
5803*/
5804/*
5805 ,??????????????????????????
5806 ????????????????????????????
5807 ?????????????????????????????+
5808 ?????+++++++++++++++++++++++++
5809 ?????+++++++++++++++++++++++++
5810 ??????++++++++++++++++++++++++
5811 ?????++
5812 ?????+++
5813 ??????+++IIIIIIIIIIIIIIIIII
5814 ?????+++++IIIIIIIIIIIIIIIIII
5815 ?????++++++++++++++++++++++++
5816 ??????+++++++++++++++++++++++:
5817 ?????++
5818 ?????+++
5819 ??????++
5820 ??????????????????????????????II
5821 ??????????????????????????????IIII
5822 ,?????????????????????????????IIIII+
5823 =???++++++++++++++++++++++++++III?
5824 ?++++++++++++++++++++++++++++I+
5825*/
5826namespace elc::defs{
5827 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_defs.hpp"
5828//_defs.hpp
5829/*
5830未完成的elc解释器_share文件
5831由steve02081504与Alex0125设计、编写
5832转载时请在不对此文件做任何修改的同时注明出处
5833项目地址:https://github.com/ELC-lang/ELC
5834*/
5835/*
5836 ,??????????????????????????
5837 ????????????????????????????
5838 ?????????????????????????????+
5839 ?????+++++++++++++++++++++++++
5840 ?????+++++++++++++++++++++++++
5841 ??????++++++++++++++++++++++++
5842 ?????++
5843 ?????+++
5844 ??????+++IIIIIIIIIIIIIIIIII
5845 ?????+++++IIIIIIIIIIIIIIIIII
5846 ?????++++++++++++++++++++++++
5847 ??????+++++++++++++++++++++++:
5848 ?????++
5849 ?????+++
5850 ??????++
5851 ??????????????????????????????II
5852 ??????????????????????????????IIII
5853 ,?????????????????????????????IIIII+
5854 =???++++++++++++++++++++++++++III?
5855 ?++++++++++++++++++++++++++++I+
5856*/
5857
5858//undefs at "_undefs.hpp"
5859
5860#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
5861//_defs.hpp
5862/*
5863未完成的elc解释器_share文件
5864由steve02081504与Alex0125设计、编写
5865转载时请在不对此文件做任何修改的同时注明出处
5866项目地址:https://github.com/ELC-lang/ELC
5867*/
5868/*
5869 ,??????????????????????????
5870 ????????????????????????????
5871 ?????????????????????????????+
5872 ?????+++++++++++++++++++++++++
5873 ?????+++++++++++++++++++++++++
5874 ??????++++++++++++++++++++++++
5875 ?????++
5876 ?????+++
5877 ??????+++IIIIIIIIIIIIIIIIII
5878 ?????+++++IIIIIIIIIIIIIIIIII
5879 ?????++++++++++++++++++++++++
5880 ??????+++++++++++++++++++++++:
5881 ?????++
5882 ?????+++
5883 ??????++
5884 ??????????????????????????????II
5885 ??????????????????????????????IIII
5886 ,?????????????????????????????IIIII+
5887 =???++++++++++++++++++++++++++III?
5888 ?++++++++++++++++++++++++++++I+
5889*/
5890
5891//undefs at "_undefs.hpp"
5892
5893#if defined(ELC_CODE_REALM)
5894 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
5895#endif
5896
5897//set ELC_WARNING_LEVEL default to 4(max)
5898#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
5899
5900#if defined(_MSC_VER)
5901 #pragma warning(push,ELC_WARNING_LEVEL)
5902 #pragma warning(disable:4099)//class与struct混用警告diss
5903 #pragma warning(disable:4584)//重复子类警告diss
5904 #pragma warning(disable:4250)//域控制继承警告diss
5905 #pragma warning(disable:26432)//不完全默认方法警告diss
5906 #pragma warning(disable:26435)//virtual override方法警告diss
5907 #pragma warning(disable:26481)//容器安利diss
5908 #pragma warning(disable:26446)//gsl::at安利diss
5909 #pragma warning(disable:26434)//方法覆盖警告diss
5910 #pragma warning(disable:26429)//gsl::not_null安利diss
5911 #pragma warning(disable:26471)//对void*进行static_cast安利diss
5912 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
5913 #pragma warning(disable:26473)//相同指针显式cast警告diss
5914 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
5915 #pragma warning(disable:26485)//数组作指针警告diss
5916 #pragma warning(disable:26490)//reinterpret_cast警告diss
5917 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
5918 #pragma warning(disable:26482)//非常数数组索引警告diss
5919 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
5920#endif
5921#if defined(__GNUC__)
5922 #pragma GCC diagnostic push
5923 #pragma GCC diagnostic warning "-Wall"//开启所有警告
5924 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
5925#endif
5926#if defined(_MSC_VER)
5927 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
5928 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
5929 #define push_msvc_warning() __pragma(warning(push))
5930 #define pop_msvc_warning() __pragma(warning(pop))
5931 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
5932#else
5933 //#define suppress_msvc_warning(...)
5934 #define disable_msvc_warning(...)
5935 #define push_msvc_warning()
5936 #define pop_msvc_warning()
5937 #define push_and_disable_msvc_warning(...)
5938#endif
5939#if defined(_MSC_VER)
5940 //push pack settings
5941 #pragma pack(push)
5942 #pragma pack()
5943#endif
5944#if defined(_MSC_VER)
5945 //push and undef common macros
5946 #pragma push_macro("new")
5947 #undef new
5948 #pragma push_macro("delete")
5949 #undef delete
5950 #pragma push_macro("min")
5951 #undef min
5952 #pragma push_macro("max")
5953 #undef max
5954 #pragma push_macro("abs")
5955 #undef abs
5956 #pragma push_macro("export")
5957 #undef export
5958 #pragma push_macro("rand")
5959 #undef rand
5960 #pragma push_macro("sqrt")
5961 #undef sqrt
5962 #pragma push_macro("type_info")
5963 #undef type_info
5964 #pragma push_macro("elc")
5965 #undef elc
5966#endif
5967//
5968#if defined(ELC_VOID_NAME)
5969 #undef void
5970#endif
5971//
5972#if defined(ELC_PUBLIC_ALL)
5973 #define protected public
5974 #define private public
5975#endif
5976//
5977#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
5978 #undef rand
5979#endif
5980
5981// #define often_noexcept
5982#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
5983#define noexcept_as_auto MAGIC//哦现在有了
5984#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
5985#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
5986
5987#define using_method_from_base_t(name,...) \
5988template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
5989auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
5990{\
5991 return base_t::name(forward<Args>(rest)...);\
5992}\
5993
5994#define using_method_from_value(name,value_name,...) \
5995template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
5996auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
5997{\
5998 return value_name.name(forward<Args>(rest)...);\
5999}\
6000
6001#define floop while(__builtin_is_my_dick_still_there())
6002#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
6003#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
6004#if defined(_MSC_VER) && _MSC_VER>=1935
6005 //@see https://developercommunity.visualstudio.com/t/10193638
6006 #define enable_adl(name) template<typename=void>void name()noexcept=delete
6007#else
6008 #define enable_adl(name) void name()noexcept=delete
6009#endif
6010
6011#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
6012#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
6013
6014#define declvalue(...) (::std::declval<__VA_ARGS__>())
6015
6017#define template_error(reason) static_assert(template_error_helper<T>,reason)
6019#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
6021#define template_warning(reason) template_warning_helper<T>(reason)
6022
6023//for type_info
6024#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
6025#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
6026
6027#define is_common_attribute(name) public attribute<T,name<T>>
6028#define is_special_attribute(name) public attribute<T,name>
6029
6030#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
6031#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
6032
6033//for float_size_t
6034#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
6035//bitnum_of
6036#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
6037
6038//for attribute
6039#define def_common_attribute_with_nothing(name) \
6040template<typename T>\
6041class name{}\
6042
6043#define def_special_attribute_with_nothing(name) \
6044class name{}\
6045
6046#define common_attribute_t template<class>class
6047#define special_attribute_t class
6048
6057#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
6059#define enabled_by_default class enable_state=void
6061#define disabled_by_default class enable_state= ::std::enable_if_t<false>
6063#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
6065#define enable_flag class enable_state
6066
6067#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
6068#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
6069#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
6070#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
6071#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
6072
6074#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
6076#define get_recursive_λ_caller(name,...) \
6077exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
6078 return name(name,Args...);\
6079}
6081#define λ []
6083#define exλ [&]
6085#define λ_with_catch(...) [__VA_ARGS__]
6087#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
6088//recursive_λ_self_referential_reserved_symbolname
6089#define λ_RLSRRS _my_jb_super_sb_name_
6090
6091#if defined(_MSC_VER) && !defined(__clang__)
6092 #define λ_inline [[msvc::forceinline]]
6093 #define λ_force_inline [[msvc::forceinline]]
6094#elif
6095 #define λ_inline [[gnu::always_inline]]
6096 #define λ_force_inline [[gnu::always_inline]]
6097#else
6098 #define λ_inline
6099 #define λ_force_inline
6100#endif
6101
6102#define MAGIC//ahh,ko no tenno da!
6103
6105#define nothing
6106
6108#define elseif else if
6110#define _big_than_ >
6112#define _small_than_ <
6113
6114#if defined(_MSC_VER)
6115 #define not !
6116 #define and &&
6117 #define or ||
6118#endif
6119
6121#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
6123#define BREAK_NAMESPACE }
6124
6126#define template_name template
6128#define type_name class
6129
6130#if defined(DEBUG) || defined(_DEBUG)
6131 #define not_in_debug 0
6132 #define in_debug 1
6133#else
6134 #define not_in_debug 1
6135 #define in_debug 0
6136#endif
6137
6138#define es U""
6139#define ec(ch) U ## ch
6140
6141#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
6142 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
6143#else
6144 #define ELC_TEST_EVENTNAME(name)
6145#endif
6146
6147#define override_instance_struct \
6148protected:\
6149 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
6150 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
6151 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
6152 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
6153 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
6154
6155#if defined(_MSC_VER) && !defined(__clang__)
6156 #define distinctive __declspec(dllexport)
6157#else
6158 #define distinctive
6159#endif
6160
6161#if defined(_MSC_VER) && !defined(__clang__)
6162 #define force_inline __forceinline
6163#elif defined(__GNUC__) || defined(__clang__)
6164 #define force_inline __attribute__((always_inline)) inline
6165#else
6166 #define force_inline inline
6167#endif
6168
6169#if defined(_MSC_VER) && !defined(__clang__)
6170 #define with_no_vtable __declspec(novtable)
6171#else
6172 #define with_no_vtable
6173#endif
6174
6175#define in_consteval (::std::is_constant_evaluated())
6176
6177#define no_vtable_struct struct with_no_vtable
6178#define no_vtable_class class with_no_vtable
6179
6180//#define get_elc_defs using namespace ::elc::defs
6181
6182//file_end
6183
6184#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_defs.hpp"
6185
6186// 定义一个宏来检测是否支持GCC内置函数
6187#if defined(__GNUC__) || defined(__clang__)
6188 #define HAS_GCC_BUILTINS 1
6189#else
6190 #define HAS_GCC_BUILTINS 0
6191#endif
6192
6193// 定义一个宏来检测是否支持MSVC内置函数
6194#if defined(_MSC_VER) && !defined(__clang__)
6195 #define HAS_MSVC_INTRINSICS 1
6196#else
6197 #define HAS_MSVC_INTRINSICS 0
6198#endif
6199
6200// 定义一个宏来检测是否支持x86汇编
6201#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
6202 #define HAS_X86_ASM 1
6203#else
6204 #define HAS_X86_ASM 0
6205#endif
6206
6207// 定义一个宏来检测是否支持x86-64汇编
6208#if defined(__x86_64__) || defined(_M_X64)
6209 #define HAS_X86_64_ASM 1
6210#else
6211 #define HAS_X86_64_ASM 0
6212#endif
6213
6214// 定义一个宏来检测是否支持ARM汇编
6215#if defined(__arm__) || defined(_M_ARM)
6216 #define HAS_ARM_ASM 1
6217#else
6218 #define HAS_ARM_ASM 0
6219#endif
6220
6221// 定义一个宏来检测是否支持ARM64汇编
6222#if defined(__aarch64__)
6223 #define HAS_ARM64_ASM 1
6224#else
6225 #define HAS_ARM64_ASM 0
6226#endif
6227
6228//file_end
6229
6230 #line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
6231
6232 namespace basic_environment{
6233 template<class T>
6234 constexpr inline bool is_elc_expansion_base_type_helper()noexcept{
6235 #if defined(ELC_BASE_ENV_HAS_INT128)
6236 if constexpr(sizeof(basic_uintmax_t) < sizeof(uint128_t) && type_info<T> == type_info<uint128_t>)
6237 return true;
6238 if constexpr(sizeof(basic_intmax_t) < sizeof(int128_t) && type_info<T> == type_info<int128_t>)
6239 return true;
6240 #endif
6241 return false;
6242 }
6243 template<class T>
6245
6247 template<size_t size>
6249 #define TYPE_MAPPER(type) if constexpr(size == sizeof(type))return (type)0;else
6250 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_mapper.hpp"
6251//unsigned_mapper.hpp
6252/*
6253未完成的elc解释器_share文件
6254由steve02081504与Alex0125设计、编写
6255转载时请在不对此文件做任何修改的同时注明出处
6256项目地址:https://github.com/ELC-lang/ELC
6257*/
6258/*
6259 ,??????????????????????????
6260 ????????????????????????????
6261 ?????????????????????????????+
6262 ?????+++++++++++++++++++++++++
6263 ?????+++++++++++++++++++++++++
6264 ??????++++++++++++++++++++++++
6265 ?????++
6266 ?????+++
6267 ??????+++IIIIIIIIIIIIIIIIII
6268 ?????+++++IIIIIIIIIIIIIIIIII
6269 ?????++++++++++++++++++++++++
6270 ??????+++++++++++++++++++++++:
6271 ?????++
6272 ?????+++
6273 ??????++
6274 ??????????????????????????????II
6275 ??????????????????????????????IIII
6276 ,?????????????????????????????IIIII+
6277 =???++++++++++++++++++++++++++III?
6278 ?++++++++++++++++++++++++++++I+
6279*/
6284#if defined(ELC_BASE_ENV_HAS_INT128)
6286#endif
6287TYPE_MAPPER(::std::uintmax_t)
6288TYPE_MAPPER(size_t)
6289TYPE_MAPPER(unsigned char)
6290TYPE_MAPPER(char8_t)
6291TYPE_MAPPER(char16_t)
6292TYPE_MAPPER(char32_t)
6293TYPE_MAPPER(wchar_t)
6294TYPE_MAPPER(unsigned short)
6295TYPE_MAPPER(unsigned int)
6296TYPE_MAPPER(unsigned long)
6297TYPE_MAPPER(unsigned long long)
6298
6299//file_end
6300
6301 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
6302 #undef TYPE_MAPPER
6303 {}
6304 }());
6306 template<size_t size>
6308 #define TYPE_MAPPER(type) if constexpr(size <= sizeof(type))return (type)0;else
6309 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_fast_mapper.hpp"
6310//unsigned_fast_mapper.hpp
6311/*
6312未完成的elc解释器_share文件
6313由steve02081504与Alex0125设计、编写
6314转载时请在不对此文件做任何修改的同时注明出处
6315项目地址:https://github.com/ELC-lang/ELC
6316*/
6317/*
6318 ,??????????????????????????
6319 ????????????????????????????
6320 ?????????????????????????????+
6321 ?????+++++++++++++++++++++++++
6322 ?????+++++++++++++++++++++++++
6323 ??????++++++++++++++++++++++++
6324 ?????++
6325 ?????+++
6326 ??????+++IIIIIIIIIIIIIIIIII
6327 ?????+++++IIIIIIIIIIIIIIIIII
6328 ?????++++++++++++++++++++++++
6329 ??????+++++++++++++++++++++++:
6330 ?????++
6331 ?????+++
6332 ??????++
6333 ??????????????????????????????II
6334 ??????????????????????????????IIII
6335 ,?????????????????????????????IIIII+
6336 =???++++++++++++++++++++++++++III?
6337 ?++++++++++++++++++++++++++++I+
6338*/
6343#if defined(ELC_BASE_ENV_HAS_INT128)
6345#endif
6346
6347//file_end
6348
6349 #line 59 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
6350 #undef TYPE_MAPPER
6351 {}
6352 }());
6354 template<size_t size>
6356 #define TYPE_MAPPER(type) if constexpr(size == sizeof(type))return (type)0;else
6357 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_mapper.hpp"
6358//signed_mapper.hpp
6359/*
6360未完成的elc解释器_share文件
6361由steve02081504与Alex0125设计、编写
6362转载时请在不对此文件做任何修改的同时注明出处
6363项目地址:https://github.com/ELC-lang/ELC
6364*/
6365/*
6366 ,??????????????????????????
6367 ????????????????????????????
6368 ?????????????????????????????+
6369 ?????+++++++++++++++++++++++++
6370 ?????+++++++++++++++++++++++++
6371 ??????++++++++++++++++++++++++
6372 ?????++
6373 ?????+++
6374 ??????+++IIIIIIIIIIIIIIIIII
6375 ?????+++++IIIIIIIIIIIIIIIIII
6376 ?????++++++++++++++++++++++++
6377 ??????+++++++++++++++++++++++:
6378 ?????++
6379 ?????+++
6380 ??????++
6381 ??????????????????????????????II
6382 ??????????????????????????????IIII
6383 ,?????????????????????????????IIIII+
6384 =???++++++++++++++++++++++++++III?
6385 ?++++++++++++++++++++++++++++I+
6386*/
6391#if defined(ELC_BASE_ENV_HAS_INT128)
6393#endif
6394TYPE_MAPPER(::std::intmax_t)
6396TYPE_MAPPER(signed char)
6397TYPE_MAPPER(short)
6398TYPE_MAPPER(int)
6399TYPE_MAPPER(long)
6400TYPE_MAPPER(long long)
6401
6402//file_end
6403
6404 #line 67 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
6405 #undef TYPE_MAPPER
6406 {}
6407 }());
6409 template<size_t size>
6411 #define TYPE_MAPPER(type) if constexpr(size <= sizeof(type))return (type)0;else
6412 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_fast_mapper.hpp"
6413//signed_fast_mapper.hpp
6414/*
6415未完成的elc解释器_share文件
6416由steve02081504与Alex0125设计、编写
6417转载时请在不对此文件做任何修改的同时注明出处
6418项目地址:https://github.com/ELC-lang/ELC
6419*/
6420/*
6421 ,??????????????????????????
6422 ????????????????????????????
6423 ?????????????????????????????+
6424 ?????+++++++++++++++++++++++++
6425 ?????+++++++++++++++++++++++++
6426 ??????++++++++++++++++++++++++
6427 ?????++
6428 ?????+++
6429 ??????+++IIIIIIIIIIIIIIIIII
6430 ?????+++++IIIIIIIIIIIIIIIIII
6431 ?????++++++++++++++++++++++++
6432 ??????+++++++++++++++++++++++:
6433 ?????++
6434 ?????+++
6435 ??????++
6436 ??????????????????????????????II
6437 ??????????????????????????????IIII
6438 ,?????????????????????????????IIIII+
6439 =???++++++++++++++++++++++++++III?
6440 ?++++++++++++++++++++++++++++I+
6441*/
6446#if defined(ELC_BASE_ENV_HAS_INT128)
6448#endif
6449
6450//file_end
6451
6452 #line 75 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
6453 #undef TYPE_MAPPER
6454 {}
6455 }());
6456 //任意类型转算数类型
6457 inline constexpr class to_arithmetic_t{
6458 template<class T,class type>
6459 //由于can_convert_to的歧义性质,使用requires表达式辅助推断type是否为实际支持的类型
6460 //由于requires表达式的强制性质,使用can_convert_to辅助推断隐式转换是否可行
6461 static inline constexpr bool is_convertible = type_info<T>.can_convert_to<type> && was_not_an_ill_form(static_cast<type>(declvalue(T)));
6462 template<class T>
6463 static inline constexpr bool r_able_helper()noexcept{
6464 #define TYPE_MAPPER(type) if constexpr(is_convertible<T,type>)return true;else
6465 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6466//float_mapper.hpp
6467/*
6468未完成的elc解释器_share文件
6469由steve02081504与Alex0125设计、编写
6470转载时请在不对此文件做任何修改的同时注明出处
6471项目地址:https://github.com/ELC-lang/ELC
6472*/
6473/*
6474 ,??????????????????????????
6475 ????????????????????????????
6476 ?????????????????????????????+
6477 ?????+++++++++++++++++++++++++
6478 ?????+++++++++++++++++++++++++
6479 ??????++++++++++++++++++++++++
6480 ?????++
6481 ?????+++
6482 ??????+++IIIIIIIIIIIIIIIIII
6483 ?????+++++IIIIIIIIIIIIIIIIII
6484 ?????++++++++++++++++++++++++
6485 ??????+++++++++++++++++++++++:
6486 ?????++
6487 ?????+++
6488 ??????++
6489 ??????????????????????????????II
6490 ??????????????????????????????IIII
6491 ,?????????????????????????????IIIII+
6492 =???++++++++++++++++++++++++++III?
6493 ?++++++++++++++++++++++++++++I+
6494*/
6495#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/float_mapper.hpp"
6496//float_mapper.hpp
6497/*
6498未完成的elc解释器_share文件
6499由steve02081504与Alex0125设计、编写
6500转载时请在不对此文件做任何修改的同时注明出处
6501项目地址:https://github.com/ELC-lang/ELC
6502*/
6503/*
6504 ,??????????????????????????
6505 ????????????????????????????
6506 ?????????????????????????????+
6507 ?????+++++++++++++++++++++++++
6508 ?????+++++++++++++++++++++++++
6509 ??????++++++++++++++++++++++++
6510 ?????++
6511 ?????+++
6512 ??????+++IIIIIIIIIIIIIIIIII
6513 ?????+++++IIIIIIIIIIIIIIIIII
6514 ?????++++++++++++++++++++++++
6515 ??????+++++++++++++++++++++++:
6516 ?????++
6517 ?????+++
6518 ??????++
6519 ??????????????????????????????II
6520 ??????????????????????????????IIII
6521 ,?????????????????????????????IIIII+
6522 =???++++++++++++++++++++++++++III?
6523 ?++++++++++++++++++++++++++++I+
6524*/
6525TYPE_MAPPER(float)
6526TYPE_MAPPER(double)
6527TYPE_MAPPER(long double)
6528#if defined(__STDCPP_FLOAT16_T__)
6529 TYPE_MAPPER(::std::float16_t)
6530#endif
6531#if defined(__STDCPP_FLOAT32_T__)
6532 TYPE_MAPPER(::std::float32_t)
6533#endif
6534#if defined(__STDCPP_FLOAT64_T__)
6535 TYPE_MAPPER(::std::float64_t)
6536#endif
6537#if defined(__STDCPP_FLOAT128_T__)
6538 TYPE_MAPPER(::std::float128_t)
6539#endif
6540#if defined(__STDCPP_BFLOAT16_T__)
6541 TYPE_MAPPER(::std::bfloat16_t)
6542#endif
6543
6544//file_end
6545
6546#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6547#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_mapper.hpp"
6548//signed_mapper.hpp
6549/*
6550未完成的elc解释器_share文件
6551由steve02081504与Alex0125设计、编写
6552转载时请在不对此文件做任何修改的同时注明出处
6553项目地址:https://github.com/ELC-lang/ELC
6554*/
6555/*
6556 ,??????????????????????????
6557 ????????????????????????????
6558 ?????????????????????????????+
6559 ?????+++++++++++++++++++++++++
6560 ?????+++++++++++++++++++++++++
6561 ??????++++++++++++++++++++++++
6562 ?????++
6563 ?????+++
6564 ??????+++IIIIIIIIIIIIIIIIII
6565 ?????+++++IIIIIIIIIIIIIIIIII
6566 ?????++++++++++++++++++++++++
6567 ??????+++++++++++++++++++++++:
6568 ?????++
6569 ?????+++
6570 ??????++
6571 ??????????????????????????????II
6572 ??????????????????????????????IIII
6573 ,?????????????????????????????IIIII+
6574 =???++++++++++++++++++++++++++III?
6575 ?++++++++++++++++++++++++++++I+
6576*/
6581#if defined(ELC_BASE_ENV_HAS_INT128)
6583#endif
6584TYPE_MAPPER(::std::intmax_t)
6586TYPE_MAPPER(signed char)
6587TYPE_MAPPER(short)
6588TYPE_MAPPER(int)
6589TYPE_MAPPER(long)
6590TYPE_MAPPER(long long)
6591
6592//file_end
6593
6594#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6595#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_mapper.hpp"
6596//unsigned_mapper.hpp
6597/*
6598未完成的elc解释器_share文件
6599由steve02081504与Alex0125设计、编写
6600转载时请在不对此文件做任何修改的同时注明出处
6601项目地址:https://github.com/ELC-lang/ELC
6602*/
6603/*
6604 ,??????????????????????????
6605 ????????????????????????????
6606 ?????????????????????????????+
6607 ?????+++++++++++++++++++++++++
6608 ?????+++++++++++++++++++++++++
6609 ??????++++++++++++++++++++++++
6610 ?????++
6611 ?????+++
6612 ??????+++IIIIIIIIIIIIIIIIII
6613 ?????+++++IIIIIIIIIIIIIIIIII
6614 ?????++++++++++++++++++++++++
6615 ??????+++++++++++++++++++++++:
6616 ?????++
6617 ?????+++
6618 ??????++
6619 ??????????????????????????????II
6620 ??????????????????????????????IIII
6621 ,?????????????????????????????IIIII+
6622 =???++++++++++++++++++++++++++III?
6623 ?++++++++++++++++++++++++++++I+
6624*/
6629#if defined(ELC_BASE_ENV_HAS_INT128)
6631#endif
6632TYPE_MAPPER(::std::uintmax_t)
6633TYPE_MAPPER(size_t)
6634TYPE_MAPPER(unsigned char)
6635TYPE_MAPPER(char8_t)
6636TYPE_MAPPER(char16_t)
6637TYPE_MAPPER(char32_t)
6638TYPE_MAPPER(wchar_t)
6639TYPE_MAPPER(unsigned short)
6640TYPE_MAPPER(unsigned int)
6641TYPE_MAPPER(unsigned long)
6642TYPE_MAPPER(unsigned long long)
6643
6644//file_end
6645
6646#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6647#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_fast_mapper.hpp"
6648//signed_fast_mapper.hpp
6649/*
6650未完成的elc解释器_share文件
6651由steve02081504与Alex0125设计、编写
6652转载时请在不对此文件做任何修改的同时注明出处
6653项目地址:https://github.com/ELC-lang/ELC
6654*/
6655/*
6656 ,??????????????????????????
6657 ????????????????????????????
6658 ?????????????????????????????+
6659 ?????+++++++++++++++++++++++++
6660 ?????+++++++++++++++++++++++++
6661 ??????++++++++++++++++++++++++
6662 ?????++
6663 ?????+++
6664 ??????+++IIIIIIIIIIIIIIIIII
6665 ?????+++++IIIIIIIIIIIIIIIIII
6666 ?????++++++++++++++++++++++++
6667 ??????+++++++++++++++++++++++:
6668 ?????++
6669 ?????+++
6670 ??????++
6671 ??????????????????????????????II
6672 ??????????????????????????????IIII
6673 ,?????????????????????????????IIIII+
6674 =???++++++++++++++++++++++++++III?
6675 ?++++++++++++++++++++++++++++I+
6676*/
6681#if defined(ELC_BASE_ENV_HAS_INT128)
6683#endif
6684
6685//file_end
6686
6687#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6688#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_fast_mapper.hpp"
6689//unsigned_fast_mapper.hpp
6690/*
6691未完成的elc解释器_share文件
6692由steve02081504与Alex0125设计、编写
6693转载时请在不对此文件做任何修改的同时注明出处
6694项目地址:https://github.com/ELC-lang/ELC
6695*/
6696/*
6697 ,??????????????????????????
6698 ????????????????????????????
6699 ?????????????????????????????+
6700 ?????+++++++++++++++++++++++++
6701 ?????+++++++++++++++++++++++++
6702 ??????++++++++++++++++++++++++
6703 ?????++
6704 ?????+++
6705 ??????+++IIIIIIIIIIIIIIIIII
6706 ?????+++++IIIIIIIIIIIIIIIIII
6707 ?????++++++++++++++++++++++++
6708 ??????+++++++++++++++++++++++:
6709 ?????++
6710 ?????+++
6711 ??????++
6712 ??????????????????????????????II
6713 ??????????????????????????????IIII
6714 ,?????????????????????????????IIIII+
6715 =???++++++++++++++++++++++++++III?
6716 ?++++++++++++++++++++++++++++I+
6717*/
6722#if defined(ELC_BASE_ENV_HAS_INT128)
6724#endif
6725
6726//file_end
6727
6728#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6729
6730//file_end
6731
6732 #line 88 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
6733 #undef TYPE_MAPPER
6734 return false;
6735 }
6736 template<class T>
6737 static force_inline constexpr auto to_arithmetic_base(T&&v)noexcept{
6738 #define TYPE_MAPPER(type) if constexpr(r_able_helper<T>()&&is_convertible<T,type>)return (type)v;else
6739 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6740//float_mapper.hpp
6741/*
6742未完成的elc解释器_share文件
6743由steve02081504与Alex0125设计、编写
6744转载时请在不对此文件做任何修改的同时注明出处
6745项目地址:https://github.com/ELC-lang/ELC
6746*/
6747/*
6748 ,??????????????????????????
6749 ????????????????????????????
6750 ?????????????????????????????+
6751 ?????+++++++++++++++++++++++++
6752 ?????+++++++++++++++++++++++++
6753 ??????++++++++++++++++++++++++
6754 ?????++
6755 ?????+++
6756 ??????+++IIIIIIIIIIIIIIIIII
6757 ?????+++++IIIIIIIIIIIIIIIIII
6758 ?????++++++++++++++++++++++++
6759 ??????+++++++++++++++++++++++:
6760 ?????++
6761 ?????+++
6762 ??????++
6763 ??????????????????????????????II
6764 ??????????????????????????????IIII
6765 ,?????????????????????????????IIIII+
6766 =???++++++++++++++++++++++++++III?
6767 ?++++++++++++++++++++++++++++I+
6768*/
6769#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/float_mapper.hpp"
6770//float_mapper.hpp
6771/*
6772未完成的elc解释器_share文件
6773由steve02081504与Alex0125设计、编写
6774转载时请在不对此文件做任何修改的同时注明出处
6775项目地址:https://github.com/ELC-lang/ELC
6776*/
6777/*
6778 ,??????????????????????????
6779 ????????????????????????????
6780 ?????????????????????????????+
6781 ?????+++++++++++++++++++++++++
6782 ?????+++++++++++++++++++++++++
6783 ??????++++++++++++++++++++++++
6784 ?????++
6785 ?????+++
6786 ??????+++IIIIIIIIIIIIIIIIII
6787 ?????+++++IIIIIIIIIIIIIIIIII
6788 ?????++++++++++++++++++++++++
6789 ??????+++++++++++++++++++++++:
6790 ?????++
6791 ?????+++
6792 ??????++
6793 ??????????????????????????????II
6794 ??????????????????????????????IIII
6795 ,?????????????????????????????IIIII+
6796 =???++++++++++++++++++++++++++III?
6797 ?++++++++++++++++++++++++++++I+
6798*/
6799TYPE_MAPPER(float)
6800TYPE_MAPPER(double)
6801TYPE_MAPPER(long double)
6802#if defined(__STDCPP_FLOAT16_T__)
6803 TYPE_MAPPER(::std::float16_t)
6804#endif
6805#if defined(__STDCPP_FLOAT32_T__)
6806 TYPE_MAPPER(::std::float32_t)
6807#endif
6808#if defined(__STDCPP_FLOAT64_T__)
6809 TYPE_MAPPER(::std::float64_t)
6810#endif
6811#if defined(__STDCPP_FLOAT128_T__)
6812 TYPE_MAPPER(::std::float128_t)
6813#endif
6814#if defined(__STDCPP_BFLOAT16_T__)
6815 TYPE_MAPPER(::std::bfloat16_t)
6816#endif
6817
6818//file_end
6819
6820#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6821#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_mapper.hpp"
6822//signed_mapper.hpp
6823/*
6824未完成的elc解释器_share文件
6825由steve02081504与Alex0125设计、编写
6826转载时请在不对此文件做任何修改的同时注明出处
6827项目地址:https://github.com/ELC-lang/ELC
6828*/
6829/*
6830 ,??????????????????????????
6831 ????????????????????????????
6832 ?????????????????????????????+
6833 ?????+++++++++++++++++++++++++
6834 ?????+++++++++++++++++++++++++
6835 ??????++++++++++++++++++++++++
6836 ?????++
6837 ?????+++
6838 ??????+++IIIIIIIIIIIIIIIIII
6839 ?????+++++IIIIIIIIIIIIIIIIII
6840 ?????++++++++++++++++++++++++
6841 ??????+++++++++++++++++++++++:
6842 ?????++
6843 ?????+++
6844 ??????++
6845 ??????????????????????????????II
6846 ??????????????????????????????IIII
6847 ,?????????????????????????????IIIII+
6848 =???++++++++++++++++++++++++++III?
6849 ?++++++++++++++++++++++++++++I+
6850*/
6855#if defined(ELC_BASE_ENV_HAS_INT128)
6857#endif
6858TYPE_MAPPER(::std::intmax_t)
6860TYPE_MAPPER(signed char)
6861TYPE_MAPPER(short)
6862TYPE_MAPPER(int)
6863TYPE_MAPPER(long)
6864TYPE_MAPPER(long long)
6865
6866//file_end
6867
6868#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6869#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_mapper.hpp"
6870//unsigned_mapper.hpp
6871/*
6872未完成的elc解释器_share文件
6873由steve02081504与Alex0125设计、编写
6874转载时请在不对此文件做任何修改的同时注明出处
6875项目地址:https://github.com/ELC-lang/ELC
6876*/
6877/*
6878 ,??????????????????????????
6879 ????????????????????????????
6880 ?????????????????????????????+
6881 ?????+++++++++++++++++++++++++
6882 ?????+++++++++++++++++++++++++
6883 ??????++++++++++++++++++++++++
6884 ?????++
6885 ?????+++
6886 ??????+++IIIIIIIIIIIIIIIIII
6887 ?????+++++IIIIIIIIIIIIIIIIII
6888 ?????++++++++++++++++++++++++
6889 ??????+++++++++++++++++++++++:
6890 ?????++
6891 ?????+++
6892 ??????++
6893 ??????????????????????????????II
6894 ??????????????????????????????IIII
6895 ,?????????????????????????????IIIII+
6896 =???++++++++++++++++++++++++++III?
6897 ?++++++++++++++++++++++++++++I+
6898*/
6903#if defined(ELC_BASE_ENV_HAS_INT128)
6905#endif
6906TYPE_MAPPER(::std::uintmax_t)
6907TYPE_MAPPER(size_t)
6908TYPE_MAPPER(unsigned char)
6909TYPE_MAPPER(char8_t)
6910TYPE_MAPPER(char16_t)
6911TYPE_MAPPER(char32_t)
6912TYPE_MAPPER(wchar_t)
6913TYPE_MAPPER(unsigned short)
6914TYPE_MAPPER(unsigned int)
6915TYPE_MAPPER(unsigned long)
6916TYPE_MAPPER(unsigned long long)
6917
6918//file_end
6919
6920#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6921#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_fast_mapper.hpp"
6922//signed_fast_mapper.hpp
6923/*
6924未完成的elc解释器_share文件
6925由steve02081504与Alex0125设计、编写
6926转载时请在不对此文件做任何修改的同时注明出处
6927项目地址:https://github.com/ELC-lang/ELC
6928*/
6929/*
6930 ,??????????????????????????
6931 ????????????????????????????
6932 ?????????????????????????????+
6933 ?????+++++++++++++++++++++++++
6934 ?????+++++++++++++++++++++++++
6935 ??????++++++++++++++++++++++++
6936 ?????++
6937 ?????+++
6938 ??????+++IIIIIIIIIIIIIIIIII
6939 ?????+++++IIIIIIIIIIIIIIIIII
6940 ?????++++++++++++++++++++++++
6941 ??????+++++++++++++++++++++++:
6942 ?????++
6943 ?????+++
6944 ??????++
6945 ??????????????????????????????II
6946 ??????????????????????????????IIII
6947 ,?????????????????????????????IIIII+
6948 =???++++++++++++++++++++++++++III?
6949 ?++++++++++++++++++++++++++++I+
6950*/
6955#if defined(ELC_BASE_ENV_HAS_INT128)
6957#endif
6958
6959//file_end
6960
6961#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
6962#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_fast_mapper.hpp"
6963//unsigned_fast_mapper.hpp
6964/*
6965未完成的elc解释器_share文件
6966由steve02081504与Alex0125设计、编写
6967转载时请在不对此文件做任何修改的同时注明出处
6968项目地址:https://github.com/ELC-lang/ELC
6969*/
6970/*
6971 ,??????????????????????????
6972 ????????????????????????????
6973 ?????????????????????????????+
6974 ?????+++++++++++++++++++++++++
6975 ?????+++++++++++++++++++++++++
6976 ??????++++++++++++++++++++++++
6977 ?????++
6978 ?????+++
6979 ??????+++IIIIIIIIIIIIIIIIII
6980 ?????+++++IIIIIIIIIIIIIIIIII
6981 ?????++++++++++++++++++++++++
6982 ??????+++++++++++++++++++++++:
6983 ?????++
6984 ?????+++
6985 ??????++
6986 ??????????????????????????????II
6987 ??????????????????????????????IIII
6988 ,?????????????????????????????IIIII+
6989 =???++++++++++++++++++++++++++III?
6990 ?++++++++++++++++++++++++++++I+
6991*/
6996#if defined(ELC_BASE_ENV_HAS_INT128)
6998#endif
6999
7000//file_end
7001
7002#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7003
7004//file_end
7005
7006 #line 95 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
7007 #undef TYPE_MAPPER
7008 {}
7009 }
7010 template<class T>
7011 static inline constexpr size_t get_arithmetic_muti_convertible_count()noexcept{
7012 typedef decltype(to_arithmetic_base(declvalue(T))) to_type;
7013 size_t muti_convertible_count=0;
7014 #define TYPE_MAPPER(type) \
7015 if constexpr(type_info<to_type>!=type_info<type> && is_convertible<T,type>)\
7016 muti_convertible_count++;
7017 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7018//float_mapper.hpp
7019/*
7020未完成的elc解释器_share文件
7021由steve02081504与Alex0125设计、编写
7022转载时请在不对此文件做任何修改的同时注明出处
7023项目地址:https://github.com/ELC-lang/ELC
7024*/
7025/*
7026 ,??????????????????????????
7027 ????????????????????????????
7028 ?????????????????????????????+
7029 ?????+++++++++++++++++++++++++
7030 ?????+++++++++++++++++++++++++
7031 ??????++++++++++++++++++++++++
7032 ?????++
7033 ?????+++
7034 ??????+++IIIIIIIIIIIIIIIIII
7035 ?????+++++IIIIIIIIIIIIIIIIII
7036 ?????++++++++++++++++++++++++
7037 ??????+++++++++++++++++++++++:
7038 ?????++
7039 ?????+++
7040 ??????++
7041 ??????????????????????????????II
7042 ??????????????????????????????IIII
7043 ,?????????????????????????????IIIII+
7044 =???++++++++++++++++++++++++++III?
7045 ?++++++++++++++++++++++++++++I+
7046*/
7047#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/float_mapper.hpp"
7048//float_mapper.hpp
7049/*
7050未完成的elc解释器_share文件
7051由steve02081504与Alex0125设计、编写
7052转载时请在不对此文件做任何修改的同时注明出处
7053项目地址:https://github.com/ELC-lang/ELC
7054*/
7055/*
7056 ,??????????????????????????
7057 ????????????????????????????
7058 ?????????????????????????????+
7059 ?????+++++++++++++++++++++++++
7060 ?????+++++++++++++++++++++++++
7061 ??????++++++++++++++++++++++++
7062 ?????++
7063 ?????+++
7064 ??????+++IIIIIIIIIIIIIIIIII
7065 ?????+++++IIIIIIIIIIIIIIIIII
7066 ?????++++++++++++++++++++++++
7067 ??????+++++++++++++++++++++++:
7068 ?????++
7069 ?????+++
7070 ??????++
7071 ??????????????????????????????II
7072 ??????????????????????????????IIII
7073 ,?????????????????????????????IIIII+
7074 =???++++++++++++++++++++++++++III?
7075 ?++++++++++++++++++++++++++++I+
7076*/
7077TYPE_MAPPER(float)
7078TYPE_MAPPER(double)
7079TYPE_MAPPER(long double)
7080#if defined(__STDCPP_FLOAT16_T__)
7081 TYPE_MAPPER(::std::float16_t)
7082#endif
7083#if defined(__STDCPP_FLOAT32_T__)
7084 TYPE_MAPPER(::std::float32_t)
7085#endif
7086#if defined(__STDCPP_FLOAT64_T__)
7087 TYPE_MAPPER(::std::float64_t)
7088#endif
7089#if defined(__STDCPP_FLOAT128_T__)
7090 TYPE_MAPPER(::std::float128_t)
7091#endif
7092#if defined(__STDCPP_BFLOAT16_T__)
7093 TYPE_MAPPER(::std::bfloat16_t)
7094#endif
7095
7096//file_end
7097
7098#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7099#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_mapper.hpp"
7100//signed_mapper.hpp
7101/*
7102未完成的elc解释器_share文件
7103由steve02081504与Alex0125设计、编写
7104转载时请在不对此文件做任何修改的同时注明出处
7105项目地址:https://github.com/ELC-lang/ELC
7106*/
7107/*
7108 ,??????????????????????????
7109 ????????????????????????????
7110 ?????????????????????????????+
7111 ?????+++++++++++++++++++++++++
7112 ?????+++++++++++++++++++++++++
7113 ??????++++++++++++++++++++++++
7114 ?????++
7115 ?????+++
7116 ??????+++IIIIIIIIIIIIIIIIII
7117 ?????+++++IIIIIIIIIIIIIIIIII
7118 ?????++++++++++++++++++++++++
7119 ??????+++++++++++++++++++++++:
7120 ?????++
7121 ?????+++
7122 ??????++
7123 ??????????????????????????????II
7124 ??????????????????????????????IIII
7125 ,?????????????????????????????IIIII+
7126 =???++++++++++++++++++++++++++III?
7127 ?++++++++++++++++++++++++++++I+
7128*/
7133#if defined(ELC_BASE_ENV_HAS_INT128)
7135#endif
7136TYPE_MAPPER(::std::intmax_t)
7138TYPE_MAPPER(signed char)
7139TYPE_MAPPER(short)
7140TYPE_MAPPER(int)
7141TYPE_MAPPER(long)
7142TYPE_MAPPER(long long)
7143
7144//file_end
7145
7146#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7147#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_mapper.hpp"
7148//unsigned_mapper.hpp
7149/*
7150未完成的elc解释器_share文件
7151由steve02081504与Alex0125设计、编写
7152转载时请在不对此文件做任何修改的同时注明出处
7153项目地址:https://github.com/ELC-lang/ELC
7154*/
7155/*
7156 ,??????????????????????????
7157 ????????????????????????????
7158 ?????????????????????????????+
7159 ?????+++++++++++++++++++++++++
7160 ?????+++++++++++++++++++++++++
7161 ??????++++++++++++++++++++++++
7162 ?????++
7163 ?????+++
7164 ??????+++IIIIIIIIIIIIIIIIII
7165 ?????+++++IIIIIIIIIIIIIIIIII
7166 ?????++++++++++++++++++++++++
7167 ??????+++++++++++++++++++++++:
7168 ?????++
7169 ?????+++
7170 ??????++
7171 ??????????????????????????????II
7172 ??????????????????????????????IIII
7173 ,?????????????????????????????IIIII+
7174 =???++++++++++++++++++++++++++III?
7175 ?++++++++++++++++++++++++++++I+
7176*/
7181#if defined(ELC_BASE_ENV_HAS_INT128)
7183#endif
7184TYPE_MAPPER(::std::uintmax_t)
7185TYPE_MAPPER(size_t)
7186TYPE_MAPPER(unsigned char)
7187TYPE_MAPPER(char8_t)
7188TYPE_MAPPER(char16_t)
7189TYPE_MAPPER(char32_t)
7190TYPE_MAPPER(wchar_t)
7191TYPE_MAPPER(unsigned short)
7192TYPE_MAPPER(unsigned int)
7193TYPE_MAPPER(unsigned long)
7194TYPE_MAPPER(unsigned long long)
7195
7196//file_end
7197
7198#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7199#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/signed_fast_mapper.hpp"
7200//signed_fast_mapper.hpp
7201/*
7202未完成的elc解释器_share文件
7203由steve02081504与Alex0125设计、编写
7204转载时请在不对此文件做任何修改的同时注明出处
7205项目地址:https://github.com/ELC-lang/ELC
7206*/
7207/*
7208 ,??????????????????????????
7209 ????????????????????????????
7210 ?????????????????????????????+
7211 ?????+++++++++++++++++++++++++
7212 ?????+++++++++++++++++++++++++
7213 ??????++++++++++++++++++++++++
7214 ?????++
7215 ?????+++
7216 ??????+++IIIIIIIIIIIIIIIIII
7217 ?????+++++IIIIIIIIIIIIIIIIII
7218 ?????++++++++++++++++++++++++
7219 ??????+++++++++++++++++++++++:
7220 ?????++
7221 ?????+++
7222 ??????++
7223 ??????????????????????????????II
7224 ??????????????????????????????IIII
7225 ,?????????????????????????????IIIII+
7226 =???++++++++++++++++++++++++++III?
7227 ?++++++++++++++++++++++++++++I+
7228*/
7233#if defined(ELC_BASE_ENV_HAS_INT128)
7235#endif
7236
7237//file_end
7238
7239#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7240#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/unsigned_fast_mapper.hpp"
7241//unsigned_fast_mapper.hpp
7242/*
7243未完成的elc解释器_share文件
7244由steve02081504与Alex0125设计、编写
7245转载时请在不对此文件做任何修改的同时注明出处
7246项目地址:https://github.com/ELC-lang/ELC
7247*/
7248/*
7249 ,??????????????????????????
7250 ????????????????????????????
7251 ?????????????????????????????+
7252 ?????+++++++++++++++++++++++++
7253 ?????+++++++++++++++++++++++++
7254 ??????++++++++++++++++++++++++
7255 ?????++
7256 ?????+++
7257 ??????+++IIIIIIIIIIIIIIIIII
7258 ?????+++++IIIIIIIIIIIIIIIIII
7259 ?????++++++++++++++++++++++++
7260 ??????+++++++++++++++++++++++:
7261 ?????++
7262 ?????+++
7263 ??????++
7264 ??????????????????????????????II
7265 ??????????????????????????????IIII
7266 ,?????????????????????????????IIIII+
7267 =???++++++++++++++++++++++++++III?
7268 ?++++++++++++++++++++++++++++I+
7269*/
7274#if defined(ELC_BASE_ENV_HAS_INT128)
7276#endif
7277
7278//file_end
7279
7280#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/arithmetic_mapper/all_mapper.hpp"
7281
7282//file_end
7283
7284 #line 106 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
7285 #undef TYPE_MAPPER
7287 }
7288 template<class T>
7289 static inline constexpr bool convertible_unique_helper()noexcept{
7290 return get_arithmetic_muti_convertible_count<T>()==1;//the oly way we can save all lifes........
7291 }
7292 template<class T>
7293 static inline constexpr bool able_helper()noexcept{
7294 if constexpr(r_able_helper<T>())
7296 else
7297 return false;
7298 }
7299 public:
7300 template<class T>
7301 static inline constexpr bool able = able_helper<T>();
7302 private:
7303 //nothrow
7304 template<class T>
7305 static inline constexpr bool nothrow_helper()noexcept{
7306 typedef decltype(to_arithmetic_base(declvalue(T))) to_type;
7307 if constexpr(able<T>)
7309 else
7310 return false;
7311 }
7312 public:
7313 template<class T>
7314 static inline constexpr bool nothrow = nothrow_helper<T>();
7315 //算数类型转任意类型
7316 template<class T> requires able<T>
7317 force_inline constexpr auto operator()(T&&v)const noexcept(nothrow<T>){
7318 return to_arithmetic_base(forward<T>(v));
7319 }
7321 //判断wchar_t是否和char_t相同
7322 inline constexpr bool wchar_t_same_as_char_t=sizeof(wchar_t)==sizeof(char_t);
7323 //判断wchar_t是否和char16_t相同
7324 inline constexpr bool wchar_t_same_as_char16_t=sizeof(wchar_t)==sizeof(char16_t);
7325
7326 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/add_sub_carry.hpp"
7327//add_sub_carry.hpp
7328/*
7329未完成的elc解释器_share文件
7330由steve02081504与Alex0125设计、编写
7331转载时请在不对此文件做任何修改的同时注明出处
7332项目地址:https://github.com/ELC-lang/ELC
7333*/
7334/*
7335 ,??????????????????????????
7336 ????????????????????????????
7337 ?????????????????????????????+
7338 ?????+++++++++++++++++++++++++
7339 ?????+++++++++++++++++++++++++
7340 ??????++++++++++++++++++++++++
7341 ?????++
7342 ?????+++
7343 ??????+++IIIIIIIIIIIIIIIIII
7344 ?????+++++IIIIIIIIIIIIIIIIII
7345 ?????++++++++++++++++++++++++
7346 ??????+++++++++++++++++++++++:
7347 ?????++
7348 ?????+++
7349 ??????++
7350 ??????????????????????????????II
7351 ??????????????????????????????IIII
7352 ,?????????????????????????????IIIII+
7353 =???++++++++++++++++++++++++++III?
7354 ?++++++++++++++++++++++++++++I+
7355*/
7356#if HAS_MSVC_INTRINSICS
7357 template<unsigned_basic_integer_type T>
7358 force_inline bool _msvc_builtin_add_carry(bool c_in, T a, T b, T*out)noexcept{
7359 if constexpr(sizeof(T) == 8)
7360 return _addcarry_u64(c_in, a, b, out);
7361 elseif constexpr(sizeof(T) == 4)
7362 return _addcarry_u32(c_in, a, b, out);
7363 elseif constexpr(sizeof(T) == 2)
7364 return _addcarry_u16(c_in, a, b, out);
7365 elseif constexpr(sizeof(T) == 1)
7366 return _addcarry_u8(c_in, a, b, out);
7367 }
7368 template<unsigned_basic_integer_type T>
7369 force_inline bool _msvc_builtin_sub_borrow(bool b_in, T a, T b, T*out)noexcept{
7370 if constexpr(sizeof(T) == 8)
7371 return _subborrow_u64(b_in, a, b, out);
7372 elseif constexpr(sizeof(T) == 4)
7374 elseif constexpr(sizeof(T) == 2)
7376 elseif constexpr(sizeof(T) == 1)
7378 }
7379#endif
7380// add carry
7381template<unsigned_basic_integer_type T>
7382constexpr force_inline bool add_carry(T a, T b, T& c)noexcept{
7383 if(!in_consteval){
7384 #if HAS_GCC_BUILTINS
7385 return __builtin_add_overflow(a, b, &c);
7386 #elif HAS_MSVC_INTRINSICS
7387 return _msvc_builtin_add_carry(0, a, b, &c);
7388 #elif HAS_X86_ASM
7389 //x86/x86-64
7390 __asm__ (
7391 "add %2, %1\n\t"
7392 "setc %0\n\t"
7393 : "=r"(c)
7394 : "r"(a), "r"(b)
7395 );
7396 return c;
7397 #elif HAS_ARM_ASM || HAS_ARM64_ASM
7398 //arm/arm64
7399 __asm__ (
7400 "adds %1, %1, %2\n\t"
7401 "adc %0, xzr, xzr\n\t"
7402 : "=r"(c)
7403 : "r"(a), "r"(b)
7404 );
7405 return c;
7406 #endif
7407 }
7408 c = a + b;
7409 return c < a;
7410}
7411template<unsigned_basic_integer_type T>
7412constexpr force_inline T add_carry(T a, T b, bool& is_overflow)noexcept{
7413 #if HAS_MSVC_INTRINSICS
7414 if(!in_consteval){
7416 return c;
7417 }
7418 else
7419 #endif
7420 {
7421 T c=a+is_overflow;
7422 if(c){
7424 return c;
7425 }
7426 else{
7427 //现在我们得知a+is_overflow的结果为0:
7428 //若is_overflow为true,溢出确实发生了,我们需要将is_overflow设置为true,所以什么都不用管
7429 //若is_overflow为false,溢出没有发生,我们需要将is_overflow设置为false,我们仍然什么都不用管
7430 return b;
7431 }
7432 }
7433}
7434template<unsigned_basic_integer_type T>
7435constexpr force_inline T add_carry(T a, bool& is_overflow)noexcept{
7436 #if HAS_MSVC_INTRINSICS
7437 if(!in_consteval){
7439 return c;
7440 }
7441 else
7442 #endif
7443 {
7444 T c=a+is_overflow;
7445 if(c)//若c为0,保持is_overflow不变(原理见上)
7446 is_overflow=false;
7447 return c;
7448 }
7449}
7450// sub borrow
7451template<unsigned_basic_integer_type T>
7452constexpr force_inline bool sub_borrow(T a, T b, T& c)noexcept{
7453 if(!in_consteval){
7454 #if HAS_GCC_BUILTINS
7455 return __builtin_sub_overflow(a, b, &c);
7456 #elif HAS_MSVC_INTRINSICS
7457 return _msvc_builtin_sub_borrow(0, a, b, &c);
7458 #elif HAS_X86_ASM
7459 //x86/x86-64
7460 __asm__ (
7461 "sub %2, %1\n\t"
7462 "setc %0\n\t"
7463 : "=r"(c)
7464 : "r"(a), "r"(b)
7465 );
7466 return c;
7467 #elif HAS_ARM_ASM || HAS_ARM64_ASM
7468 //arm/arm64
7469 __asm__ (
7470 "subs %1, %1, %2\n\t"
7471 "sbc %0, xzr, xzr\n\t"
7472 : "=r"(c)
7473 : "r"(a), "r"(b)
7474 );
7475 return c;
7476 #endif
7477 }
7478 c = a - b;
7479 return c > a;
7480}
7481template<unsigned_basic_integer_type T>
7482constexpr force_inline T sub_borrow(T a, T b, bool& is_underflow)noexcept{
7483 #if HAS_MSVC_INTRINSICS
7484 if(!in_consteval){
7486 return c;
7487 }
7488 else
7489 #endif
7490 {
7491 T c=b+is_underflow;
7492 if(c){
7494 return c;
7495 }
7496 else{
7497 //现在我们得知b+is_underflow的结果为0:
7498 //若is_underflow为true,溢出肯定该发生,我们需要将is_underflow设置为true,所以什么都不用管
7499 //若is_underflow为false,溢出不会发生,我们需要将is_underflow设置为false,我们仍然什么都不用管
7500 return a;
7501 }
7502 }
7503}
7504template<unsigned_basic_integer_type T>
7505constexpr force_inline T sub_borrow(T a, bool& is_underflow)noexcept{
7506 #if HAS_MSVC_INTRINSICS
7507 if(!in_consteval){
7509 return c;
7510 }
7511 else
7512 #endif
7513 {
7514 if(is_underflow){
7515 is_underflow=!a;
7516 return a-1;
7517 }
7518 else
7519 return a;
7520 }
7521}
7522
7523
7524//file_end
7525
7526 #line 148 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
7527
7528 namespace float_infos{
7529 template<basic_float_type T>
7534 template<basic_float_type T>
7535 constexpr data_type<T> get_float_data(T v)noexcept{
7537 tmp.v=v;
7538 return tmp.data;
7539 }
7540 template<basic_float_type T>
7541 constexpr T get_float_from_data(data_type<T> data)noexcept{
7543 tmp.data=data;
7544 return tmp.v;
7545 }
7546 }
7547 //自浮点数获取原生精确数部分,舍去指数和符号位
7548 template<basic_float_type T>
7549 force_inline constexpr auto get_native_precision(T v)noexcept{
7550 using namespace float_infos;
7551 auto tmp=get_float_data(v);
7553 return tmp;
7554 }
7555 //自浮点数获取精确数的基(如float是2^23,double是2^52,long double是2^112)
7556 template<basic_float_type T>
7557 force_inline constexpr auto get_precision_base(T=T{})noexcept{
7558 return float_infos::precision_base<T>;
7559 }
7560 template<basic_float_type T>
7562 template<basic_float_type T>
7564 //(基础的)自浮点数获取指数部分,舍去基数和符号位
7565 template<basic_float_type T>
7566 force_inline constexpr auto base_get_exponent(T v)noexcept{
7567 using namespace float_infos;
7568 auto tmp=get_float_data(v);
7572 }
7573 //自浮点数获取原生指数部分,舍去基数和符号位
7574 template<basic_float_type T>
7576 const auto tmp=base_get_exponent(v);
7577 using namespace float_infos;
7578 if(tmp==0)return exponent_min<T>;
7580 }
7581 //自浮点数获取基数
7582 template<basic_float_type T>
7584 //特殊情况处理(exp=0时,base=0)
7585 const auto tmp=base_get_exponent(v);
7587 }
7588 //自浮点数获取基数
7589 template<basic_float_type T>
7593 //自浮点数获取指数
7594 template<basic_float_type T>
7596 using namespace float_infos;
7598 }
7599 //自浮点数获取基数和指数
7600 template<basic_float_type T>
7601 force_inline constexpr auto get_precision_and_exponent(T v)noexcept{
7603 float_precision_base_t<T> precision;
7604 float_exponent_t<T> exponent;
7605 };
7606 const auto precision=get_precision(v);
7607 const auto exponent=get_exponent(v);
7609 }
7610 //阈值
7611 template<basic_float_type T>
7612 constexpr auto threshold_precision_bit=float_infos::precision_base_bit<T>+1;
7613 //自基数和指数构造浮点数
7614 //num=base_num*2^exponent
7615 template<basic_float_type T>
7617 using namespace float_infos;
7618 //首先将基数转换为precision_base(2^precision_base_bit)为分母的分数的分子
7619 //并在此过程中加减指数
7620 //需要注意的是,这里的基数是包含1的,所以转换目标是base_num>>precision_base_bit为1
7621 {
7622 const auto tmp=countl_zero(base_num);
7625 if(shift>0){
7626 base_num<<=shift;
7627 exponent-=shift;
7628 }
7629 elseif(shift<0){
7630 base_num>>=-shift;
7631 exponent-=shift;
7632 }
7633 }
7634 //适当放缩后,需要偏移指数部分,原因如下:
7635 //原有逻辑是num=base_num*2^exponent,这是大分数的表达逻辑
7636 //但是浮点数的逻辑是num=(base_num/precision_base)*2^exponent
7637 //将precision_base合并到exponent中,即可得到浮点数的逻辑
7639 if(exponent < exponent_min<T>){//指数过小,需要舍去
7640 const auto diff=exponent_min<T> - exponent;
7641 base_num>>=diff;
7642 exponent+=diff;
7643 if(!base_num)return 0;//基数过小,无法表示
7644 }
7645 if(exponent>exponent_max<T>)return 0;//指数过大,无法表示
7646 //DEN情况判断
7647 const bool is_den=!(base_num>>precision_base_bit<T>);//若基数最高位为0,则exponent一定为exponent_min,不用判断
7648 if(is_den)
7650 else{//非DEN情况下,根据浮点数表示规则去掉基数多余的1
7655 return get_float_from_data<T>(data);
7656 }
7657 }
7658 //若可以,将浮点数分解为两数之商
7659 template<basic_float_type T,size_t max_numerator = 1u<<7,size_t max_denominator = 1u<<17>
7660 force_inline constexpr auto to_divide(T v)noexcept{
7661 struct divide_t{
7662 T numerator;
7663 size_t denominator;
7664 bool is_success;
7665 constexpr divide_t(T numerator,size_t denominator)noexcept:is_success(true),numerator(numerator),denominator(denominator){}
7666 constexpr divide_t()noexcept:is_success(false),numerator(0),denominator(0){}
7667 [[nodiscard]]constexpr bool success()const noexcept{
7668 return is_success;
7669 }
7670 [[nodiscard]]constexpr explicit operator bool()const noexcept{
7671 return success();
7672 }
7673 };
7674 T integer_part;
7675 const auto fraction_part=std::modf(v,&integer_part);
7676 if(fraction_part==0)return divide_t{integer_part,1u};
7677 //开始测试分数
7678 size_t numerator=1;
7679 while(numerator<max_numerator){
7680 const auto denominator = to_size_t(numerator/fraction_part);
7681 if(denominator<=max_denominator)//忽略分母过大的情况
7682 if(is_close(T(numerator)/denominator,fraction_part))//近似相等即可
7683 if(gcd(numerator,denominator)==1)//不进行重复检查
7684 {
7685 //补正整数部分
7686 const auto numerator_with_inter = integer_part*denominator+numerator;
7687 //检查是否能够转换回
7688 const auto f_test = T(numerator_with_inter)/denominator;
7689 if(f_test==fraction_part)
7690 return divide_t{numerator_with_inter,denominator};
7691 }
7692 numerator++;
7693 }
7694 return divide_t{};
7695 }
7696 }
7697 using basic_environment::bit_type;
7698 using basic_environment::is_rounding_bit;
7699
7700 using basic_environment::basic_uintmax_t;
7701 using basic_environment::basic_intmax_t;
7702 using basic_environment::uintmax_index_t;
7703 using basic_environment::intmax_index_t;
7704 using basic_environment::uintmax_t;
7705 using basic_environment::intmax_t;
7706 #if defined(ELC_BASE_ENV_HAS_INT128)
7707 using basic_environment::uint128_t;
7708 using basic_environment::int128_t;
7709 using basic_environment::operator""_u128;
7710 using basic_environment::operator""_i128;
7711 #endif
7712 using basic_environment::is_elc_expansion_base_type;
7713
7714 using basic_environment::unsigned_specific_size_t;
7715 using basic_environment::unsigned_specific_size_fast_t;
7716 using basic_environment::signed_specific_size_t;
7717 using basic_environment::signed_specific_size_fast_t;
7718
7719 using basic_environment::to_arithmetic;
7720
7721 using basic_environment::wchar_t_same_as_char_t;
7722 using basic_environment::wchar_t_same_as_char16_t;
7723
7724 using basic_environment::add_carry;
7725 using basic_environment::sub_borrow;
7726
7727 using basic_environment::get_exponent;
7728 using basic_environment::get_precision;
7729 using basic_environment::float_precision_base_t;
7730 using basic_environment::float_exponent_t;
7731 using basic_environment::get_precision_and_exponent;
7732 using basic_environment::make_float;
7733 using basic_environment::to_divide;
7734
7735 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_undefs.hpp"
7736//_undefs.hpp
7737/*
7738未完成的elc解释器_share文件
7739由steve02081504与Alex0125设计、编写
7740转载时请在不对此文件做任何修改的同时注明出处
7741项目地址:https://github.com/ELC-lang/ELC
7742*/
7743/*
7744 ,??????????????????????????
7745 ????????????????????????????
7746 ?????????????????????????????+
7747 ?????+++++++++++++++++++++++++
7748 ?????+++++++++++++++++++++++++
7749 ??????++++++++++++++++++++++++
7750 ?????++
7751 ?????+++
7752 ??????+++IIIIIIIIIIIIIIIIII
7753 ?????+++++IIIIIIIIIIIIIIIIII
7754 ?????++++++++++++++++++++++++
7755 ??????+++++++++++++++++++++++:
7756 ?????++
7757 ?????+++
7758 ??????++
7759 ??????????????????????????????II
7760 ??????????????????????????????IIII
7761 ,?????????????????????????????IIIII+
7762 =???++++++++++++++++++++++++++III?
7763 ?++++++++++++++++++++++++++++I+
7764*/
7765
7766//defs at "_defs.hpp"
7767
7768#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
7769//_undefs.hpp
7770/*
7771未完成的elc解释器_share文件
7772由steve02081504与Alex0125设计、编写
7773转载时请在不对此文件做任何修改的同时注明出处
7774项目地址:https://github.com/ELC-lang/ELC
7775*/
7776/*
7777 ,??????????????????????????
7778 ????????????????????????????
7779 ?????????????????????????????+
7780 ?????+++++++++++++++++++++++++
7781 ?????+++++++++++++++++++++++++
7782 ??????++++++++++++++++++++++++
7783 ?????++
7784 ?????+++
7785 ??????+++IIIIIIIIIIIIIIIIII
7786 ?????+++++IIIIIIIIIIIIIIIIII
7787 ?????++++++++++++++++++++++++
7788 ??????+++++++++++++++++++++++:
7789 ?????++
7790 ?????+++
7791 ??????++
7792 ??????????????????????????????II
7793 ??????????????????????????????IIII
7794 ,?????????????????????????????IIIII+
7795 =???++++++++++++++++++++++++++III?
7796 ?++++++++++++++++++++++++++++I+
7797*/
7798
7799//defs at "_defs.hpp"
7800
7801#if defined(_MSC_VER)
7802 #pragma warning(pop)
7803#endif
7804//#undef suppress_msvc_warning
7805#undef disable_msvc_warning
7806#undef push_msvc_warning
7807#undef pop_msvc_warning
7808#undef push_and_disable_msvc_warning
7809#if defined(_MSC_VER)
7810 #pragma pack(pop)
7811#endif
7812#if defined(__GNUC__)
7813 #pragma GCC diagnostic pop
7814#endif
7815#if defined(_MSC_VER)
7816 #pragma pop_macro("new")
7817 #pragma pop_macro("delete")
7818 #pragma pop_macro("min")
7819 #pragma pop_macro("max")
7820 #pragma pop_macro("abs")
7821 #pragma pop_macro("export")
7822 #pragma pop_macro("rand")
7823 #pragma pop_macro("sqrt")
7824 #pragma pop_macro("type_info")
7825 #pragma pop_macro("elc")
7826#endif
7827
7828//
7829#if defined(ELC_VOID_NAME)
7830 #define void the_void
7831#endif
7832//
7833#if defined(ELC_PUBLIC_ALL)
7834 #undef protected
7835 #undef private
7836#endif
7837//
7838#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
7839 #define rand the_rand
7840#endif
7841
7842// #undef often_noexcept
7843#undef noexcept_as
7844#undef noexcept_as_auto
7845#undef constexpr_as
7846#undef constexpr_as_auto
7847
7848#undef using_method_from_base_t
7849#undef using_method_from_value
7850
7851#undef floop
7852#undef times
7853#undef debug_times
7854#undef enable_adl
7855
7856#undef re_declvalue
7857#undef re_decltype
7858
7859#undef declvalue
7860
7861#undef template_error
7862#undef template_error_of_type
7863#undef template_warning
7864
7865#undef type_info_of
7866#undef type_name_of
7867
7868#undef is_common_attribute
7869#undef is_special_attribute
7870
7871#undef has_attribute
7872#undef not_has_attribute
7873
7874#undef float_size_of
7875#undef bitnum_of
7876
7877#undef def_common_attribute_with_nothing
7878#undef def_special_attribute_with_nothing
7879
7880#undef common_attribute_t
7881#undef special_attribute_t
7882
7883#undef enable_if
7884#undef enabled_by_default
7885#undef disabled_by_default
7886#undef enable_if_not_ill_form
7887#undef enable_flag
7888
7889#undef was_an_ill_form
7890#undef was_an_ill_form_with_parameter
7891#undef was_not_an_ill_form
7892#undef was_not_an_ill_form_and_noexcept
7893#undef was_not_an_ill_form_with_parameter
7894
7895#undef recursive_λ
7896#undef get_recursive_λ_caller
7897#undef λ
7898#undef exλ
7899#undef λ_with_catch
7900#undef self_recursion
7901#undef λ_RLSRRS
7902#undef λ_inline
7903#undef λ_force_inline
7904
7905#undef MAGIC
7906
7907#undef nothing
7908
7909#undef elseif
7910#undef _big_than_
7911#undef _small_than_
7912
7913#if defined(_MSC_VER)
7914 #undef not
7915 #undef and
7916 #undef or
7917#endif
7918
7919#undef INTER_NAMESPACE
7920#undef BREAK_NAMESPACE
7921
7922#undef szie
7923#undef form
7924
7925#undef template_name
7926#undef type_name
7927
7928#undef not_in_debug
7929
7930#undef es
7931#undef ec
7932
7933#undef ELC_TEST_EVENTNAME
7934
7935#undef override_instance_struct
7936
7937#undef distinctive
7938
7939#undef force_inline
7940
7941#undef with_no_vtable
7942
7943#undef in_consteval
7944
7945#undef no_vtable_struct
7946#undef no_vtable_class
7947
7948//#undef get_elc_defs
7949
7950//file_end
7951
7952#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/_undefs.hpp"
7953
7954#undef HAS_GCC_BUILTINS
7955#undef HAS_MSVC_INTRINSICS
7956#undef HAS_X86_ASM
7957#undef HAS_X86_64_ASM
7958#undef HAS_ARM_ASM
7959#undef HAS_ARM64_ASM
7960
7961//file_end
7962
7963 #line 357 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/basic_environment/after_math.hpp"
7964}
7965
7966//file_end
7967
7968#line 89 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
7969namespace elc::defs{ //在elc::defs中定义内容
7970 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
7971//_defs.hpp
7972/*
7973未完成的elc解释器basic文件
7974由steve02081504与Alex0125设计、编写
7975转载时请在不对此文件做任何修改的同时注明出处
7976项目地址:https://github.com/ELC-lang/ELC
7977*/
7978/*
7979 ,??????????????????????????
7980 ????????????????????????????
7981 ?????????????????????????????+
7982 ?????+++++++++++++++++++++++++
7983 ?????+++++++++++++++++++++++++
7984 ??????++++++++++++++++++++++++
7985 ?????++
7986 ?????+++
7987 ??????+++IIIIIIIIIIIIIIIIII
7988 ?????+++++IIIIIIIIIIIIIIIIII
7989 ?????++++++++++++++++++++++++
7990 ??????+++++++++++++++++++++++:
7991 ?????++
7992 ?????+++
7993 ??????++
7994 ??????????????????????????????II
7995 ??????????????????????????????IIII
7996 ,?????????????????????????????IIIII+
7997 =???++++++++++++++++++++++++++III?
7998 ?++++++++++++++++++++++++++++I+
7999*/
8000#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
8001//_defs.hpp
8002/*
8003未完成的elc解释器_share文件
8004由steve02081504与Alex0125设计、编写
8005转载时请在不对此文件做任何修改的同时注明出处
8006项目地址:https://github.com/ELC-lang/ELC
8007*/
8008/*
8009 ,??????????????????????????
8010 ????????????????????????????
8011 ?????????????????????????????+
8012 ?????+++++++++++++++++++++++++
8013 ?????+++++++++++++++++++++++++
8014 ??????++++++++++++++++++++++++
8015 ?????++
8016 ?????+++
8017 ??????+++IIIIIIIIIIIIIIIIII
8018 ?????+++++IIIIIIIIIIIIIIIIII
8019 ?????++++++++++++++++++++++++
8020 ??????+++++++++++++++++++++++:
8021 ?????++
8022 ?????+++
8023 ??????++
8024 ??????????????????????????????II
8025 ??????????????????????????????IIII
8026 ,?????????????????????????????IIIII+
8027 =???++++++++++++++++++++++++++III?
8028 ?++++++++++++++++++++++++++++I+
8029*/
8030
8031//undefs at "_undefs.hpp"
8032
8033#if defined(ELC_CODE_REALM)
8034 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
8035#endif
8036
8037//set ELC_WARNING_LEVEL default to 4(max)
8038#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
8039
8040#if defined(_MSC_VER)
8041 #pragma warning(push,ELC_WARNING_LEVEL)
8042 #pragma warning(disable:4099)//class与struct混用警告diss
8043 #pragma warning(disable:4584)//重复子类警告diss
8044 #pragma warning(disable:4250)//域控制继承警告diss
8045 #pragma warning(disable:26432)//不完全默认方法警告diss
8046 #pragma warning(disable:26435)//virtual override方法警告diss
8047 #pragma warning(disable:26481)//容器安利diss
8048 #pragma warning(disable:26446)//gsl::at安利diss
8049 #pragma warning(disable:26434)//方法覆盖警告diss
8050 #pragma warning(disable:26429)//gsl::not_null安利diss
8051 #pragma warning(disable:26471)//对void*进行static_cast安利diss
8052 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
8053 #pragma warning(disable:26473)//相同指针显式cast警告diss
8054 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
8055 #pragma warning(disable:26485)//数组作指针警告diss
8056 #pragma warning(disable:26490)//reinterpret_cast警告diss
8057 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
8058 #pragma warning(disable:26482)//非常数数组索引警告diss
8059 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
8060#endif
8061#if defined(__GNUC__)
8062 #pragma GCC diagnostic push
8063 #pragma GCC diagnostic warning "-Wall"//开启所有警告
8064 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
8065#endif
8066#if defined(_MSC_VER)
8067 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
8068 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
8069 #define push_msvc_warning() __pragma(warning(push))
8070 #define pop_msvc_warning() __pragma(warning(pop))
8071 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
8072#else
8073 //#define suppress_msvc_warning(...)
8074 #define disable_msvc_warning(...)
8075 #define push_msvc_warning()
8076 #define pop_msvc_warning()
8077 #define push_and_disable_msvc_warning(...)
8078#endif
8079#if defined(_MSC_VER)
8080 //push pack settings
8081 #pragma pack(push)
8082 #pragma pack()
8083#endif
8084#if defined(_MSC_VER)
8085 //push and undef common macros
8086 #pragma push_macro("new")
8087 #undef new
8088 #pragma push_macro("delete")
8089 #undef delete
8090 #pragma push_macro("min")
8091 #undef min
8092 #pragma push_macro("max")
8093 #undef max
8094 #pragma push_macro("abs")
8095 #undef abs
8096 #pragma push_macro("export")
8097 #undef export
8098 #pragma push_macro("rand")
8099 #undef rand
8100 #pragma push_macro("sqrt")
8101 #undef sqrt
8102 #pragma push_macro("type_info")
8103 #undef type_info
8104 #pragma push_macro("elc")
8105 #undef elc
8106#endif
8107//
8108#if defined(ELC_VOID_NAME)
8109 #undef void
8110#endif
8111//
8112#if defined(ELC_PUBLIC_ALL)
8113 #define protected public
8114 #define private public
8115#endif
8116//
8117#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
8118 #undef rand
8119#endif
8120
8121// #define often_noexcept
8122#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
8123#define noexcept_as_auto MAGIC//哦现在有了
8124#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
8125#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
8126
8127#define using_method_from_base_t(name,...) \
8128template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
8129auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
8130{\
8131 return base_t::name(forward<Args>(rest)...);\
8132}\
8133
8134#define using_method_from_value(name,value_name,...) \
8135template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
8136auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
8137{\
8138 return value_name.name(forward<Args>(rest)...);\
8139}\
8140
8141#define floop while(__builtin_is_my_dick_still_there())
8142#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
8143#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
8144#if defined(_MSC_VER) && _MSC_VER>=1935
8145 //@see https://developercommunity.visualstudio.com/t/10193638
8146 #define enable_adl(name) template<typename=void>void name()noexcept=delete
8147#else
8148 #define enable_adl(name) void name()noexcept=delete
8149#endif
8150
8151#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
8152#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
8153
8154#define declvalue(...) (::std::declval<__VA_ARGS__>())
8155
8157#define template_error(reason) static_assert(template_error_helper<T>,reason)
8159#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
8161#define template_warning(reason) template_warning_helper<T>(reason)
8162
8163//for type_info
8164#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
8165#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
8166
8167#define is_common_attribute(name) public attribute<T,name<T>>
8168#define is_special_attribute(name) public attribute<T,name>
8169
8170#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
8171#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
8172
8173//for float_size_t
8174#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
8175//bitnum_of
8176#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
8177
8178//for attribute
8179#define def_common_attribute_with_nothing(name) \
8180template<typename T>\
8181class name{}\
8182
8183#define def_special_attribute_with_nothing(name) \
8184class name{}\
8185
8186#define common_attribute_t template<class>class
8187#define special_attribute_t class
8188
8197#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
8199#define enabled_by_default class enable_state=void
8201#define disabled_by_default class enable_state= ::std::enable_if_t<false>
8203#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
8205#define enable_flag class enable_state
8206
8207#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
8208#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
8209#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
8210#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
8211#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
8212
8214#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
8216#define get_recursive_λ_caller(name,...) \
8217exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
8218 return name(name,Args...);\
8219}
8221#define λ []
8223#define exλ [&]
8225#define λ_with_catch(...) [__VA_ARGS__]
8227#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
8228//recursive_λ_self_referential_reserved_symbolname
8229#define λ_RLSRRS _my_jb_super_sb_name_
8230
8231#if defined(_MSC_VER) && !defined(__clang__)
8232 #define λ_inline [[msvc::forceinline]]
8233 #define λ_force_inline [[msvc::forceinline]]
8234#elif
8235 #define λ_inline [[gnu::always_inline]]
8236 #define λ_force_inline [[gnu::always_inline]]
8237#else
8238 #define λ_inline
8239 #define λ_force_inline
8240#endif
8241
8242#define MAGIC//ahh,ko no tenno da!
8243
8245#define nothing
8246
8248#define elseif else if
8250#define _big_than_ >
8252#define _small_than_ <
8253
8254#if defined(_MSC_VER)
8255 #define not !
8256 #define and &&
8257 #define or ||
8258#endif
8259
8261#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
8263#define BREAK_NAMESPACE }
8264
8266#define template_name template
8268#define type_name class
8269
8270#if defined(DEBUG) || defined(_DEBUG)
8271 #define not_in_debug 0
8272 #define in_debug 1
8273#else
8274 #define not_in_debug 1
8275 #define in_debug 0
8276#endif
8277
8278#define es U""
8279#define ec(ch) U ## ch
8280
8281#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
8282 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
8283#else
8284 #define ELC_TEST_EVENTNAME(name)
8285#endif
8286
8287#define override_instance_struct \
8288protected:\
8289 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
8290 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
8291 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
8292 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
8293 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
8294
8295#if defined(_MSC_VER) && !defined(__clang__)
8296 #define distinctive __declspec(dllexport)
8297#else
8298 #define distinctive
8299#endif
8300
8301#if defined(_MSC_VER) && !defined(__clang__)
8302 #define force_inline __forceinline
8303#elif defined(__GNUC__) || defined(__clang__)
8304 #define force_inline __attribute__((always_inline)) inline
8305#else
8306 #define force_inline inline
8307#endif
8308
8309#if defined(_MSC_VER) && !defined(__clang__)
8310 #define with_no_vtable __declspec(novtable)
8311#else
8312 #define with_no_vtable
8313#endif
8314
8315#define in_consteval (::std::is_constant_evaluated())
8316
8317#define no_vtable_struct struct with_no_vtable
8318#define no_vtable_class class with_no_vtable
8319
8320//#define get_elc_defs using namespace ::elc::defs
8321
8322//file_end
8323
8324#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
8325
8326//file_end
8327
8328 #line 91 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
8329
8330
8331 namespace base{
8332 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/arithmetic_type_info_prover.hpp"
8333//arithmetic_type_info_prover.hpp
8334//at namespace elc::defs::base
8335/*
8336未完成的elc解释器base_defs文件
8337由steve02081504与Alex0125设计、编写
8338转载时请在不对此文件做任何修改的同时注明出处
8339项目地址:https://github.com/ELC-lang/ELC
8340*/
8341/*
8342 ,??????????????????????????
8343 ????????????????????????????
8344 ?????????????????????????????+
8345 ?????+++++++++++++++++++++++++
8346 ?????+++++++++++++++++++++++++
8347 ??????++++++++++++++++++++++++
8348 ?????++
8349 ?????+++
8350 ??????+++IIIIIIIIIIIIIIIIII
8351 ?????+++++IIIIIIIIIIIIIIIIII
8352 ?????++++++++++++++++++++++++
8353 ??????+++++++++++++++++++++++:
8354 ?????++
8355 ?????+++
8356 ??????++
8357 ??????????????????????????????II
8358 ??????????????????????????????IIII
8359 ,?????????????????????????????IIIII+
8360 =???++++++++++++++++++++++++++III?
8361 ?++++++++++++++++++++++++++++I+
8362*/
8363namespace math{
8364 template<typename T>
8366 //bool:是否是算数类型
8367 static constexpr bool is_arithmetic_type=::std::is_arithmetic_v<T> || is_elc_expansion_base_type<T>;
8368 //bool:是否是基础类型
8369 static constexpr bool is_basic_type=::std::is_arithmetic_v<T>;
8370 //bool:是否是大数类型
8371 static constexpr bool is_big_type=false;
8372 //bool:是否是浮点类型
8373 static constexpr bool is_float_type=::std::is_floating_point_v<T>;
8374 //浮点数类型:是指数记录法还是分数记录法
8375 static constexpr bool is_exponent_float_type=is_float_type;
8376 static constexpr bool is_fraction_float_type=false;
8377 //bool:是否是整数类型
8378 static constexpr bool is_integer_type=::std::is_integral_v<T>;
8379 //bool:是否是有符号类型
8380 static constexpr bool is_signed=::std::is_signed_v<T>;
8381 //bool:是否有NaN
8382 private:
8383 static constexpr bool has_quiet_NaN_helper()noexcept{
8384 if constexpr(is_arithmetic_type)
8385 return ::std::numeric_limits<T>::has_quiet_NaN;
8386 else
8387 return false;
8388 }
8389 static constexpr bool has_signaling_NaN_helper()noexcept{
8390 if constexpr(is_arithmetic_type)
8391 return ::std::numeric_limits<T>::has_signaling_NaN;
8392 else
8393 return false;
8394 }
8395 public:
8396 static constexpr bool has_quiet_NaN=has_quiet_NaN_helper();
8397 static constexpr bool has_signaling_NaN=has_signaling_NaN_helper();
8398 static constexpr bool has_NaN=has_quiet_NaN || has_signaling_NaN;
8399
8400 static constexpr auto quiet_NaN()noexcept requires(has_quiet_NaN){
8401 return ::std::numeric_limits<T>::quiet_NaN();
8402 }
8403 static constexpr auto signaling_NaN()noexcept requires(has_signaling_NaN){
8404 return ::std::numeric_limits<T>::signaling_NaN();
8405 }
8406 static constexpr auto NaN()noexcept requires(has_NaN){
8407 if constexpr(has_quiet_NaN)
8408 return quiet_NaN();
8409 else
8410 return signaling_NaN();
8411 }
8412 //bool:是否有inf
8413 private:
8414 static constexpr bool has_inf_helper()noexcept{
8415 if constexpr(is_arithmetic_type)
8416 return ::std::numeric_limits<T>::has_infinity;
8417 else
8418 return false;
8419 }
8420 public:
8421 static constexpr bool has_inf=has_inf_helper();
8422 static constexpr auto Inf()noexcept requires(has_inf){
8423 return ::std::numeric_limits<T>::infinity();
8424 }
8425 static constexpr auto negative_Inf()noexcept requires(has_inf){
8426 return -Inf();
8427 }
8428 public:
8429 //bool:是否有最小值
8430 static constexpr bool has_min=is_arithmetic_type;
8431 //bool:是否有最大值
8432 static constexpr bool has_max=is_arithmetic_type;
8433 public:
8434 static constexpr auto min()noexcept requires(has_min){
8435 if constexpr(is_float_type)
8436 return ::std::numeric_limits<T>::lowest();
8437 else
8438 return ::std::numeric_limits<T>::min();
8439 }
8440 static constexpr auto max()noexcept requires(has_max){
8441 return ::std::numeric_limits<T>::max();
8442 }
8443 public:
8444 //bool:是否有默认极限值
8445 static constexpr bool has_ε=is_arithmetic_type;
8446 public:
8447 static constexpr auto ε()noexcept requires(has_ε){
8448 return ::std::numeric_limits<T>::epsilon();
8449 }
8450 public:
8451 //对应的无符号和有符号类型
8452 using unsigned_type=decltype(λ{
8453 if constexpr(type_info<T> == type_info<bool>)
8454 return T();
8455 elseif constexpr(is_float_type)//基础浮点类型没有对应的无符号
8456 return T();
8457 elseif constexpr(is_integer_type)//考虑到charX_t,所有整数类型都应该过一遍make_unsigned_t
8458 return::std::make_unsigned_t<T>();
8459 }());
8460 using signed_type=decltype(λ{
8461 if constexpr(type_info<T> == type_info<bool>)
8462 return T();
8463 elseif constexpr(is_float_type)
8464 return T();
8465 elseif constexpr(is_integer_type)//同上
8466 return::std::make_signed_t<T>();
8467 }());
8468 //对应的浮点数类型
8469 using float_type=decltype(λ{
8470 if constexpr(is_float_type)
8471 return T();
8472 elseif constexpr(is_integer_type)
8473 return .0;
8474 }());
8475 //对应的整数类型
8476 using integer_type=decltype(λ{
8477 if constexpr(is_integer_type)
8478 return T();
8479 elseif constexpr(is_float_type)
8480 return 0;
8481 }());
8482 };
8483}
8485
8486//file_end
8487
8488 #line 95 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
8489 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/bit.hpp"
8490//bit.hpp
8491//at namespace elc::defs::base
8492/*
8493未完成的elc解释器base_defs文件
8494由steve02081504与Alex0125设计、编写
8495转载时请在不对此文件做任何修改的同时注明出处
8496项目地址:https://github.com/ELC-lang/ELC
8497*/
8498/*
8499 ,??????????????????????????
8500 ????????????????????????????
8501 ?????????????????????????????+
8502 ?????+++++++++++++++++++++++++
8503 ?????+++++++++++++++++++++++++
8504 ??????++++++++++++++++++++++++
8505 ?????++
8506 ?????+++
8507 ??????+++IIIIIIIIIIIIIIIIII
8508 ?????+++++IIIIIIIIIIIIIIIIII
8509 ?????++++++++++++++++++++++++
8510 ??????+++++++++++++++++++++++:
8511 ?????++
8512 ?????+++
8513 ??????++
8514 ??????????????????????????????II
8515 ??????????????????????????????IIII
8516 ,?????????????????????????????IIIII+
8517 =???++++++++++++++++++++++++++III?
8518 ?++++++++++++++++++++++++++++I+
8519*/
8520namespace bit{
8521 push_and_disable_msvc_warning(26475);//强制转换警告diss
8522 // npos!
8524 template<unsigned_basic_integer_type T>
8525 constexpr T npos_of=T(-1);
8527 constexpr auto npos=npos_of<size_t>;
8530 template<unsigned_basic_integer_type T>
8531 [[nodiscard]]force_inline constexpr auto rotl_nomod(const T v,const auto R)noexcept;
8532 #define rot_base(opt,antiopt) static_cast<T>(static_cast<T>(v opt r) | static_cast<T>(v antiopt (d - r)))
8535 template<unsigned_basic_integer_type T>
8536 [[nodiscard]]force_inline constexpr auto rotr_nomod(const T v,const auto r)noexcept{
8537 constexpr auto d = ::std::numeric_limits<T>::digits;
8538 if constexpr(unsigned_type<decltype(r)>){
8539 if(r)
8540 return rot_base(>>,<<);
8541 else
8542 return v;
8543 }
8544 else{
8545 if(r>0)
8546 return rot_base(>>,<<);
8547 elseif(r==0)
8548 return v;
8549 else//r<0
8550 return rotl_nomod(v,0-r);
8551 }
8552 }
8555 template<unsigned_basic_integer_type T>
8556 [[nodiscard]]force_inline constexpr auto rotl_nomod(const T v,const auto r)noexcept{
8557 constexpr auto d = ::std::numeric_limits<T>::digits;
8558 if constexpr(unsigned_type<decltype(r)>){
8559 if(r)
8560 return rot_base(<<,>>);
8561 else
8562 return v;
8563 }
8564 else{
8565 if(r>0)
8566 return rot_base(<<,>>);
8567 elseif(r==0)
8568 return v;
8569 else//r<0
8570 return rotr_nomod(v,0-r);
8571 }
8572 }
8573 #undef rot_base
8576 template<unsigned_basic_integer_type T>
8577 [[nodiscard]]force_inline constexpr auto rotr(const T v,const auto R)noexcept{
8578 constexpr auto d = ::std::numeric_limits<T>::digits;
8579 const auto r = mod(R,d);
8580 return rotr_nomod(v,r);
8581 }
8584 template<unsigned_basic_integer_type T>
8585 [[nodiscard]]force_inline constexpr auto rotl(const T v,const auto R)noexcept{
8586 constexpr auto d = ::std::numeric_limits<T>::digits;
8587 const auto r = mod(R,d);
8588 return rotl_nomod(v,r);
8589 }
8590 template<unsigned_basic_integer_type T>
8592 static constexpr auto rot_offset_npos = ::std::numeric_limits<T>::digits;//d
8593 size_t _offset;
8594 public:
8595 force_inline constexpr rot_iterator(size_t offset)noexcept:_offset(offset%rot_offset_npos){}
8597 _offset++;
8598 if(_offset==rot_offset_npos)
8599 _offset=0;
8600 return*this;
8601 }
8603 if(_offset==0)
8604 _offset=rot_offset_npos;
8605 _offset--;
8606 return*this;
8607 }
8608 force_inline constexpr rot_iterator operator++(int)noexcept{
8609 rot_iterator tmp(*this);
8610 operator++();
8611 return tmp;
8612 }
8613 force_inline constexpr rot_iterator operator--(int)noexcept{
8614 rot_iterator tmp(*this);
8615 operator--();
8616 return tmp;
8617 }
8618 [[nodiscard]]force_inline constexpr size_t value()const noexcept{
8619 return _offset;
8620 }
8621 };
8624 template<unsigned_basic_integer_type T>
8625 [[nodiscard]]force_inline constexpr auto rotl_nomod(const T v,const rot_iterator<T>&r)noexcept{
8626 return rotl_nomod(v,r.value());
8627 }
8630 template<unsigned_basic_integer_type T>
8631 [[nodiscard]]force_inline constexpr auto rotr_nomod(const T v,const rot_iterator<T>&r)noexcept{
8632 return rotr_nomod(v,r.value());
8633 }
8636 template<unsigned_basic_integer_type T>
8637 [[nodiscard]]force_inline constexpr auto rotl(const T v,const rot_iterator<T>&r)noexcept{
8638 return rotl_nomod(v,r);
8639 }
8642 template<unsigned_basic_integer_type T>
8643 [[nodiscard]]force_inline constexpr auto rotr(const T v,const rot_iterator<T>&r)noexcept{
8644 return rotr_nomod(v,r);
8645 }
8647 template<unsigned_basic_integer_type T>
8648 [[nodiscard]]force_inline constexpr size_t get_bitnum(const T v)noexcept{
8649 if constexpr(sizeof(T)!=1){//优化
8650 typedef unsigned_specific_size_t<sizeof(T)/2> half_t;
8651 constexpr size_t half_bitnum = bitnum_of(half_t);
8652 const half_t high = half_t(v>>half_bitnum);
8653 if(high)
8654 return half_bitnum+get_bitnum(high);
8655 else
8656 return get_bitnum(half_t(v));
8657 }
8658 else
8659 //默认通用实现
8660 return v?get_bitnum(T(v>>1))+1:0;
8661 }
8663 template<signed_basic_integer_type T>
8664 [[nodiscard]]force_inline constexpr size_t get_bitnum(const T v)noexcept{
8665 return get_bitnum(abs(v));
8666 }
8668 template<unsigned_basic_integer_type T>
8669 [[nodiscard]]force_inline constexpr size_t countl_zero(const T v)noexcept{
8670 if constexpr(sizeof(T)!=1){//优化
8671 typedef unsigned_specific_size_t<sizeof(T)/2> half_t;
8672 constexpr size_t half_bitnum = bitnum_of(half_t);
8673 const half_t high = half_t(v>>half_bitnum);
8674 if(high)
8675 return countl_zero(high);
8676 else
8677 return half_bitnum+countl_zero(half_t(v));
8678 }
8679 else
8680 //默认通用实现
8681 return bitnum_of(T)-get_bitnum(v);
8682 }
8684 template<unsigned_basic_integer_type T>
8685 [[nodiscard]]force_inline constexpr size_t countr_one(const T v)noexcept{
8686 if constexpr(sizeof(T)!=1){//优化
8687 typedef unsigned_specific_size_t<sizeof(T)/2> half_t;
8688 constexpr size_t half_bitnum = bitnum_of(half_t);
8689 const half_t low = half_t(v);
8690 if(low == half_t(-1))
8692 else
8693 return countr_one(low);
8694 }
8695 else
8696 //默认通用实现
8697 return v&1?countr_one(T(v>>1))+1:0;
8698 }
8700 template<unsigned_basic_integer_type T>
8701 [[nodiscard]]force_inline constexpr size_t countl_one(const T v)noexcept{
8702 if constexpr(sizeof(T)!=1){//优化
8703 typedef unsigned_specific_size_t<sizeof(T)/2> half_t;
8704 constexpr size_t half_bitnum = bitnum_of(half_t);
8705 const half_t high = half_t(v>>half_bitnum);
8706 if(high == half_t(-1))
8707 return half_bitnum+countl_one(half_t(v));
8708 else
8709 return countl_one(high);
8710 }
8711 else{
8712 //默认通用实现
8713 //return countl_zero(T(~v));,或者
8714 constexpr T first_bit = T(1)<<(bitnum_of(T)-1);
8715 return v&first_bit?countl_one(T(v<<1))+1:0;
8716 }
8717 }
8719 template<unsigned_basic_integer_type T>
8720 [[nodiscard]]force_inline constexpr size_t countr_zero(const T v)noexcept{
8721 if constexpr(sizeof(T)!=1){//优化
8722 typedef unsigned_specific_size_t<sizeof(T)/2> half_t;
8723 constexpr size_t half_bitnum = bitnum_of(half_t);
8724 const half_t low = half_t(v);
8725 if(low)
8726 return countr_zero(low);
8727 else
8729 }
8730 else
8731 //默认通用实现
8732 return countr_one(T(~v));
8733 }
8735 template<unsigned_basic_integer_type T>
8736 [[nodiscard]]force_inline constexpr bool all_bit_is_one(const T v)noexcept{
8737 return v==npos_of<T>;
8738 }
8740 template<unsigned_basic_integer_type T>
8741 [[nodiscard]]force_inline constexpr bool all_bit_is_zero(const T v)noexcept{
8742 return v;
8743 }
8744}
8745using bit::npos_of;
8746using bit::npos;
8747using bit::rotl;
8748using bit::rotr;
8749using bit::rotl_nomod;
8750using bit::rotr_nomod;
8751using bit::rot_iterator;
8752using bit::get_bitnum;
8753using bit::countl_zero;
8754using bit::countr_zero;
8755using bit::countl_one;
8756using bit::countr_one;
8759
8760//file_end
8761
8762 #line 96 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
8763 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/null_ptr.hpp"
8764//null_ptr.hpp
8765//at namespace elc::defs::base
8766/*
8767未完成的elc解释器base_defs文件
8768由steve02081504与Alex0125设计、编写
8769转载时请在不对此文件做任何修改的同时注明出处
8770项目地址:https://github.com/ELC-lang/ELC
8771*/
8772/*
8773 ,??????????????????????????
8774 ????????????????????????????
8775 ?????????????????????????????+
8776 ?????+++++++++++++++++++++++++
8777 ?????+++++++++++++++++++++++++
8778 ??????++++++++++++++++++++++++
8779 ?????++
8780 ?????+++
8781 ??????+++IIIIIIIIIIIIIIIIII
8782 ?????+++++IIIIIIIIIIIIIIIIII
8783 ?????++++++++++++++++++++++++
8784 ??????+++++++++++++++++++++++:
8785 ?????++
8786 ?????+++
8787 ??????++
8788 ??????????????????????????????II
8789 ??????????????????????????????IIII
8790 ,?????????????????????????????IIIII+
8791 =???++++++++++++++++++++++++++III?
8792 ?++++++++++++++++++++++++++++I+
8793*/
8794namespace null_ptr_n{
8799
8806
8807 enable_adl(the_get_null_ptr);
8808 template<typename T>
8809 [[nodiscard]]constexpr auto get_null_ptr()noexcept{
8810 push_and_disable_msvc_warning(26462);//貌似msvc在这里有bug
8811 constexpr auto null_as_T = static_cast<T*>(nullptr);
8814 elseif constexpr(type_info<T>.has_attribute(can_t_use_default_null_ptr)&&type_info<T>.not_has_attribute(force_use_default_null_ptr)){
8815 template_error("please overload the function the_get_null_ptr in the namespace where this type is defined.");
8816 return null_as_T;
8817 }
8818 else
8819 return null_as_T;
8821 }
8822
8823
8827 constexpr struct null_ptr_t{
8828 template<typename T>
8829 [[nodiscard]]constexpr_as(get_null_ptr<remove_cvref<T>>())auto base_get()const noexcept{return get_null_ptr<remove_cvref<T>>();}
8830 template<typename T>
8831 [[nodiscard]]constexpr_as(base_get<T>())operator T*()const noexcept{return down_cast<T*>(base_get<T>());}
8832 //constexpr operator decltype(nullptr)()const noexcept{return nullptr;}//提醒接口设计者注意null_ptr的重载版本.
8833 }null_ptr{};
8834
8835 template<typename T,typename U=decltype(*null_ptr.base_get<T>())>
8836 [[nodiscard]]auto operator==(T*a,null_ptr_t)noexcept{
8837 return null_ptr.base_get<T>()==static_cast<const remove_ref<U>*>(add_const(a));
8838 }
8839}
8843typedef decltype(null_ptr) null_ptr_t;
8844typedef decltype(nullptr) nullptr_t;
8845
8846//file_end
8847
8848 #line 97 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
8849 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/note.hpp"
8850//note.hpp
8851//at namespace elc::defs::base
8852/*
8853未完成的elc解释器base_defs文件
8854由steve02081504与Alex0125设计、编写
8855转载时请在不对此文件做任何修改的同时注明出处
8856项目地址:https://github.com/ELC-lang/ELC
8857*/
8858/*
8859 ,??????????????????????????
8860 ????????????????????????????
8861 ?????????????????????????????+
8862 ?????+++++++++++++++++++++++++
8863 ?????+++++++++++++++++++++++++
8864 ??????++++++++++++++++++++++++
8865 ?????++
8866 ?????+++
8867 ??????+++IIIIIIIIIIIIIIIIII
8868 ?????+++++IIIIIIIIIIIIIIIIII
8869 ?????++++++++++++++++++++++++
8870 ??????+++++++++++++++++++++++:
8871 ?????++
8872 ?????+++
8873 ??????++
8874 ??????????????????????????????II
8875 ??????????????????????????????IIII
8876 ,?????????????????????????????IIIII+
8877 =???++++++++++++++++++++++++++III?
8878 ?++++++++++++++++++++++++++++I+
8879*/
8880namespace note_n{
8881 #define def_note(name) \
8882 template<typename T>\
8883 struct name##_t{\
8884 T value;\
8885 force_inline constexpr name##_t(T a)noexcept:value(a){}\
8886 template<class U>\
8887 force_inline constexpr name##_t(name##_t<U>a)noexcept:value(a.value){}\
8888 force_inline explicit constexpr operator T()noexcept{return value;}\
8889 force_inline constexpr T operator()()noexcept{return value;}\
8890 };\
8891 template<typename T>\
8892 constexpr name##_t<T>name(T v){return{v};}
8893
8896 def_note(size_type);
8897
8898 #undef def_note
8900 constexpr size_t size(::size_t v){return{v};}
8901 constexpr struct fail_t{}fail{};
8902}
8903namespace note=note_n;
8904
8905//file_end
8906
8907 #line 98 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
8908 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/array_like.hpp"
8909//array_like.hpp
8910//at namespace elc::defs::base
8911/*
8912未完成的elc解释器base_defs文件
8913由steve02081504与Alex0125设计、编写
8914转载时请在不对此文件做任何修改的同时注明出处
8915项目地址:https://github.com/ELC-lang/ELC
8916*/
8917/*
8918 ,??????????????????????????
8919 ????????????????????????????
8920 ?????????????????????????????+
8921 ?????+++++++++++++++++++++++++
8922 ?????+++++++++++++++++++++++++
8923 ??????++++++++++++++++++++++++
8924 ?????++
8925 ?????+++
8926 ??????+++IIIIIIIIIIIIIIIIII
8927 ?????+++++IIIIIIIIIIIIIIIIII
8928 ?????++++++++++++++++++++++++
8929 ??????+++++++++++++++++++++++:
8930 ?????++
8931 ?????+++
8932 ??????++
8933 ??????????????????????????????II
8934 ??????????????????????????????IIII
8935 ,?????????????????????????????IIIII+
8936 =???++++++++++++++++++++++++++III?
8937 ?++++++++++++++++++++++++++++I+
8938*/
8939namespace array_like_n{
8940 enable_adl(size_of_array_like);
8941 template<class T>
8942 [[nodiscard]]inline constexpr size_t size_of_array_like(T&&)noexcept{return 1;}
8943 template<class T,size_t N>
8944 [[nodiscard]]inline constexpr size_t size_of_array_like(T(&)[N])noexcept{return N;}
8945 template<class T>
8946 [[nodiscard]]inline size_t size_of_array_like(::std::initializer_list<remove_cvref<T>>&a)noexcept{return a.size();}
8947
8948 enable_adl(begin_of_array_like);
8949 template<class T>
8950 [[nodiscard]]inline constexpr auto begin_of_array_like(T&&a)noexcept{return addressof(a);}
8951 template<class T,size_t N>
8952 [[nodiscard]]inline constexpr auto begin_of_array_like(T(&a)[N])noexcept{return addressof(a[0]);}
8953 template<class T>
8954 [[nodiscard]]inline const T* begin_of_array_like(::std::initializer_list<remove_cvref<T>>&a)noexcept{return a.begin();}
8955
8956 enable_adl(end_of_array_like);
8957 template<class T>
8958 [[nodiscard]]inline auto end_of_array_like(T&&a)noexcept{return begin_of_array_like(a)+size_of_array_like(a);}
8959
8960 template<class T>
8962 (T v){
8965 }
8966 );
8967
8968 template<class T>
8970 template<class T>
8972
8973 template<class T,class U>
8975 (U v){
8976 begin_of_array_like<T>(v);
8977 size_of_array_like<T>(v);
8978 }
8979 );
8980 template<class T,class U>
8981 constexpr bool is_array_like_for=strict_is_array_like_for<T,U>||strict_is_array_like_for<const T,U>;
8982
8983 static_assert(is_array_like_for<int,::std::initializer_list<int>>);
8984
8985 template<class T>
8987 typedef T* iterator;
8988 typedef const T* const_iterator;
8991 T* _m;
8992 constexpr reverse_iterator(T*p)noexcept:_m(p){}
8993 constexpr reverse_iterator(const reverse_iterator&)noexcept=default;
8994 constexpr reverse_iterator(reverse_iterator&&)noexcept=default;
8995 constexpr reverse_iterator operator++()noexcept{_m--;return *this;}
8996 constexpr reverse_iterator operator--()noexcept{_m++;return *this;}
8997 constexpr reverse_iterator operator++(int)noexcept{auto tmp=*this;this->operator++();return tmp;}
8998 constexpr reverse_iterator operator--(int)noexcept{auto tmp=*this;this->operator--();return tmp;}
8999 [[nodiscard]]constexpr T& operator*()const noexcept{return*_m;}
9000 [[nodiscard]]constexpr T& operator[](ptrdiff_t a)const noexcept{return*(_m-a);}
9001 [[nodiscard]]constexpr T* operator->()const noexcept{return _m;}
9002 [[nodiscard]]constexpr reverse_iterator operator+(ptrdiff_t diff)const noexcept{return _m-diff;}
9003 [[nodiscard]]constexpr reverse_iterator operator-(ptrdiff_t diff)const noexcept{return _m+diff;}
9004 [[nodiscard]]constexpr operator T*()const noexcept{return _m;}
9005 [[nodiscard]]constexpr bool operator==(T*p)const noexcept{return _m==p;}
9006 [[nodiscard]]constexpr bool operator==(const reverse_iterator&a)const noexcept{return _m==a._m;}
9007 [[nodiscard]]constexpr auto operator<=>(T*p)noexcept{return _m<=>p;}
9008 [[nodiscard]]constexpr bool operator<=>(const reverse_iterator&a)const noexcept{return a._m<=>_m;}
9009 };
9010 private:
9011 T*_begin=nullptr;
9012 size_t _size=0;
9013 public:
9014 constexpr explicit array_like_view_t(T*a,size_t b)noexcept:_begin(a),_size(b){}
9015 constexpr explicit array_like_view_t(T*a,note::size_t b)noexcept:array_like_view_t(a,b()){}
9016 template<class U> requires strict_is_array_like_for<T,U>
9017 explicit constexpr_as_auto array_like_view_t(U&&a)noexcept_as(begin_of_array_like<T>(a),size_of_array_like<T>(a)):array_like_view_t(begin_of_array_like<T>(a),size_of_array_like<T>(a)){}
9018 constexpr array_like_view_t(const this_t&)noexcept=default;
9019
9020 void swap_with(this_t&b)noexcept_as(swap(_begin,b._begin),swap(_size,b._size)){
9021 swap(_begin,b._begin);
9022 swap(_size,b._size);
9023 }
9024
9025 [[nodiscard]]constexpr const_iterator data()const noexcept{return _begin;}
9026 [[nodiscard]]constexpr size_t size()const noexcept{return _size;}
9027
9028 [[nodiscard]]constexpr iterator begin()noexcept requires(type_info<iterator>!=type_info<const_iterator>){return _begin;}
9029 [[nodiscard]]constexpr iterator end()noexcept requires(type_info<iterator>!=type_info<const_iterator>){return begin()+size();}
9030 [[nodiscard]]constexpr const_iterator begin()const noexcept{return _begin;}
9031 [[nodiscard]]constexpr const_iterator end()const noexcept{return begin()+size();}
9032
9033 [[nodiscard]]constexpr const_iterator cbegin()const noexcept{return remove_const(this)->begin();}
9034 [[nodiscard]]constexpr const_iterator cend()const noexcept{return remove_const(this)->end();}
9035
9036 [[nodiscard]]constexpr reverse_iterator rbegin()noexcept{return _begin+size()-1;}
9037 [[nodiscard]]constexpr reverse_iterator rend()noexcept{return _begin-1;}
9038
9039 [[nodiscard]]constexpr T&front()noexcept{return _begin[0];}
9040 [[nodiscard]]constexpr const T&front()const noexcept{return _begin[0];}
9041 [[nodiscard]]constexpr T&back()noexcept{return _begin[size()-1];}
9042 [[nodiscard]]constexpr const T&back()const noexcept{return _begin[size()-1];}
9043
9044 [[nodiscard]]constexpr bool empty()const noexcept{return!size();}
9045
9046 [[nodiscard]]constexpr T&operator[](size_t pos)noexcept{return begin()[pos];}
9047 [[nodiscard]]constexpr const T&operator[](size_t pos)const noexcept{return remove_const(*this)[pos];}
9048
9049 [[nodiscard]]constexpr auto operator<=>(this_t a)const noexcept(compare.nothrow<T>){
9050 return compare(_begin,_size,a._begin,a._size);
9051 }
9052 [[nodiscard]]constexpr auto operator==(this_t a)const noexcept(equal.nothrow<T>){
9053 return equal(_begin,_size,a._begin,a._size);
9054 }
9055
9056 [[nodiscard]]constexpr this_t subview(size_t pos,size_t end_pos)noexcept{
9057 if(end_pos>size())end_pos=size();
9058 if(pos>end_pos)pos=end_pos;
9059 return this_t{_begin+pos,end_pos-pos};
9060 }
9061 [[nodiscard]]constexpr this_t subview(size_t pos)noexcept{
9062 if(pos>size())pos=size();
9063 return this_t{_begin+pos,size()-pos};
9064 }
9065 [[nodiscard]]constexpr operator array_like_view_t<const T>()const noexcept{
9066 return array_like_view_t<const T>{_begin,_size};
9067 }
9068 };
9069 template<typename T>
9072 using base_t::base_t;
9073
9074 [[nodiscard]]static constexpr size_t get_length_of(T*ptr)noexcept{
9075 if(*ptr)return get_length_of(ptr+1)+1;
9076 else return 0;
9077 }
9078
9079 constexpr array_end_by_zero_t(T*ptr)noexcept:base_t(ptr,get_length_of(ptr)){}
9080 };
9081
9082 template<class T>
9083 [[nodiscard]]inline constexpr T* begin_of_array_like(array_like_view_t<T>&a)noexcept requires(type_info<T>!=type_info<const T>){return a.begin();}
9084 template<class T>
9085 [[nodiscard]]inline constexpr auto begin_of_array_like(const array_like_view_t<T>&a)noexcept{return a.begin();}
9086 template<class T>
9087 [[nodiscard]]inline constexpr T* begin_of_array_like(array_like_view_t<remove_cv<T>>&a)noexcept{return a.begin();}
9088 template<class T>
9089 [[nodiscard]]inline constexpr size_t size_of_array_like(const array_like_view_t<T>&a)noexcept{return a.size();}
9090}
9094using array_like_n::is_array_like;
9095using array_like_n::is_signal_value_for_array_like;
9096using array_like_n::is_not_signal_value_for_array_like;
9101
9102//file_end
9103
9104 #line 99 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
9105 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/data.hpp"
9106//data.hpp
9107//at namespace elc::defs::base
9108/*
9109未完成的elc解释器base_defs文件
9110由steve02081504与Alex0125设计、编写
9111转载时请在不对此文件做任何修改的同时注明出处
9112项目地址:https://github.com/ELC-lang/ELC
9113*/
9114/*
9115 ,??????????????????????????
9116 ????????????????????????????
9117 ?????????????????????????????+
9118 ?????+++++++++++++++++++++++++
9119 ?????+++++++++++++++++++++++++
9120 ??????++++++++++++++++++++++++
9121 ?????++
9122 ?????+++
9123 ??????+++IIIIIIIIIIIIIIIIII
9124 ?????+++++IIIIIIIIIIIIIIIIII
9125 ?????++++++++++++++++++++++++
9126 ??????+++++++++++++++++++++++:
9127 ?????++
9128 ?????+++
9129 ??????++
9130 ??????????????????????????????II
9131 ??????????????????????????????IIII
9132 ,?????????????????????????????IIIII+
9133 =???++++++++++++++++++++++++++III?
9134 ?++++++++++++++++++++++++++++I+
9135*/
9139template<basic_integer_type T>
9140constexpr auto number_of_possible_values_per=uintmax_index_t(max(type_info<::std::make_unsigned_t<T>>))+1;
9141
9146template<class T>
9147[[nodiscard]]force_inline constexpr T&data_cast(byte*p)noexcept{return*reinterpret_cast<T*>(p);}
9148template<class T>
9149[[nodiscard]]force_inline constexpr T&launder_data_cast(byte*p)noexcept{return*::std::launder(data_cast<T>(p));}
9154template<class T>
9155[[nodiscard]]force_inline constexpr T*data_ptr_cast(byte*p)noexcept{return reinterpret_cast<T*>(p);}
9156template<class T>
9157[[nodiscard]]force_inline constexpr T*launder_data_ptr_cast(byte*p)noexcept{return ::std::launder(data_ptr_cast<T>(p));}
9162template<class T>
9163[[nodiscard]]force_inline constexpr byte*cast_to_data(T*p)noexcept{return reinterpret_cast<byte*>(p);}
9164template<class T>
9165[[nodiscard]]force_inline constexpr byte*launder_cast_to_data(T*p)noexcept{return ::std::launder(cast_to_data(p));}
9170template<class T>
9171[[nodiscard]]force_inline constexpr const byte*cast_to_data(const T*p)noexcept{return reinterpret_cast<const byte*>(p);}
9172template<class T>
9173[[nodiscard]]force_inline constexpr const byte*launder_cast_to_data(const T*p)noexcept{return ::std::launder(cast_to_data(p));}
9178template<class U,class T>
9179[[nodiscard]]force_inline constexpr U&union_cast(T&&t)noexcept{return*reinterpret_cast<U*>(&t);}
9180template<class U,class T>
9181[[nodiscard]]force_inline constexpr U&launder_union_cast(T&&t)noexcept{return*::std::launder(union_cast<U>(t));}
9182
9186template<class...Ts>
9187inline constexpr size_t max_align_of=max({alignof(Ts)...});
9191template<class...Ts>
9192inline constexpr size_t max_size_of=max({sizeof(Ts)...});
9193//byteset
9194template<size_t byte_num,size_t align=alignof(byte)>
9197 alignas(align)byte _data[byte_num];
9199
9201 force_inline constexpr byteset()noexcept{
9202 if in_consteval
9203 for(size_t i=0;i<byte_num;++i)
9204 _data[i]=byte{};
9205 };
9206 template<class T> requires(sizeof(T)<=byte_num&&alignof(T)<=align)
9207 force_inline constexpr byteset(T&&t)noexcept{
9208 data_cast<T>(_data)=forward<T>(t);
9209 if constexpr(sizeof(T)<byte_num)
9210 if in_consteval
9211 for(size_t i=sizeof(T);i<byte_num;++i)
9212 _data[i]=byte{};
9213 }
9215 force_inline constexpr operator byte*()noexcept{return _data;}
9216 force_inline constexpr operator const byte*()const noexcept{return _data;}
9217 template<class T> requires(sizeof(T)<=byte_num&&alignof(T)<=align)
9218 force_inline constexpr auto&operator=(T&&t)noexcept{
9219 return data_cast<remove_cvref<T>>(_data)=forward<T>(t);
9220 }
9221 //begin & end
9222 force_inline constexpr byte*begin()noexcept{return _data;}
9223 force_inline constexpr byte*end()noexcept{return _data+byte_num;}
9224 force_inline constexpr const byte*begin()const noexcept{return _data;}
9225 force_inline constexpr const byte*end()const noexcept{return _data+byte_num;}
9226};
9232template<class...Ts>
9233struct data_block:byteset<max_size_of<Ts...>,max_align_of<Ts...>>{
9234 static constexpr size_t size=max_size_of<Ts...>;
9235 static constexpr size_t align=max_align_of<Ts...>;
9236};
9241template<class...Ts>
9242struct alignas(max_align_of<Ts...>)align_as_t{};
9244
9249template<class T>
9251 using array_like_view_t<byte>::array_like_view_t;
9252 constexpr data_view(T*p)noexcept:array_like_view_t<byte>{cast_to_data(p),sizeof(T)}{}
9253};
9254template<class T>
9255struct data_view<const T>:array_like_view_t<const byte>{
9256 using array_like_view_t<const byte>::array_like_view_t;
9257 constexpr data_view(const T*p)noexcept:array_like_view_t<const byte>{cast_to_data(p),sizeof(T)}{}
9258};
9259
9264template<class T>
9265[[nodiscard]]constexpr bool full_equal_in_byte(const T&a,const T&b)noexcept{
9266 return equal(cast_to_data(&a),cast_to_data(&b),sizeof(T));
9267}
9268
9269//file_end
9270
9271 #line 100 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
9272 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/pointer.hpp"
9273//pointer.hpp
9274//at namespace elc::defs::base
9275/*
9276未完成的elc解释器base_defs文件
9277由steve02081504与Alex0125设计、编写
9278转载时请在不对此文件做任何修改的同时注明出处
9279项目地址:https://github.com/ELC-lang/ELC
9280*/
9281/*
9282 ,??????????????????????????
9283 ????????????????????????????
9284 ?????????????????????????????+
9285 ?????+++++++++++++++++++++++++
9286 ?????+++++++++++++++++++++++++
9287 ??????++++++++++++++++++++++++
9288 ?????++
9289 ?????+++
9290 ??????+++IIIIIIIIIIIIIIIIII
9291 ?????+++++IIIIIIIIIIIIIIIIII
9292 ?????++++++++++++++++++++++++
9293 ??????+++++++++++++++++++++++:
9294 ?????++
9295 ?????+++
9296 ??????++
9297 ??????????????????????????????II
9298 ??????????????????????????????IIII
9299 ,?????????????????????????????IIIII+
9300 =???++++++++++++++++++++++++++III?
9301 ?++++++++++++++++++++++++++++I+
9302*/
9303
9307template<typename T>
9308[[nodiscard]]constexpr auto pointer_to_bool(T*a)noexcept{
9310 return the_pointer_to_bool(a);
9311 else
9312 return null_ptr!=a;
9313}
9314
9318template<typename T>
9319[[nodiscard]]constexpr auto pointer_equal(T*a,T*b)noexcept{
9321 return the_pointer_equal(a,b);
9322 else
9323 return a==b;
9324}
9325
9327template<class T>
9328concept is_pointer= ::std::is_pointer_v<T>;
9330typedef void*pointer;
9332typedef const void*const_pointer;
9333
9339template<class T>
9340[[nodiscard]]constexpr auto apply_off_set(T*a,ptrdiff_t c)noexcept{
9341 return cast_to_data(a)+c;//a+c == b
9342}
9344template<class T>
9345[[nodiscard]]constexpr auto unapply_off_set(T*b,ptrdiff_t c)noexcept{
9346 return cast_to_data(b)-c;//b-c == a
9347}
9348
9349//file_end
9350
9351 #line 101 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
9352 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/zero.hpp"
9353//zero.hpp
9354//at namespace elc::defs::base
9355/*
9356未完成的elc解释器base_defs文件
9357由steve02081504与Alex0125设计、编写
9358转载时请在不对此文件做任何修改的同时注明出处
9359项目地址:https://github.com/ELC-lang/ELC
9360*/
9361/*
9362 ,??????????????????????????
9363 ????????????????????????????
9364 ?????????????????????????????+
9365 ?????+++++++++++++++++++++++++
9366 ?????+++++++++++++++++++++++++
9367 ??????++++++++++++++++++++++++
9368 ?????++
9369 ?????+++
9370 ??????+++IIIIIIIIIIIIIIIIII
9371 ?????+++++IIIIIIIIIIIIIIIIII
9372 ?????++++++++++++++++++++++++
9373 ??????+++++++++++++++++++++++:
9374 ?????++
9375 ?????+++
9376 ??????++
9377 ??????????????????????????????II
9378 ??????????????????????????????IIII
9379 ,?????????????????????????????IIIII+
9380 =???++++++++++++++++++++++++++III?
9381 ?++++++++++++++++++++++++++++I+
9382*/
9386constexpr struct zero_t{
9387 template<class T> requires(type_info<decltype(0)>.can_convert_to<T>)
9388 operator T()const noexcept(type_info<decltype(0)>.can_nothrow_convert_to<T>){return 0;}
9390
9398template<class T>
9399inline constexpr bool is_all_byte_zero(T&&a)noexcept{
9400 const byte*ptr=cast_to_data(addressof(a));
9401 const byte*end=ptr+sizeof(a);
9402 while(ptr!=end)
9403 if((unsigned char)(*ptr++))
9404 return false;
9405 return true;
9406}
9407
9408//file_end
9409
9410 #line 102 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
9411 }
9412
9413 namespace memory{
9414 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/_body.hpp"
9415//_body.hpp
9416//at namespace elc::defs::memory
9417/*
9418未完成的elc解释器base文件
9419由steve02081504与Alex0125设计、编写
9420转载时请在不对此文件做任何修改的同时注明出处
9421项目地址:https://github.com/ELC-lang/ELC
9422*/
9423/*
9424 ,??????????????????????????
9425 ????????????????????????????
9426 ?????????????????????????????+
9427 ?????+++++++++++++++++++++++++
9428 ?????+++++++++++++++++++++++++
9429 ??????++++++++++++++++++++++++
9430 ?????++
9431 ?????+++
9432 ??????+++IIIIIIIIIIIIIIIIII
9433 ?????+++++IIIIIIIIIIIIIIIIII
9434 ?????++++++++++++++++++++++++
9435 ??????+++++++++++++++++++++++:
9436 ?????++
9437 ?????+++
9438 ??????++
9439 ??????????????????????????????II
9440 ??????????????????????????????IIII
9441 ,?????????????????????????????IIIII+
9442 =???++++++++++++++++++++++++++III?
9443 ?++++++++++++++++++++++++++++I+
9444*/
9445#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/defs.hpp"
9446//defs.hpp
9447//at namespace elc::defs::memory
9448/*
9449未完成的elc解释器base文件
9450由steve02081504与Alex0125设计、编写
9451转载时请在不对此文件做任何修改的同时注明出处
9452项目地址:https://github.com/ELC-lang/ELC
9453*/
9454/*
9455 ,??????????????????????????
9456 ????????????????????????????
9457 ?????????????????????????????+
9458 ?????+++++++++++++++++++++++++
9459 ?????+++++++++++++++++++++++++
9460 ??????++++++++++++++++++++++++
9461 ?????++
9462 ?????+++
9463 ??????+++IIIIIIIIIIIIIIIIII
9464 ?????+++++IIIIIIIIIIIIIIIIII
9465 ?????++++++++++++++++++++++++
9466 ??????+++++++++++++++++++++++:
9467 ?????++
9468 ?????+++
9469 ??????++
9470 ??????????????????????????????II
9471 ??????????????????????????????IIII
9472 ,?????????????????????????????IIIII+
9473 =???++++++++++++++++++++++++++III?
9474 ?++++++++++++++++++++++++++++I+
9475*/
9476namespace lifetime_n{
9477 class copy_t;
9478
9479 class move_t;
9480 //
9481
9482 template<class T>
9483 class construct_t;
9484 template<class T,class...Args>
9485 concept construct_able=::std::is_constructible_v<T,Args...>;
9486 template<class T,class...Args>
9487 concept construct_nothrow=::std::is_nothrow_constructible_v<T,Args...>;
9488 template<class T,class...Args>
9489 concept construct_trivial=::std::is_trivially_constructible_v<T,Args...>;
9490
9491 class destruct_t;
9492 template<class T>
9493 concept destruct_able=::std::is_destructible_v<T>;
9494 template<class T>
9495 concept destruct_nothrow=::std::is_nothrow_destructible_v<T>;
9496 template<class T>
9497 concept destruct_trivial=::std::is_trivially_destructible_v<T>;
9498 //
9499
9500 class copy_construct_t;
9501 template<class T>
9502 concept copy_construct_able=::std::is_copy_constructible_v<T>;
9503 template<class T>
9504 concept copy_construct_nothrow=::std::is_nothrow_copy_constructible_v<T>;
9505 template<class T>
9506 concept copy_construct_trivial=::std::is_trivially_copy_constructible_v<T>;
9507
9508 class move_construct_t;
9509 template<class T>
9510 concept move_construct_able=::std::is_move_constructible_v<T>;
9511 template<class T>
9512 concept move_construct_nothrow=::std::is_nothrow_move_constructible_v<T>;
9513 template<class T>
9514 concept move_construct_trivial=::std::is_trivially_move_constructible_v<T>;
9515 //
9516
9517 class copy_assign_t;
9518 template<class T>
9519 concept copy_assign_able=::std::is_copy_assignable_v<T>;
9520 template<class T>
9521 concept copy_assign_nothrow=::std::is_nothrow_copy_assignable_v<T>;
9522 template<class T>
9523 concept copy_assign_trivial=::std::is_trivially_copy_assignable_v<T>;
9524
9525 class move_assign_t;
9526 template<class T>
9527 concept move_assign_able=::std::is_move_assignable_v<T>;
9528 template<class T>
9529 concept move_assign_nothrow=::std::is_nothrow_move_assignable_v<T>;
9530 template<class T>
9531 concept move_assign_trivial=::std::is_trivially_move_assignable_v<T>;
9532 //
9533
9534 template<class T> requires ::std::is_trivially_copyable_v<T>
9535 force_inline T* super_speed_trivial_copy_from_one(T*to,const T&value,size_t size)noexcept{
9536 if constexpr(sizeof(T)==sizeof(unsigned char))
9537 ::std::memset((unsigned char*)to,(unsigned char)value,size);
9538 elseif constexpr(sizeof(T)==sizeof(wchar_t))
9539 ::std::wmemset((wchar_t*)to,(wchar_t)value,size);
9540 else
9541 if(is_all_byte_zero(value))
9542 ::std::memset(to,zero,size*sizeof(T));
9543 else
9544 ::std::fill_n(to,size,value);
9545 return to;
9546 }
9547 template<class T> requires ::std::is_trivially_copyable_v<T>
9548 force_inline T* super_speed_trivial_copy_from_one(T*to,const T&value)noexcept{
9549 if constexpr(sizeof(T)>=sizeof(::std::max_align_t))
9550 if(is_all_byte_zero(value))
9551 ::std::memset(to,zero,sizeof(T));
9552 else
9553 *to=value;
9554 else
9555 *to=value;
9556 return to;
9557 }
9558
9567 template<typename T>
9570 template<class...Args>
9571 static constexpr bool able=construct_able<T,Args...>;
9572 template<class...Args>
9573 static constexpr bool nothrow=construct_nothrow<T,Args...>;
9574 template<class...Args>
9575 static constexpr bool trivial=construct_trivial<T,Args...>;
9576
9577 template<class...Args> requires able<Args...>
9578 [[nodiscard]]force_inline T operator()(Args&&...rest)const noexcept(nothrow<Args...>){
9579 return T(forward<Args>(rest)...);
9580 }
9583 size_t _size;
9584 constexpr void never_in_array_check()const noexcept{
9585 if constexpr(type_info<T>.has_attribute(never_in_array))
9586 template_error("You can\'t construct an array for never_in_array type.");
9587 }
9588 template<class...Args> requires able<Args...>
9589 force_inline void base_call(Args&&...rest)const noexcept(nothrow<Args...>){
9590 auto tmp=_size;
9591 while(tmp--)new(_to+tmp)T(forward<Args>(rest)...);
9592 }
9593 template<class...Args> requires able<Args...>
9594 force_inline T* operator()(Args&&...rest)const noexcept(nothrow<Args...>){
9595 never_in_array_check();
9596 base_call(forward<Args>(rest)...);
9597 return _to;
9598 }
9599 //复制构造速度优化
9600 force_inline T* operator()(const T&v)const noexcept(nothrow<const T&>)requires able<const T&>{
9601 never_in_array_check();
9602 if constexpr(trivial<const T&> && ::std::is_trivially_copyable_v<T>)
9604 else
9605 base_call(forward<const T&>(v));
9606 return _to;
9607 }
9608 //默认构造逻辑优化
9609 force_inline T* operator()()const noexcept(nothrow<>)requires able<>{
9610 never_in_array_check();
9611 if constexpr(!trivial<>)
9612 base_call();
9613 return _to;
9614 }
9615 };
9618 template<class...Args> requires able<Args...>
9619 force_inline void base_call(Args&&...rest)const noexcept(nothrow<Args...>){
9620 new(_to)T(forward<Args>(rest)...);
9621 }
9622 template<class...Args> requires able<Args...>
9623 force_inline T* operator()(Args&&...rest)const noexcept(nothrow<Args...>){
9624 base_call(forward<Args>(rest)...);
9625 return _to;
9626 }
9627 //复制构造速度优化
9628 force_inline T* operator()(const T&v)const noexcept(nothrow<const T&>)requires able<const T&>{
9629 if constexpr(trivial<const T&> && ::std::is_trivially_copyable_v<T>)
9631 else
9632 base_call(forward<const T&>(v));
9633 return _to;
9634 }
9635 //默认构造逻辑优化
9636 force_inline T* operator()()const noexcept(nothrow<>)requires able<>{
9637 if constexpr(!trivial<>)
9638 base_call();
9639 return _to;
9640 }
9641 [[nodiscard]]force_inline constexpr array_construct_t operator[](size_t size)const noexcept{return{_to,size};}
9642 };
9643 [[nodiscard]]force_inline constexpr placement_construct_t operator[](T*p)const noexcept{return{p};}
9644 };
9655 template<typename T>
9657
9667 constexpr struct destruct_t{
9668 template<class T>
9669 static constexpr bool able=destruct_able<T>;
9670 template<class T>
9671 static constexpr bool nothrow=destruct_nothrow<T>;
9672 template<class T>
9673 static constexpr bool trivial=destruct_trivial<T>;
9674
9675 template<class T> requires able<T>
9676 static force_inline void base_call([[maybe_unused]]T*to)noexcept(nothrow<T>){
9677 if constexpr(!trivial<T>)
9678 if constexpr(::std::is_array_v<T>)
9679 for(auto&i : *to)
9680 base_call(addressof(i));
9681 else
9683 to->~T();
9685 }
9686
9687 template<class T> requires able<T>
9688 static void base_call([[maybe_unused]]T*begin,[[maybe_unused]]size_t size)noexcept(nothrow<T>){
9689 if constexpr(type_info<T>.has_attribute(never_in_array))
9690 template_error("You cannot perform array operations on never_in_array type.");
9691 if constexpr(!trivial<T>)
9692 while(size--)base_call(begin+size);
9693 }
9694
9695 template<class T> requires able<T>
9696 force_inline void operator()(T*begin)const noexcept(nothrow<T>){
9697 base_call(begin);
9698 }
9699
9701 size_t _size;
9702 template<class T> requires able<T>
9703 force_inline void operator()(T*begin)const noexcept(nothrow<T>){
9704 base_call(begin,_size);
9705 }
9706 };
9707
9708 [[nodiscard]]force_inline constexpr array_destruct_t operator[](size_t size)const noexcept{return{size};}
9709
9710 struct not_t{};
9711 /*适用于unget(this,not destruct);*/
9712 force_inline constexpr not_t operator!()const noexcept{return not_t{};}
9713 }destruct{};
9714
9727 constexpr struct re_construct_t{
9728 template<class T,class...Args>
9729 static constexpr bool able=destruct.able<T>&&construct<T>.able<Args...>;
9730 template<class T,class...Args>
9731 static constexpr bool nothrow=destruct.nothrow<T>&&construct<T>.nothrow<Args...>;
9732 template<class T,class...Args>
9733 static constexpr bool trivial=destruct.trivial<T>&&construct<T>.trivial<Args...>;
9734
9735 template<class T> requires able<T>
9736 force_inline T* operator()(T*to)const noexcept(nothrow<T>){
9737 destruct(to);
9738 construct<T>[to]();
9739 return to;
9740 }
9741 template<class T>
9744 size_t _size;
9745 template<class...Args> requires able<T,Args...>
9746 T* operator()(Args&&...rest)const noexcept(nothrow<T,Args...>){
9747 if constexpr(type_info<T>.has_attribute(never_in_array))
9748 template_error("You cannot perform array operations on never_in_array type.");
9749 destruct[_size](_to);
9750 construct<T>[_to][_size](forward<Args>(rest)...);
9751 return _to;
9752 }
9753 };
9754 template<class T>
9757 template<class...Args> requires able<T,Args...>
9758 T* operator()(Args&&...rest)const noexcept(nothrow<T,Args...>){
9759 destruct(_to);
9760 construct<T>[_to](forward<Args>(rest)...);
9761 return _to;
9762 }
9763 [[nodiscard]]force_inline constexpr array_re_construct_t<T> operator[](size_t size)const noexcept{return{_to,size};}
9764 };
9765 template<class T>
9766 [[nodiscard]]force_inline constexpr placement_re_construct_t<T> operator[](T*p)const noexcept{return{p};}
9767 }re_construct;
9768
9769 constexpr struct copy_construct_t{
9770 template<class T>
9771 static constexpr bool r_able=copy_construct_able<T>?
9772 copy_construct_trivial<T>||!(construct<T>.trivial<>&&copy_assign_trivial<T>)
9773 :false;//trivial操作优先考虑
9774 template<class T>
9775 static constexpr bool able=r_able<T>?true:(construct<T>.able<>&&copy_assign_able<T>);
9776 template<class T>
9777 static constexpr bool nothrow=r_able<T>?copy_construct_nothrow<T>:
9778 (construct<T>.nothrow<>&&copy_assign_nothrow<T>);
9779 template<class T>
9780 static constexpr bool trivial=r_able<T>?copy_construct_trivial<T>:
9781 (construct<T>.trivial<>&&copy_assign_trivial<T>);
9782
9783 template<class T> requires able<T>
9784 static T*base_call(T*to,const T*from)noexcept(nothrow<T>){
9785 if constexpr(trivial<T>)
9786 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)));
9787 else{
9788 if constexpr(r_able<T>)
9789 new(to)T(*from);
9790 else{
9791 construct<T>[to]();
9792 *to=*from;
9793 }
9794 return to;
9795 }
9796 }
9797
9798 template<class T> requires able<T>
9799 static T*base_call(T*to,const T*from,size_t size)noexcept(nothrow<T>){
9800 if constexpr(trivial<T>)
9801 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)*size));
9802 else{
9803 while(size--)
9804 base_call(to+size,from+size);
9805 return to;
9806 }
9807 }
9808
9809 template<class T> requires able<T>
9810 force_inline T*operator()(T*to,const T*from)const noexcept(nothrow<T>)
9811 {return base_call(to,from);}
9812
9813 template<class T> requires able<T>
9815 {return base_call(to(),from());}
9816
9817 template<class T> requires able<T>
9819 {return base_call(to(),from());}
9820
9821
9822 template<class T> requires able<T>
9823 force_inline T*operator()(T*to,const T*from,size_t size)const noexcept(nothrow<T>)
9824 {return base_call(to,from,size);}
9825
9826 template<class T> requires able<T>
9827 force_inline T*operator()(note::to_t<T*>to,note::from_t<const T*>from,size_t size)const noexcept(nothrow<T>)
9828 {return base_call(to(),from(),size);}
9829
9830 template<class T> requires able<T>
9831 force_inline T*operator()(note::from_t<const T*>from,note::to_t<T*>to,size_t size)const noexcept(nothrow<T>)
9832 {return base_call(to(),from(),size);}
9833
9834 template<class T> requires able<T>
9835 static T*base_call(T*to,const T&from)noexcept(nothrow<T>){
9836 if constexpr(r_able<T>)
9837 construct<T>[to](from);
9838 else{
9839 construct<T>[to]();
9840 *to=from;
9841 }
9842 return to;
9843 }
9844
9845 template<class T> requires able<T>
9846 static T*base_call(T*to,const T&from,size_t size)noexcept(nothrow<T>){
9847 if constexpr(type_info<T>.has_attribute(never_in_array))
9848 template_error("You cannot perform array operations on never_in_array type.");
9849 if constexpr(::std::is_trivially_copyable_v<T>)
9851 else
9852 while(size--)
9853 base_call(to+size,from);
9854 return to;
9855 }
9856
9857 template<class T> requires able<T>
9858 force_inline T*operator()(T*to,const T&from)const noexcept(nothrow<T>)
9859 {return base_call(to,from);}
9860
9862 size_t _size;
9863 template<class T> requires able<T>
9864 force_inline T*operator()(T*to,const T*from)const noexcept(nothrow<T>){
9865 return base_call(to,from,_size);
9866 }
9867 template<class T> requires able<T>
9868 force_inline T*operator()(T*to,const T&from)const noexcept(nothrow<T>){
9869 return base_call(to,from,_size);
9870 }
9871 template<class T> requires able<T>
9873 return operator()(to(),from());
9874 }
9875 template<class T> requires able<T>
9877 return operator()(to(),from());
9878 }
9879 };
9880 [[nodiscard]]force_inline constexpr array_copy_construct_t operator[](size_t a)const noexcept{return{a};}
9881 }copy_construct{};
9882
9883 constexpr struct move_construct_t{
9884 template<class T>
9885 static constexpr bool r_able=move_construct_able<T>?
9887 :false;//trivial操作优先考虑
9888 template<class T>
9889 static constexpr bool able=r_able<T>?true:copy_construct.able<T>;
9890 template<class T>
9891 static constexpr bool nothrow=r_able<T>?move_construct_nothrow<T>:
9893 template<class T>
9894 static constexpr bool trivial=r_able<T>?move_construct_trivial<T>:
9896
9897 template<class T> requires able<T>
9898 static T*base_call(T*to,T*from)noexcept(nothrow<T>){
9899 if constexpr(trivial<T>)
9900 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)));
9901 else{
9902 if constexpr(r_able<T>){
9903 construct<T>[to](::std::move(*from));
9904 return to;
9905 }else
9906 return copy_construct(to,from);
9907 }
9908 }
9909 template<class T> requires able<T>
9910 static T*base_call(T*to,T*from,size_t size)noexcept(nothrow<T>){
9911 if constexpr(type_info<T>.has_attribute(never_in_array))
9912 template_error("You cannot perform array operations on never_in_array type.");
9913 if constexpr(trivial<T>)
9914 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)*size));
9915 else{
9916 if constexpr(r_able<T>){
9917 while(size--)
9918 construct<T>[to+size](::std::move(from[size]));
9919 return to;
9920 }else
9921 return copy_construct[size](to,from);
9922 }
9923 }
9924
9925 template<class T> requires able<T>
9926 force_inline T*operator()(T*to,T*from)const noexcept(nothrow<T>)
9927 {return base_call(to,from);}
9928
9929 template<class T> requires able<T>
9930 force_inline T*operator()(note::to_t<T*>to,note::from_t<T*>from)const noexcept(nothrow<T>)
9931 {return base_call(to(),from());}
9932
9933 template<class T> requires able<T>
9934 force_inline T*operator()(note::from_t<T*>from,note::to_t<T*>to)const noexcept(nothrow<T>)
9935 {return base_call(to(),from());}
9936
9938 size_t _size;
9939 template<class T> requires able<T>
9940 force_inline T*operator()(T*to,T*from)const noexcept(nothrow<T>){
9941 return base_call(to,from,_size);
9942 }
9943 template<class T> requires able<T>
9944 force_inline T*operator()(note::to_t<T*>to,note::from_t<T*>from)const noexcept(nothrow<T>){
9945 return operator()(to(),from());
9946 }
9947 template<class T> requires able<T>
9948 force_inline T*operator()(note::from_t<T*>from,note::to_t<T*>to)const noexcept(nothrow<T>){
9949 return operator()(to(),from());
9950 }
9951 };
9952 [[nodiscard]]force_inline constexpr array_move_construct_t operator[](size_t a)const noexcept{return{a};}
9953 }move_construct{};
9954
9955 constexpr struct move_t{
9956 template<class T>
9957 static constexpr bool able=move_construct.able<T>&&destruct.able<T>;
9958 template<class T>
9959 static constexpr bool nothrow=move_construct.nothrow<T>&&destruct.nothrow<T>;
9960 template<class T>
9961 static constexpr bool trivial=move_construct.trivial<T>&&destruct.trivial<T>;
9962
9963 template<class T> requires able<T>
9964 static T*base_call(T*to,T*from)noexcept(nothrow<T>){
9965 move_construct(to,from);
9966 destruct(from);
9967 return to;
9968 }
9969 template<class T> requires able<T>
9970 static T*base_call(T*to,T*from,size_t size)noexcept(nothrow<T>){
9971 if constexpr(type_info<T>.has_attribute(never_in_array))
9972 template_error("You cannot perform array operations on never_in_array type.");
9973 move_construct[size](to,from);
9974 destruct[size](from);
9975 return to;
9976 }
9977
9978 template<class T> requires able<T>
9979 force_inline T*operator()(T*to,T*from)const noexcept(nothrow<T>)
9980 {return base_call(to,from);}
9981
9982 template<class T> requires able<T>
9983 force_inline T*operator()(note::to_t<T*>to,note::from_t<T*>from)const noexcept(nothrow<T>)
9984 {return base_call(to(),from());}
9985
9986 template<class T> requires able<T>
9987 force_inline T*operator()(note::from_t<T*>from,note::to_t<T*>to)const noexcept(nothrow<T>)
9988 {return base_call(to(),from());}
9989
9991 size_t _size;
9992 template<class T> requires able<T>
9993 force_inline T*operator()(T*to,T*from)const noexcept(nothrow<T>){
9994 return base_call(to,from,_size);
9995 }
9996 template<class T> requires able<T>
9997 force_inline T*operator()(note::to_t<T*>to,note::from_t<T*>from)const noexcept(nothrow<T>){
9998 return operator()(to(),from());
9999 }
10000 template<class T> requires able<T>
10001 force_inline T*operator()(note::from_t<T*>from,note::to_t<T*>to)const noexcept(nothrow<T>){
10002 return operator()(to(),from());
10003 }
10004 };
10005 [[nodiscard]]force_inline constexpr array_move_t operator[](size_t a)const noexcept{return{a};}
10006
10007 //特殊使用
10008 template<class T>
10009 [[nodiscard,deprecated("moveing a const object is meaningless")]]
10010 constexpr const T&& operator()(const T&a)const noexcept{
10011 return static_cast<const T&&>(a);
10012 }
10013 template<class T>
10014 [[nodiscard]]constexpr remove_ref<T>&& operator()(T&&a)const noexcept{
10015 return static_cast<remove_ref<T>&&>(a);
10016 }
10017 }move{};
10018
10019 constexpr struct copy_t{
10020 //特殊使用
10021 //UF
10022 template<class T> requires(copy_construct.able<T>)
10023 [[nodiscard]]constexpr T operator()(const T&a)const noexcept{
10024 return copy_construct<T>(a);
10025 }
10026 }copy{};
10027
10028 constexpr struct copy_assign_t{
10029 template<class T>
10030 static constexpr bool r_able=copy_assign_able<T>?
10032 :false;//trivial操作优先考虑
10033 template<class T>
10034 static constexpr bool able=r_able<T>?true:(copy_construct_able<T>&&destruct.able<T>);
10035 template<class T>
10036 static constexpr bool nothrow=r_able<T>?copy_assign_nothrow<T>:
10038 template<class T>
10039 static constexpr bool trivial=r_able<T>?copy_assign_trivial<T>:
10041
10042 template<class T> requires able<T>
10043 static T& base_call(T&a,const T&b)noexcept(nothrow<T>){
10044 if constexpr(r_able<T>)
10045 a=b;
10046 else{
10047 destruct(&a);
10048 construct<T>[&a](b);
10049 }
10050 return a;
10051 }
10052 template<class T> requires able<T>
10053 static T* base_call(T*to,const T*from,size_t size)noexcept(nothrow<T>){
10054 if constexpr(trivial<T>)
10055 ::std::memcpy(to,add_const(from),size*sizeof(T));
10056 else
10057 while(size--)
10058 base_call(to[size],from[size]);
10059 return to;
10060 }
10061 template<class T> requires able<T>
10062 static T* base_call(T* to,const T& from,size_t size)noexcept(nothrow<T>){
10063 if constexpr(trivial<T>)
10065 else
10066 while(size--)
10067 base_call(to[size],from);
10068 return to;
10069 }
10070
10071 template<class T> requires able<T>
10072 force_inline T& operator()(T&a,const T&b)const noexcept(nothrow<T>){
10073 return base_call(a,b);
10074 }
10075
10077 size_t _size;
10078 template<class T> requires able<T>
10079 force_inline T*operator()(T*to,const T*from)const noexcept(nothrow<T>){
10080 return base_call(to,from,_size);
10081 }
10082 template<class T> requires able<T>
10083 force_inline T*operator()(const T*from,T*to)const noexcept(nothrow<T>){
10084 return base_call(to,from,_size);
10085 }
10086 template<class T> requires able<T>
10088 return operator()(to(),from());
10089 }
10090 template<class T> requires able<T>
10092 return operator()(to(),from());
10093 }
10094 template<class T> requires able<T>
10095 force_inline T*operator()(const T&from,note::to_t<T*>to)const noexcept(nothrow<T>){
10096 return base_call(to(),from,_size);
10097 }
10098 template<class T> requires able<T>
10099 force_inline T*operator()(note::to_t<T*>to,const T&from)const noexcept(nothrow<T>){
10100 return base_call(to(),from,_size);
10101 }
10102 };
10103 [[nodiscard]]force_inline constexpr array_copy_assign_t operator[](size_t a)const noexcept{return{a};}
10104 }copy_assign{};
10105
10106 constexpr struct move_assign_t{
10107 template<class T>
10108 static constexpr bool r_able=move_assign_able<T>;
10109 template<class T>
10110 static constexpr bool able=r_able<T>?true:copy_assign.able<T>;
10111 template<class T>
10112 static constexpr bool nothrow=r_able<T>?move_assign_nothrow<T>:copy_assign.nothrow<T>;
10113 template<class T>
10114 static constexpr bool trivial=r_able<T>?move_assign_trivial<T>:copy_assign.trivial<T>;
10115
10116 template<class T> requires able<T>
10117 static T& base_call(T&a,T&&b)noexcept(nothrow<T>){
10118 if constexpr(r_able<T>)
10119 a=move(b);
10120 else
10121 copy_assign(a,b);
10122 return a;
10123 }
10124 template<class T> requires able<T>
10125 static T* base_call(T*to,T*from,size_t size)noexcept(nothrow<T>){
10126 if constexpr(trivial<T>)
10127 ::std::memcpy(to,add_const(from),size*sizeof(T));
10128 else
10129 while(size--)
10130 base_call(to[size],from[size]);
10131 return to;
10132 }
10133
10134 template<class T> requires able<T>
10135 force_inline T& operator()(T&a,T&b)const noexcept(nothrow<T>){
10136 return base_call(a,move(b));
10137 }
10138
10140 size_t _size;
10141 template<class T> requires able<T>
10142 force_inline T*operator()(T*to,T*from)const noexcept(nothrow<T>){
10143 return base_call(to,from,_size);
10144 }
10145 template<class T> requires able<T>
10146 force_inline T*operator()(note::to_t<T*>to,note::from_t<T*>from)const noexcept(nothrow<T>){
10147 return operator()(to(),from());
10148 }
10149 template<class T> requires able<T>
10150 force_inline T*operator()(note::from_t<T*>from,note::to_t<T*>to)const noexcept(nothrow<T>){
10151 return operator()(to(),from());
10152 }
10153 };
10154 [[nodiscard]]force_inline constexpr array_move_assign_t operator[](size_t a)const noexcept{return{a};}
10155
10156 static constexpr struct may_overlap_t{
10157 template<class T> requires able<T>
10158 static T* base_call(T*to,T*from,size_t size)noexcept(nothrow<T>){
10159 if constexpr(trivial<T>)
10160 ::std::memmove(to,add_const(from),size*sizeof(T));
10161 else
10162 while(size--)
10163 base_call(to[size],from[size]);
10164 return to;
10165 }
10167 size_t _size;
10168 template<class T> requires able<T>
10169 force_inline T*operator()(T*to,T*from)const noexcept(nothrow<T>){
10170 return base_call(to,from,_size);
10171 }
10172 template<class T> requires able<T>
10173 force_inline T*operator()(note::to_t<T*>to,note::from_t<T*>from)const noexcept(nothrow<T>){
10174 return operator()(to(),from());
10175 }
10176 template<class T> requires able<T>
10177 force_inline T*operator()(note::from_t<T*>from,note::to_t<T*>to)const noexcept(nothrow<T>){
10178 return operator()(to(),from());
10179 }
10180 };
10181 [[nodiscard]]force_inline constexpr array_may_overlap_move_assign_t operator[](size_t a)const noexcept{return{a};}
10182 }may_overlap{};
10183 }move_assign{};
10184}
10185
10186//file_end
10187
10188#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/_body.hpp"
10189#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/_export.hpp"
10190//_export.hpp
10191//at namespace elc::defs::memory
10192/*
10193未完成的elc解释器base文件
10194由steve02081504与Alex0125设计、编写
10195转载时请在不对此文件做任何修改的同时注明出处
10196项目地址:https://github.com/ELC-lang/ELC
10197*/
10198/*
10199 ,??????????????????????????
10200 ????????????????????????????
10201 ?????????????????????????????+
10202 ?????+++++++++++++++++++++++++
10203 ?????+++++++++++++++++++++++++
10204 ??????++++++++++++++++++++++++
10205 ?????++
10206 ?????+++
10207 ??????+++IIIIIIIIIIIIIIIIII
10208 ?????+++++IIIIIIIIIIIIIIIIII
10209 ?????++++++++++++++++++++++++
10210 ??????+++++++++++++++++++++++:
10211 ?????++
10212 ?????+++
10213 ??????++
10214 ??????????????????????????????II
10215 ??????????????????????????????IIII
10216 ,?????????????????????????????IIIII+
10217 =???++++++++++++++++++++++++++III?
10218 ?++++++++++++++++++++++++++++I+
10219*/
10220#define export using lifetime_n::
10221export construct;
10222export destruct;
10223export re_construct;
10224export copy_assign;
10225export move_assign;
10226export move;
10227export copy;
10228export copy_construct;
10229export move_construct;
10230#undef export
10231
10232//file_end
10233
10234#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/_body.hpp"
10235#if defined(ELC_TEST_ON)
10236 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/_test.hpp"
10237//_test.hpp
10238//at namespace elc::defs::memory
10239/*
10240未完成的elc解释器base文件
10241由steve02081504与Alex0125设计、编写
10242转载时请在不对此文件做任何修改的同时注明出处
10243项目地址:https://github.com/ELC-lang/ELC
10244*/
10245/*
10246 ,??????????????????????????
10247 ????????????????????????????
10248 ?????????????????????????????+
10249 ?????+++++++++++++++++++++++++
10250 ?????+++++++++++++++++++++++++
10251 ??????++++++++++++++++++++++++
10252 ?????++
10253 ?????+++
10254 ??????+++IIIIIIIIIIIIIIIIII
10255 ?????+++++IIIIIIIIIIIIIIIIII
10256 ?????++++++++++++++++++++++++
10257 ??????+++++++++++++++++++++++:
10258 ?????++
10259 ?????+++
10260 ??????++
10261 ??????????????????????????????II
10262 ??????????????????????????????IIII
10263 ,?????????????????????????????IIIII+
10264 =???++++++++++++++++++++++++++III?
10265 ?++++++++++++++++++++++++++++I+
10266*/
10267namespace lifetime_n{
10268 //BLOCK:for debug
10269 inline void test(){
10270 ELC_TEST_EVENTNAME("lifetime部分测试");
10271 }
10272 inline void test_log_out(){
10273 }
10274 inline void test_end(){
10275 }
10276 //BLOCK_END
10277}
10278
10279//file_end
10280
10281 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/memory/lifetime/_body.hpp"
10282#endif
10283
10284//file_end
10285
10286 #line 106 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
10287 }
10288 using namespace memory;
10289
10290 namespace base{
10291 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/iterator.hpp"
10292//iterator.hpp
10293//at namespace elc::defs::base
10294/*
10295未完成的elc解释器base文件
10296由steve02081504与Alex0125设计、编写
10297转载时请在不对此文件做任何修改的同时注明出处
10298项目地址:https://github.com/ELC-lang/ELC
10299*/
10300/*
10301 ,??????????????????????????
10302 ????????????????????????????
10303 ?????????????????????????????+
10304 ?????+++++++++++++++++++++++++
10305 ?????+++++++++++++++++++++++++
10306 ??????++++++++++++++++++++++++
10307 ?????++
10308 ?????+++
10309 ??????+++IIIIIIIIIIIIIIIIII
10310 ?????+++++IIIIIIIIIIIIIIIIII
10311 ?????++++++++++++++++++++++++
10312 ??????+++++++++++++++++++++++:
10313 ?????++
10314 ?????+++
10315 ??????++
10316 ??????????????????????????????II
10317 ??????????????????????????????IIII
10318 ,?????????????????????????????IIIII+
10319 =???++++++++++++++++++++++++++III?
10320 ?++++++++++++++++++++++++++++I+
10321*/
10322namespace iterator_n{
10323 //using namespace memory;//copy_assign、move_assign
10324 template<typename base_t_w,typename value_t>
10329 template<typename build_base_t_T> requires(construct<base_t_rw>.able<build_base_t_T>)
10330 constexpr reverse_base_t(build_base_t_T&& a)noexcept(construct<base_t_rw>.nothrow<build_base_t_T>):_m(a){}
10331 constexpr reverse_base_t(const this_t&a)noexcept(construct<base_t_rw>.nothrow<const base_t_rw&>):_m(a._m){}
10332 constexpr reverse_base_t(this_t&&a)noexcept(construct<base_t_rw>.nothrow<base_t_rw&&>):_m(move(a._m)){}
10333 constexpr this_t& operator=(const this_t&a)&noexcept{_m=a._m;return*this;}
10334 constexpr this_t& operator=(this_t&&a)&noexcept{_m=move(a._m);return*this;}
10335 constexpr auto operator==(const this_t&a)const noexcept{return _m==a._m;}
10336 constexpr auto operator<=>(const this_t&a)const noexcept{return _m<=>a._m;}
10337
10338 static constexpr bool is_pointer=::std::is_pointer_v<base_t_w>;
10339
10340 [[nodiscard]]static constexpr bool is_get_before_noexcept()noexcept{
10341 if constexpr(is_pointer)
10342 return true;
10343 else return noexcept(declvalue(base_t_w).get_next());
10344 }
10345 [[nodiscard]]static constexpr bool is_get_next_noexcept()noexcept{
10346 if constexpr(is_pointer)
10347 return true;
10348 else return noexcept(declvalue(base_t_w).get_before());
10349 }
10350 [[nodiscard]]static constexpr bool is_able_to_get_handle()noexcept{
10351 if constexpr(is_pointer)
10352 return true;
10353 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_handle()))
10354 return true;
10355 }
10356 [[nodiscard]]static constexpr bool is_get_handle_noexcept()noexcept{
10357 if constexpr(is_pointer)
10358 return true;
10359 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_handle()))
10360 return noexcept(declvalue(base_t_w).get_handle());
10361 else
10362 return false;
10363 }
10364 [[nodiscard]]static constexpr bool is_able_to_get_value()noexcept{
10365 if constexpr(is_pointer)
10366 return true;
10367 elseif constexpr(type_info<base_t_w> == type_info<value_t>)
10368 return true;
10369 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_value()))
10370 return true;
10371 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_value()))
10372 return true;
10373 }
10374 [[nodiscard]]static constexpr bool is_get_value_noexcept()noexcept{
10375 if constexpr(is_pointer)
10376 return true;
10377 elseif constexpr(type_info<base_t_w> == type_info<value_t>)
10378 return true;
10379 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_value()))
10380 return noexcept(declvalue(base_t_w)->get_value());
10381 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_value()))
10382 return noexcept(declvalue(base_t_w).get_value());
10383 else
10384 return false;
10385 }
10386
10387 [[nodiscard]]auto get_before()noexcept(is_get_before_noexcept()){
10388 if constexpr(is_pointer)
10389 return _m+1;
10390 else return ((base_t_w&)_m).get_next();
10391 }
10392 [[nodiscard]]auto get_next()noexcept(is_get_next_noexcept()){
10393 if constexpr(is_pointer)
10394 return _m-1;
10395 else return ((base_t_w&)_m).get_before();
10396 }
10397 [[nodiscard]]auto get_handle()noexcept(is_get_handle_noexcept())requires(is_able_to_get_handle()){
10398 if constexpr(is_pointer)
10399 return _m;
10400 else return ((base_t_w&)_m).get_handle();
10401 }
10402 [[nodiscard]]decltype(auto) get_value()noexcept(is_get_value_noexcept())requires(is_able_to_get_value()){
10403 if constexpr(is_pointer)
10404 return *(base_t_w&)_m;
10405 elseif constexpr(type_info<base_t_w> == type_info<value_t>)
10406 return (base_t_w&)_m;
10407 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_value()))
10408 return ((base_t_w&)_m)->get_value();
10409 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_value()))
10410 return ((base_t_w&)_m).get_value();
10411 }
10412 };
10413 template<typename base_t,typename value_t> requires(compare.able<base_t>)
10414 [[nodiscard]]auto operator<=>(const reverse_base_t<base_t,value_t>&a,const reverse_base_t<base_t,value_t>&b)noexcept(compare.nothrow<base_t>){
10415 return compare((const base_t&)b._m,(const base_t&)a._m);
10416 }
10417 template<typename base_t,typename value_t,typename T> requires(compare.able<T,base_t> && type_info<remove_cvref<T>> != type_info<reverse_base_t<base_t,value_t>::base_t_rw>)
10418 [[nodiscard]]auto operator<=>(const reverse_base_t<base_t,value_t>& a,T&& b)noexcept(compare.nothrow<T,base_t>){
10419 return compare(b,(const base_t&)a._m);
10420 }
10421 template<typename base_t,typename value_t,typename T> requires(compare.able<base_t,T> && type_info<remove_cvref<T>> != type_info<reverse_base_t<base_t,value_t>::base_t_rw>)
10422 [[nodiscard]]auto operator<=>(T&& a,const reverse_base_t<base_t,value_t>& b)noexcept(compare.nothrow<base_t,T>){
10423 return compare((const base_t&)b._m,a);
10424 }
10425 template<typename base_t,typename value_t,typename T> requires(equal.able<T,base_t> && type_info<remove_cvref<T>> != type_info<reverse_base_t<base_t,value_t>::base_t_rw>)
10426 [[nodiscard]]auto operator==(const reverse_base_t<base_t,value_t>& a,T&& b)noexcept(equal.nothrow<T,base_t>){
10427 return equal(b,(const base_t&)a._m);
10428 }
10429 template<typename base_t,typename value_t,typename T> requires(equal.able<base_t,T> && type_info<remove_cvref<T>> != type_info<reverse_base_t<base_t,value_t>::base_t_rw>)
10430 [[nodiscard]]auto operator==(T&& a,const reverse_base_t<base_t,value_t>& b)noexcept(equal.nothrow<base_t,T>){
10431 return equal((const base_t&)b._m,a);
10432 }
10433 template<typename base_t,typename value_t>
10436
10437 template<typename value_t,typename base_t_w>
10439 template<typename,typename>
10440 friend class same_base_t;
10441 protected:
10444 //
10445 mutable base_t_rw _m;
10446 //
10447 [[nodiscard]]static constexpr bool is_able_to_get_handle()noexcept{
10448 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10449 return true;
10450 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_handle()))
10451 return true;
10452 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_handle()))
10453 return true;
10454 else
10455 return false;
10456 }
10457 [[nodiscard]]static constexpr bool is_handle_getter_noexcept()noexcept{
10458 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10459 return true;
10460 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_handle()))
10461 return noexcept(declvalue(base_t_w)->get_handle());
10462 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_handle()))
10463 return noexcept(declvalue(base_t_w).get_handle());
10464 else
10465 return false;
10466 }
10467 [[nodiscard]]inline value_t*handle_getter()const noexcept(is_handle_getter_noexcept()) requires(is_able_to_get_handle()){
10468 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10469 return ((base_t_w)_m);
10470 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_handle()))
10471 return ((base_t_w)_m)->get_handle();
10472 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_handle()))
10473 return ((base_t_w)_m).get_handle();
10474 }
10475 //
10476 [[nodiscard]]static constexpr bool is_value_getter_noexcept()noexcept{
10477 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10478 return true;
10479 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_value()))
10480 return noexcept(declvalue(base_t_w)->get_value());
10481 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_value()))
10482 return noexcept(declvalue(base_t_w).get_value());
10483 }
10484
10485 [[nodiscard]]static constexpr auto value_type_getter()noexcept{
10486 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10487 return type_info<decltype(*((base_t_w)_m))>;
10488 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_value()))
10489 return type_info<decltype(((base_t_w)_m)->get_value())>;
10490 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_value()))
10491 return type_info<decltype(((base_t_w)_m).get_value())>;
10492 else
10493 return type_info<decltype(*declvalue(value_t*))>;
10494 }
10495 typedef decltype(value_type_getter())::template_name type value_type;
10496
10497 [[nodiscard]]inline value_type value_getter()const noexcept(is_handle_getter_noexcept()){
10498 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10499 return *((base_t_w)_m);
10500 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_value()))
10501 return ((base_t_w)_m)->get_value();
10502 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_value()))
10503 return ((base_t_w)_m).get_value();
10504 else
10505 return *handle_getter();
10506 }
10507 //
10508 [[nodiscard]]static constexpr bool is_next_getter_noexcept()noexcept{
10509 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10510 return true;
10511 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_next()))
10512 return noexcept(declvalue(base_t_w)->get_next());
10513 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_next()))
10514 return noexcept(declvalue(base_t_w).get_next());
10515 }
10516 [[nodiscard]]inline base_t_w next_getter()const noexcept(is_next_getter_noexcept()){
10517 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10518 return ((base_t_w)_m)+1;
10519 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_next()))
10520 return ((base_t_w)_m)->get_next();
10521 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_next()))
10522 return ((base_t_w)_m).get_next();
10523 }
10524 //
10525 [[nodiscard]]static constexpr bool is_before_getter_noexcept()noexcept{
10526 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10527 return true;
10528 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_before()))
10529 return noexcept(declvalue(base_t_w)->get_before());
10530 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_before()))
10531 return noexcept(declvalue(base_t_w).get_before());
10532 }
10533 [[nodiscard]]inline base_t_w before_getter()const noexcept(is_before_getter_noexcept()){
10534 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10535 return ((base_t_w)_m)-1;
10536 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w)->get_before()))
10537 return ((base_t_w)_m)->get_before();
10538 elseif constexpr(was_not_an_ill_form(declvalue(base_t_w).get_before()))
10539 return ((base_t_w)_m).get_before();
10540 }
10541 public:
10543 //
10544 constexpr same_base_t()noexcept=default;
10545 template<typename build_base_t_T> requires(construct<base_t_rw>.able<build_base_t_T>)
10546 constexpr same_base_t(build_base_t_T&&a)noexcept(construct<base_t_rw>.nothrow<build_base_t_T>):_m(a){}
10547 constexpr same_base_t(const this_t&a)noexcept(construct<base_t_rw>.nothrow<const base_t_rw>):_m(a._m){}
10548 constexpr same_base_t(this_t&&a)noexcept_as(construct<base_t_rw>.nothrow<base_t_rw&&>):_m(move(a._m)){}
10549 template<typename other_T,typename other_base_t> requires(construct<base_t_rw>.able<other_base_t>)
10550 constexpr same_base_t(const same_base_t<other_T,other_base_t>&a)noexcept(construct<base_t_rw>.nothrow<other_base_t>):_m(a._m){}
10551 ~same_base_t()noexcept(destruct.nothrow<base_t_rw>)=default;
10552 [[nodiscard]]constexpr bool operator==(const this_t& a)const noexcept_as(declvalue(base_t_rw) == declvalue(base_t_rw)){ return _m == a._m; }
10553 [[nodiscard]]constexpr value_t* operator->()noexcept(is_handle_getter_noexcept())requires(is_able_to_get_handle()){ return handle_getter(); }
10554 [[nodiscard]]constexpr value_type operator*()noexcept(is_value_getter_noexcept()){ return value_getter(); }
10555 [[nodiscard]]constexpr operator value_t*()noexcept_as(declvalue(this_t).operator->()){ return operator->(); }
10556 [[nodiscard]]constexpr bool operator==(value_t* a)const noexcept(is_handle_getter_noexcept()&&noexcept(pointer_equal(declvalue(value_t*),declvalue(value_t*))))requires(is_able_to_get_handle()){ return pointer_equal(handle_getter(),a); }
10557 template<typename other_value_t,typename other_base_t_w> requires(equal.able<base_t_rw,other_base_t_w>)
10558 [[nodiscard]]constexpr bool operator==(const same_base_t<other_value_t,other_base_t_w>& a)const noexcept(equal.nothrow<base_t_rw,other_base_t_w>){
10559 return equal(_m,a._m);
10560 }
10561 template<typename other_value_t,typename other_base_t_w>
10562 [[nodiscard]]constexpr auto operator<=>(const same_base_t<other_value_t,other_base_t_w>& a)const noexcept(compare.nothrow<base_t_rw,other_base_t_w>){
10563 if constexpr(compare.able<base_t_rw,other_base_t_w>)
10564 return compare(_m,a._m);
10565 }
10566 constexpr this_t& operator=(const this_t&)&noexcept=default;
10567 base_t_rw& get_base()noexcept{ return _m; }
10568 const base_t_rw& get_base()const noexcept{ return _m; }
10569 };
10570 template<typename value_t,typename base_t_w>
10572 {a.swap_with(b);}
10573
10574 template<typename value_t,typename base_t_w>
10575 struct base_iterator_t:same_base_t<value_t,base_t_w>{
10578 protected:
10579 using base_t::is_before_getter_noexcept;
10580 using base_t::is_next_getter_noexcept;
10581 using base_t::before_getter;
10582 using base_t::next_getter;
10584 public:
10585 using base_t::base_t;
10586 constexpr this_t&operator=(const base_t_rw&a)&noexcept(copy_assign.nothrow<base_t_rw>){copy_assign(base_t::_m,a);return*this;}
10587 constexpr this_t&operator=(base_t_rw&&a)&noexcept(move_assign.nothrow<base_t_rw>){move_assign(base_t::_m,a);return*this;}
10588 constexpr this_t&operator++()&noexcept(is_next_getter_noexcept()){return*this=next_getter();}
10589 constexpr this_t&operator--()&noexcept(is_before_getter_noexcept()){return*this=before_getter();}
10590 constexpr this_t operator++(int)&noexcept_as(this_t(++declvalue(this_t&))){auto a=*this;operator++();return a;}
10591 constexpr this_t operator--(int)&noexcept_as(this_t(--declvalue(this_t&))){auto a=*this;operator--();return a;}
10592 constexpr this_t operator+(ptrdiff_t num)const noexcept_as(this_t(--declvalue(this_t&)),++declvalue(this_t&)){
10593 if constexpr(type_info<::std::remove_pointer_t<base_t_w>> == type_info<value_t>)
10594 return base_t::_m+num;
10595 else{
10596 auto a=*this;
10597 if(num>0)
10598 while(num--)
10599 ++a;
10600 else
10601 while(num++)
10602 --a;
10603 return a;
10604 }
10605 }
10606 constexpr this_t operator-(ptrdiff_t num)const noexcept_as(declvalue(this_t&)+0){ return *this+(-num); }
10607 };
10608 template<typename value_t,typename base_t_w>
10610 template<typename value_t,typename base_t_w>
10612
10613 template<typename value_t,typename base_t_w=value_t*>
10615 template<typename value_t,typename base_t_w=const value_t*>
10617 template<typename value_t,typename base_t_w=value_t*>
10619 template<typename value_t,typename base_t_w=const value_t*>
10621}
10627
10628//file_end
10629
10630 #line 111 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
10631 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/bitset.hpp"
10632//data.hpp
10633//at namespace elc::defs::base
10634/*
10635未完成的elc解释器base_defs文件
10636由steve02081504与Alex0125设计、编写
10637转载时请在不对此文件做任何修改的同时注明出处
10638项目地址:https://github.com/ELC-lang/ELC
10639*/
10640/*
10641 ,??????????????????????????
10642 ????????????????????????????
10643 ?????????????????????????????+
10644 ?????+++++++++++++++++++++++++
10645 ?????+++++++++++++++++++++++++
10646 ??????++++++++++++++++++++++++
10647 ?????++
10648 ?????+++
10649 ??????+++IIIIIIIIIIIIIIIIII
10650 ?????+++++IIIIIIIIIIIIIIIIII
10651 ?????++++++++++++++++++++++++
10652 ??????+++++++++++++++++++++++:
10653 ?????++
10654 ?????+++
10655 ??????++
10656 ??????????????????????????????II
10657 ??????????????????????????????IIII
10658 ,?????????????????????????????IIIII+
10659 =???++++++++++++++++++++++++++III?
10660 ?++++++++++++++++++++++++++++I+
10661*/
10662//bitset
10663template<size_t bit_num>
10664struct bitset:byteset<ceil_div(bit_num,bitnum_of(byte))>{
10665 static constexpr size_t data_size=ceil_div(bit_num,bitnum_of(byte));
10668 using base_t::base_t;
10669
10670 byte _data[data_size];
10671
10672 class arec_t{
10673 this_t* _to;
10674 size_t _index;
10675 size_t _quot,_mod;
10676 public:
10677 arec_t(this_t*to,size_t index)noexcept:_to(to),_index(index){
10678 auto info=divmod(_index,bitnum_of(byte));
10679 _quot=info.quot;
10680 _mod=info.mod;
10681 }
10682 constexpr operator bool()const noexcept{
10683 return _to->_data[_quot]&(1<<_mod);
10684 }
10685 constexpr auto&operator=(bool b)noexcept{
10686 if(b)
10687 _to->_data[_quot]|=(byte)1<<_mod;
10688 else
10689 _to->_data[_quot]&=~byte(1<<_mod);
10690 return*this;
10691 }
10692 constexpr auto&operator&=(bool b)noexcept{
10693 if(!b)
10694 _to->_data[_quot]&=~byte(1<<_mod);
10695 return*this;
10696 }
10697 constexpr auto&operator|=(bool b)noexcept{
10698 if(b)
10699 _to->_data[_quot]|=(byte)1<<_mod;
10700 return*this;
10701 }
10702 constexpr auto&operator^=(bool b)noexcept{
10703 if(b)
10704 _to->_data[_quot]^=(byte)1<<_mod;
10705 return*this;
10706 }
10707 };
10708private:
10709 struct iterator_base_t{
10710 this_t*_to;
10711 ptrdiff_t _index; //rend: -1,使用size_t也不是不可以(标准允许无符号整数溢出),但是operator<=>会出问题
10712 [[nodiscard]]constexpr iterator_base_t get_before()const noexcept{ return{_to,_index-1}; }
10713 [[nodiscard]]constexpr iterator_base_t get_next()const noexcept{ return{_to,_index+1}; }
10714 [[nodiscard]]arec_t get_value()noexcept{ return (*_to)[_index]; }
10715 [[nodiscard]]const arec_t get_value()const noexcept{ return (*add_const(_to))[_index]; }
10716 [[nodiscard]]constexpr bool operator==(const iterator_base_t& a)const noexcept{ return _to==a._to && _index==a._index; }
10717 [[nodiscard]]constexpr auto operator<=>(const iterator_base_t& a)const noexcept{ return _to==a._to ? _index<=>a._index : partial_ordering::unordered; }
10718 };
10719 [[nodiscard]]iterator_base_t get_iterator_data_at(ptrdiff_t index)const noexcept{ return iterator_base_t{(this_t*)this,index}; }
10720public:
10721 typedef iterator_t<bool,iterator_base_t> iterator;
10722 typedef const_iterator_t<bool,const iterator_base_t> const_iterator;
10723 constexpr iterator begin()noexcept{ return get_iterator_data_at(0); }
10724 constexpr iterator end()noexcept{ return get_iterator_data_at(-1); }
10725 constexpr const_iterator begin()const noexcept{ return get_iterator_data_at(0); }
10726 constexpr const_iterator end()const noexcept{ return get_iterator_data_at(-1); }
10727 constexpr const_iterator cbegin()const noexcept{ return get_iterator_data_at(0); }
10728 constexpr const_iterator cend()const noexcept{ return get_iterator_data_at(-1); }
10729 constexpr arec_t operator[](size_t index)noexcept{return {this,index};}
10730 constexpr const arec_t operator[](size_t index)const noexcept{return {remove_const(this),index};}
10731 constexpr auto operator~()const noexcept{
10732 this_t tmp;
10733 for(size_t i=0;i<data_size;++i)
10734 tmp._data[i]=~_data[i];
10735 return tmp;
10736 }
10737 constexpr auto&operator&=(const this_t&b)noexcept{
10738 for(size_t i=0;i<data_size;++i)
10739 _data[i]&=b._data[i];
10740 return*this;
10741 }
10742 constexpr auto&operator|=(const this_t&b)noexcept{
10743 for(size_t i=0;i<data_size;++i)
10744 _data[i]|=b._data[i];
10745 return*this;
10746 }
10747 constexpr auto&operator^=(const this_t&b)noexcept{
10748 for(size_t i=0;i<data_size;++i)
10749 _data[i]^=b._data[i];
10750 return*this;
10751 }
10752 template<unsigned_integer_type T>
10753 constexpr auto&operator=(T n)noexcept{
10754 typedef unsigned_specific_size_t<sizeof(byte)> arithmetic_byte_t;
10755 constexpr size_t mod_base=number_of_possible_values_per<arithmetic_byte_t>;
10756 for(size_t i=0;i<data_size;++i){
10757 auto result=divmod(n,mod_base);
10758 _data[i]=byte(arithmetic_byte_t(move(result.mod)));
10759 n=T(move(result.quot));
10760 }
10761 return*this;
10762 }
10763 template<unsigned_integer_type T>
10764 constexpr bitset(T n)noexcept{*this=n;}
10765 template<unsigned_integer_type T>
10766 explicit constexpr operator T()const noexcept{
10767 typedef unsigned_specific_size_t<sizeof(byte)> arithmetic_byte_t;
10768 constexpr size_t mod_base=number_of_possible_values_per<arithmetic_byte_t>;
10769 T result{};
10770 for(size_t i=data_size-1;i!=npos;--i){
10771 result*=mod_base;
10772 result+=arithmetic_byte_t(_data[i]);
10773 }
10774 return result;
10775 }
10776 constexpr auto&operator<<=(size_t n)noexcept{
10777 const auto [move_step,offset]=divmod(n,bitnum_of(byte));
10778 byte carry{};
10779 for(size_t i=data_size-move_step-1;i!=npos;--i)
10780 carry=swap(_data[i],byte((_data[i]<<offset)|carry))>>(bitnum_of(byte)-offset);
10781 for(size_t i=0;i<move_step;++i)
10782 _data[i]=byte{};
10783 return*this;
10784 }
10785 constexpr auto&operator>>=(size_t n)noexcept{
10786 const auto [move_step,offset]=divmod(n,bitnum_of(byte));
10787 byte carry{};
10788 for(size_t i=move_step;i!=data_size;++i)
10789 carry=swap(_data[i],byte((_data[i]>>offset)|carry))<<(bitnum_of(byte)-offset);
10790 for(size_t i=data_size-move_step;i!=data_size;++i)
10791 _data[i]=byte{};
10792 return*this;
10793 }
10794 constexpr auto operator<<(size_t n)const noexcept{return this_t(*this)<<=n;}
10795 constexpr auto operator>>(size_t n)const noexcept{return this_t(*this)>>=n;}
10796 constexpr auto operator&(const this_t&b)const noexcept{return this_t(*this)&=b;}
10797 constexpr auto operator|(const this_t&b)const noexcept{return this_t(*this)|=b;}
10798 constexpr auto operator^(const this_t&b)const noexcept{return this_t(*this)^=b;}
10799 constexpr auto operator==(const this_t&b)const noexcept{
10800 for(size_t i=0;i<data_size-1;++i)
10801 if(_data[i]!=b._data[i])
10802 return false;
10803 const auto mod=bit_num%bitnum_of(byte);
10804 return (_data[data_size-1]>>mod)==(b._data[data_size-1]>>mod);
10805 }
10806};
10807
10808//file_end
10809
10810 #line 112 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
10811 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/hash.hpp"
10812//hash.hpp
10813//at namespace elc::defs::base
10814/*
10815未完成的elc解释器base_defs文件
10816由steve02081504与Alex0125设计、编写
10817转载时请在不对此文件做任何修改的同时注明出处
10818项目地址:https://github.com/ELC-lang/ELC
10819*/
10820/*
10821 ,??????????????????????????
10822 ????????????????????????????
10823 ?????????????????????????????+
10824 ?????+++++++++++++++++++++++++
10825 ?????+++++++++++++++++++++++++
10826 ??????++++++++++++++++++++++++
10827 ?????++
10828 ?????+++
10829 ??????+++IIIIIIIIIIIIIIIIII
10830 ?????+++++IIIIIIIIIIIIIIIIII
10831 ?????++++++++++++++++++++++++
10832 ??????+++++++++++++++++++++++:
10833 ?????++
10834 ?????+++
10835 ??????++
10836 ??????????????????????????????II
10837 ??????????????????????????????IIII
10838 ,?????????????????????????????IIIII+
10839 =???++++++++++++++++++++++++++III?
10840 ?++++++++++++++++++++++++++++I+
10841*/
10842namespace hash_n{
10843 typedef size_t hash_base_t;
10846 constexpr hash_base_t operator%(auto&&a)const noexcept{
10847 return _value%a;
10848 }
10849 constexpr bool operator==(const hash_value_t&a)const noexcept{
10850 return _value==a._value;
10851 }
10852 };
10856
10857 template<class T>
10858 concept is_unstable_hash = type_info<T const>.can_convert_to<unstable_hash_value_t>;
10859 template<class T>
10860 concept is_fundamental_hash = ::std::is_fundamental_v<T>;
10861
10862 enable_adl(the_pointer_hash);
10870 template<class T>
10871 [[nodiscard]]inline constexpr hash_value_t pointer_hash(T*a)noexcept{
10872 if constexpr(was_not_an_ill_form(the_pointer_hash(a)))
10873 return the_pointer_hash(a);
10874 else
10875 return{hash_base_t(a)};
10876 }
10877
10878 inline struct hash_t{
10879 private:
10880 template<class T>
10881 [[nodiscard]]static inline constexpr bool nothrow_helper()noexcept{
10882 if constexpr(is_pointer<T>)
10883 return noexcept(pointer_hash(declvalue(const T&)));
10885 return noexcept(hash_value_t{hash_base_t(declvalue(const T&))});
10886 elseif constexpr(is_unstable_hash<T>)
10887 return noexcept(unstable_hash_value_t(declvalue(const T&)));
10888 elseif constexpr(was_not_an_ill_form(declvalue(const T&).hash()))
10889 return noexcept(declvalue(const T&).hash());
10890 elseif constexpr(was_not_an_ill_form(hash_value_t(declvalue(const T&))))
10891 return noexcept(hash_value_t(declvalue(const T&)));
10892 elseif constexpr(type_info<remove_cv<T>> == type_info<base_type_info_t>)
10893 return true;
10894 else
10895 return false;
10896 }
10897 public:
10898 template<class T>
10899 static constexpr bool nothrow=nothrow_helper<T>();
10900 private:
10901 template<class T>
10902 [[nodiscard]]static inline constexpr bool able_helper()noexcept{
10903 if constexpr(is_pointer<T>)
10904 return true;
10906 return true;
10907 elseif constexpr(is_unstable_hash<T>)
10908 return true;
10909 elseif constexpr(was_not_an_ill_form(declvalue(const T&).hash()))
10910 return true;
10911 elseif constexpr(was_not_an_ill_form(hash_value_t(declvalue(const T&))))
10912 return true;
10913 elseif constexpr(type_info<remove_cv<T>> == type_info<base_type_info_t>)
10914 return true;
10915 else
10916 return false;
10917 }
10918 public:
10919 template<class T>
10920 static constexpr bool able=able_helper<T>();
10921
10922 #define hash operator()
10923
10929 [[nodiscard]]inline constexpr hash_value_t hash(nothing)const noexcept{
10930 return{hash_base_t(nothing)};
10931 }
10939 [[nodiscard]]inline hash_value_t hash(const base_type_info_t&a)const noexcept{
10940 return{a.get_hash()};
10941 }
10949 template<class T> requires able<T>
10950 [[nodiscard]]constexpr_as_auto inline auto hash(const T&a)const noexcept(nothrow<T>){
10951 #undef hash
10952 if constexpr(is_pointer<T>)
10953 return pointer_hash(a);
10955 return hash_value_t{hash_base_t(a)};
10956 elseif constexpr(is_unstable_hash<T>)
10957 return unstable_hash_value_t(a);
10958 elseif constexpr(was_not_an_ill_form(declvalue(const T&).hash()))
10959 return a.hash();
10960 elseif constexpr(was_not_an_ill_form(hash_value_t(declvalue(const T&))))
10961 return hash_value_t(a);
10962 else{
10963 template_error("Please overload the function hash in the namespace where this type is defined.");
10964 return hash_value_t{};
10965 }
10966 #define hash operator()
10967 }
10975 template<class T>
10976 [[nodiscard]]constexpr_as_auto inline hash_base_t get_hash_in_base_type(const T&a)const noexcept(nothrow<T>){
10977 return hash(a)._value;
10978 }
10989 template<class T>
10990 [[nodiscard]]force_inline constexpr hash_value_t with_calculated_before(hash_value_t before,size_t before_size,const T*a,size_t size)const noexcept{
10991 hash_base_t aret=before._value;
10992 rot_iterator<decltype(aret)>rotl_offset = before_size+size;
10993 while(size--){
10994 aret ^= rotl(get_hash_in_base_type(a[size]),rotl_offset);
10995 rotl_offset--;
10996 }
10997 return{aret};
10998 }
11007 [[nodiscard]]force_inline constexpr hash_value_t repeat_times(hash_value_t value,size_t size)const noexcept{
11008 hash_base_t aret=0;
11009 {
11010 //优化.
11011 //关於此,咱确信咱发现一种美妙的证法来保证这个优化不影响结果,但可惜凋可怜的脑容量不足以让他看懂.
11012 constexpr size_t bit_range_max=bitnum_of(hash_base_t);
11013 constexpr hash_base_t void_hash{nothing};
11014 push_and_disable_msvc_warning(26475)//强制转换警告diss.
11015 constexpr hash_base_t npos_hash{hash_base_t(-1)};
11017 constexpr size_t bitnumof_void=bit_range_max*BIT_POSSIBILITY;
11018
11019 size=size%bitnumof_void;
11020 if(value._value==0 || size==0)
11021 return{void_hash};
11022 if(size >= bit_range_max){
11023 const bool is_npos = ::std::popcount(value._value)%BIT_POSSIBILITY;
11024 aret = is_npos?npos_hash:void_hash;
11025 size-=bit_range_max;
11026 }
11027 if(!size)
11028 return{aret};
11029 }
11030 rot_iterator<decltype(aret)>rotl_offset = size;
11031 while(size--){
11032 aret ^= rotl(value._value,rotl_offset);
11033 rotl_offset--;
11034 }
11035 return{aret};
11036 }
11045 template<class T>
11046 [[nodiscard]]force_inline constexpr hash_value_t repeat_times(T&&value,size_t size)const noexcept{
11047 return repeat_times(hash(value),size);
11048 }
11057 template<class T>
11058 [[nodiscard]]inline constexpr hash_value_t hash(const T*a,size_t size)const noexcept(nothrow<const T>){
11059 return with_calculated_before(hash(nothing),0,a,size);
11060 }
11072 hash_value_t before,size_t before_size,hash_value_t after,[[maybe_unused]]size_t after_size
11073 )const noexcept{
11074 return{before._value^(rotl(after._value,before_size))};
11075 }
11082 template<class T> requires is_not_signal_value_for_array_like<T>
11083 [[nodiscard]]inline constexpr hash_value_t hash(const array_like_view_t<T>&a)const noexcept(nothrow<T>){
11084 return hash(a.begin(),a.size());
11085 }
11095 template<class T> requires is_not_signal_value_for_array_like<T>
11096 [[nodiscard]]inline constexpr hash_value_t with_calculated_before(hash_value_t before,size_t before_size,const array_like_view_t<T>&a)const noexcept{
11097 return with_calculated_before(before,before_size,a.begin(),a.size());
11098 }
11099
11100 #undef hash
11101
11103}
11108using hash_n::hash;
11109
11110//file_end
11111
11112 #line 113 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
11113 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/range.hpp"
11114//range.hpp
11115//at namespace elc::defs::base
11116/*
11117未完成的elc解释器base_defs文件
11118由steve02081504与Alex0125设计、编写
11119转载时请在不对此文件做任何修改的同时注明出处
11120项目地址:https://github.com/ELC-lang/ELC
11121*/
11122/*
11123 ,??????????????????????????
11124 ????????????????????????????
11125 ?????????????????????????????+
11126 ?????+++++++++++++++++++++++++
11127 ?????+++++++++++++++++++++++++
11128 ??????++++++++++++++++++++++++
11129 ?????++
11130 ?????+++
11131 ??????+++IIIIIIIIIIIIIIIIII
11132 ?????+++++IIIIIIIIIIIIIIIIII
11133 ?????++++++++++++++++++++++++
11134 ??????+++++++++++++++++++++++:
11135 ?????++
11136 ?????+++
11137 ??????++
11138 ??????????????????????????????II
11139 ??????????????????????????????IIII
11140 ,?????????????????????????????IIIII+
11141 =???++++++++++++++++++++++++++III?
11142 ?++++++++++++++++++++++++++++I+
11143*/
11144namespace range_n{
11145 // range_t
11147 template<typename T>
11148 struct range_t{
11149 T _begin,_end;
11150 //_begin<=_end
11151 constexpr range_t(const T begin,const T end):_begin(begin),_end(end){}
11152 constexpr range_t(note::from_t<const T>begin,note::to_t<const T>end):_begin(begin),_end(end+1){}
11153 constexpr range_t(note::to_t<const T>end,note::from_t<const T>begin):_begin(begin),_end(end+1){}
11154 constexpr range_t(const T begin,note::size_type_t<const T>size):_begin(begin),_end(begin+size()){}
11155 constexpr range_t(const T begin,note::size_t size):_begin(begin),_end(begin+size()){}
11156
11157 constexpr size_t size()noexcept{return _end-_begin;}
11158 constexpr auto end()noexcept{return _end;}
11159 constexpr auto begin()noexcept{return _begin;}
11160 constexpr auto end()const noexcept{return _end;}
11161 constexpr auto begin()const noexcept{return _begin;}
11162
11163 template <class U> requires(type_info<T>.can_convert_to<U>)
11164 constexpr operator range_t<U>()const noexcept(type_info<T>.can_nothrow_convert_to<U>){
11165 return{_begin,_end};
11166 }
11167 };
11168
11169 template<class T>
11170 [[nodiscard]]inline auto size_of_array_like(range_t<T*>&a)noexcept{return a.size();}
11171 template<class T>
11172 [[nodiscard]]inline auto size_of_array_like(range_t<const T*>&a)noexcept{return a.size();}
11173
11174 template<class T>
11175 [[nodiscard]]inline auto begin_of_array_like(range_t<T*>&a)noexcept{return a.begin();}
11176 template<class T>
11177 [[nodiscard]]inline auto begin_of_array_like(range_t<const T*>&a)noexcept{return a.begin();}
11178
11179 // in_range
11181 template<typename T>
11182 [[nodiscard]]constexpr bool in_range(T pattern,const range_t<T>range)noexcept_as(bool(declvalue(T)>=declvalue(const T) && declvalue(T)<=declvalue(const T))){//算术类型或指针
11183 return bool(pattern>=range.begin() && pattern<range.end());
11184 }
11185 // in_range
11187 template<typename T>
11188 [[nodiscard]]constexpr bool in_range(T*pattern,const range_t<byte*>range)noexcept{
11189 return cast_to_data(pattern)>=range.begin() && cast_to_data(pattern)<range.end();
11190 }
11191 // match_pattern
11194 template<typename T>
11197 typedef unsigned char index_type;
11198
11199 size_t skip_table[number_of_possible_values_per<index_type>]{};
11200
11201 static constexpr index_type get_index_of(T&ch)noexcept{
11202 return index_type(hash(ch) % number_of_possible_values_per<index_type>);
11203 }
11204 constexpr void build_table(const array_like_view_t<T>&pattern)noexcept{
11205 const size_t m=pattern.size();
11206 if(!m)
11207 return;
11208 for(size_t i=0;i<number_of_possible_values_per<index_type>;i++)
11209 skip_table[i]=m+1;
11210 for(size_t i=0;i<m;i++)
11211 skip_table[get_index_of(pattern[i])]=m-i;
11212 }
11213 constexpr match_pattern(const array_like_view_t<T>&pattern)noexcept:_pattern(pattern){
11214 build_table(_pattern);
11215 }
11216 [[nodiscard]]constexpr T* match(const array_like_view_t<T>&range)const noexcept{
11217 size_t off_set=0;
11218 size_t matching_off_set=1;
11219
11220 floop{
11221 matching_off_set=1;
11222 while(_pattern.end()[0-matching_off_set]==range.begin()[off_set+_pattern.size()-matching_off_set])
11223 if(matching_off_set==_pattern.size())
11224 return addressof(range.begin()[off_set]);
11225 else
11226 matching_off_set++;
11227 if(off_set+_pattern.size() >= range.size())
11228 return nullptr;
11229 off_set+=skip_table[get_index_of(range.begin()[off_set+_pattern.size()])];
11230 }
11231 }
11232 };
11233 // reverse_match_pattern
11236 template<typename T>
11239 typedef unsigned char index_type;
11240
11241 size_t skip_table[number_of_possible_values_per<index_type>]{};
11242
11243 static constexpr index_type get_index_of(T&ch)noexcept{
11244 return index_type(hash(ch) % number_of_possible_values_per<index_type>);
11245 }
11246 constexpr void build_table(const array_like_view_t<T>&pattern)noexcept{
11247 const size_t m=pattern.size();
11248 if(!m)
11249 return;
11250 for(size_t i=0;i<number_of_possible_values_per<index_type>;i++)
11251 skip_table[i]=m+1;
11252 for(size_t i=0;i<m-1;i++)
11253 skip_table[get_index_of(pattern[i])]=i;
11254 }
11255 constexpr reverse_match_pattern(const array_like_view_t<T>&pattern)noexcept:_pattern(pattern){
11256 build_table(_pattern);
11257 }
11258 [[nodiscard]]constexpr T* match(const array_like_view_t<T>&range)const noexcept{
11259 size_t off_set=0;
11260 size_t matching_off_set=0;
11261
11262 floop{
11263 matching_off_set=0;
11264 while(_pattern.begin()[matching_off_set]==range.end()[0-(off_set+_pattern.size()-matching_off_set)])
11265 if(matching_off_set==_pattern.size()-1)
11266 return addressof(range.end()[0-(off_set+_pattern.size())]);
11267 else
11268 matching_off_set++;
11269 if(off_set+_pattern.size() >= range.size())
11270 return nullptr;
11271 off_set+=skip_table[get_index_of(range.end()[0-(off_set+_pattern.size()+1)])];
11272 off_set++;
11273 }
11274 }
11275 };
11277 template<typename T>
11278 [[nodiscard]]constexpr T* in_range(const remove_cvref<T>&pattern,array_like_view_t<T> range){
11279 for(auto&i : range){
11280 if(i==pattern)
11281 return addressof(i);
11282 }
11283 return nullptr;
11284 }
11286 template<typename T>
11287 [[nodiscard]]constexpr size_t in_range_size_t(const remove_cvref<T>&pattern,array_like_view_t<T> range){
11288 auto result = in_range(pattern,range);
11289 if(result)
11290 return result - range.begin();
11291 else
11292 return npos;
11293 }
11295 template<typename T>
11296 [[nodiscard]]constexpr T* in_range_but_reverse(const remove_cvref<T>&pattern,array_like_view_t<T> range){
11297 for(auto&i : range|::std::views::reverse){
11298 if(i==pattern)
11299 return addressof(i);
11300 }
11301 return nullptr;
11302 }
11304 template<typename T>
11305 [[nodiscard]]constexpr size_t in_range_but_reverse_size_t(const remove_cvref<T>&pattern,array_like_view_t<T> range){
11306 auto result = in_range_but_reverse(pattern,range);
11307 if(result)
11308 return result - range.begin();
11309 else
11310 return npos;
11311 }
11313 template<typename T>
11314 [[nodiscard,deprecated("cache match_pattern and don't waste it")]]
11315 constexpr T* in_range(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11316 match_pattern tmp=pattern;
11317 return tmp.match(range);
11318 }
11320 template<typename T>
11321 [[nodiscard]]constexpr size_t in_range_size_t(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11322 auto result = in_range(pattern,range);
11323 if(result)
11324 return result - range.begin();
11325 else
11326 return npos;
11327 }
11328 // 反向数据串匹配by steve02081504.
11330 template<typename T>
11331 [[nodiscard,deprecated("cache match_pattern and don't waste it")]]
11333 reverse_match_pattern tmp = pattern;
11334 return tmp.match(range);
11335 }
11337 template<typename T>
11338 [[nodiscard]]constexpr size_t in_range_but_reverse_size_t(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11339 auto result = in_range_but_reverse(pattern,range);
11340 if(result)
11341 return result - range.begin();
11342 else
11343 return npos;
11344 }
11345
11346 // bitmark_for_finds
11349 template<typename T>
11351 typedef unsigned char index_type;
11352 bool _bitmark[number_of_possible_values_per<index_type>]{};
11353
11354 bitmark_for_finds()noexcept=default;
11355 [[nodiscard]]constexpr bool mark(const array_like_view_t<T>&pattern)noexcept{
11356 if constexpr(number_of_possible_values_per<T> > number_of_possible_values_per<index_type>){
11357 for(auto& i: pattern){
11358 if(::std::make_unsigned_t<T>(i) >= number_of_possible_values_per<index_type>)
11359 return false;
11360 _bitmark[index_type(i)] = true;
11361 }
11362 }
11363 else{
11364 for(auto& i: pattern)
11365 _bitmark[index_type(i)] = true;
11366 }
11367 return true;
11368 }
11369 [[nodiscard]]constexpr bool operator[](T&index)const noexcept{
11370 if constexpr(number_of_possible_values_per<T> > number_of_possible_values_per<index_type>)
11371 if(::std::make_unsigned_t<T>(index) >= number_of_possible_values_per<index_type>)
11372 return false;
11373 return _bitmark[index_type(index)];
11374 }
11375 };
11378 template<typename T>
11379 [[nodiscard]]constexpr T* find_first_of_bitmark(const bitmark_for_finds<T>&mark,array_like_view_t<T> range){
11380 for(auto&i : range){
11381 if(mark[i])
11382 return addressof(i);
11383 }
11384 return nullptr;
11385 }
11388 template<typename T>
11389 [[nodiscard]]constexpr T* base_find_first_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11390 for(auto&i : range){
11391 if(in_range(i,pattern))
11392 return addressof(i);
11393 }
11394 return nullptr;
11395 }
11396 // find_first_of
11398 template<typename T>
11399 [[nodiscard]]constexpr T* find_first_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11400 if constexpr(basic_integer_type<T>){
11402 if(mark.mark(pattern))
11403 return find_first_of_bitmark(mark,range);
11404 }
11405 return base_find_first_of(pattern,range);
11406 }
11408 template<typename T>
11409 [[nodiscard]]constexpr size_t find_first_of_size_t(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11410 auto result = find_first_of(pattern,range);
11411 if(result)
11412 return result - range.begin();
11413 else
11414 return npos;
11415 }
11418 template<typename T>
11419 [[nodiscard]]constexpr T* find_last_of_bitmark(const bitmark_for_finds<T>&mark,array_like_view_t<T> range){
11420 for(auto& i: range|::std::views::reverse){
11421 if(mark[i])
11422 return addressof(i);
11423 }
11424 }
11427 template<typename T>
11428 [[nodiscard]]constexpr T* base_find_last_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11429 for(auto&i : range|::std::views::reverse){
11430 if(in_range(i,pattern))
11431 return addressof(i);
11432 }
11433 return nullptr;
11434 }
11435 // find_last_of
11437 template<typename T>
11438 [[nodiscard]]constexpr T* find_last_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11439 if constexpr(basic_integer_type<T>){
11441 if(mark.mark(pattern))
11442 return find_last_of_bitmark(mark,range);
11443 }
11444 return base_find_last_of(pattern,range);
11445 }
11447 template<typename T>
11448 [[nodiscard]]constexpr size_t find_last_of_size_t(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11449 auto result = find_last_of(pattern,range);
11450 if(result)
11451 return result - range.begin();
11452 else
11453 return npos;
11454 }
11457 template<typename T>
11458 [[nodiscard]]constexpr T* find_first_not_of_bitmark(const bitmark_for_finds<T>&mark,array_like_view_t<T> range){
11459 for(auto& i: range){
11460 if(!mark[i])
11461 return addressof(i);
11462 }
11463 return nullptr;
11464 }
11467 template<typename T>
11468 [[nodiscard]]constexpr T* base_find_first_not_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11469 for(auto&i : range){
11470 if(!in_range(i,pattern))
11471 return addressof(i);
11472 }
11473 return nullptr;
11474 }
11475 // find_first_not_of
11477 template<typename T>
11478 [[nodiscard]]constexpr T* find_first_not_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11479 if constexpr(basic_integer_type<T>){
11481 if(mark.mark(pattern))
11482 return find_first_not_of_bitmark(mark,range);
11483 }
11484 return base_find_first_not_of(pattern,range);
11485 }
11487 template<typename T>
11488 [[nodiscard]]constexpr size_t find_first_not_of_size_t(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11489 auto result = find_first_not_of(pattern,range);
11490 if(result)
11491 return result - range.begin();
11492 else
11493 return npos;
11494 }
11497 template<typename T>
11498 [[nodiscard]]constexpr T* find_last_not_of_bitmark(const bitmark_for_finds<T>&mark,array_like_view_t<T> range){
11499 for(auto& i: range|::std::views::reverse){
11500 if(!mark[i])
11501 return addressof(i);
11502 }
11503 return nullptr;
11504 }
11507 template<typename T>
11508 [[nodiscard]]constexpr T* base_find_last_not_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11509 for(auto&i : range|::std::views::reverse){
11510 if(!in_range(i,pattern))
11511 return addressof(i);
11512 }
11513 return nullptr;
11514 }
11515 // bitmark_for_quick_unindex
11518 template<typename T>
11520 typedef unsigned char index_type;
11521 size_t _bitmark[number_of_possible_values_per<index_type>]{};
11522
11523 constexpr void bitmark_data_initer(size_t init_to)noexcept{
11524 for(auto& i:_bitmark)
11525 i=init_to;
11526 }
11527
11528 bitmark_for_quick_unindex()noexcept=default;
11529 [[nodiscard]]constexpr bool mark(const array_like_view_t<T>&pattern)noexcept{
11530 bitmark_data_initer(npos);
11531 #define failed bitmark_data_initer(npos),false
11532 if constexpr(number_of_possible_values_per<T> > number_of_possible_values_per<index_type>){
11533 size_t i=0;
11534 const size_t end=pattern.size();
11535 while(i<end){
11536 auto&ch=pattern[i];
11537 if(::std::make_unsigned_t<T>(ch) >= number_of_possible_values_per<index_type>)
11538 return failed;
11539 auto&index=_bitmark[index_type(ch)];
11540 if(index!=npos)
11541 return failed;
11542 index=i;
11543 i++;
11544 }
11545 }
11546 else{
11547 size_t i=0;
11548 const size_t end=pattern.size();
11549 while(i<end){
11550 auto&ch=pattern[i];
11551 auto&index=_bitmark[index_type(ch)];
11552 if(index!=npos)
11553 return failed;
11554 index=i;
11555 i++;
11556 }
11557 }
11558 #undef failed
11559 return true;
11560 }
11561 [[nodiscard]]constexpr size_t operator[](T&index)const noexcept{
11562 if constexpr(number_of_possible_values_per<T> > number_of_possible_values_per<index_type>)
11563 if(::std::make_unsigned_t<T>(index) >= number_of_possible_values_per<index_type>)
11564 return npos;
11565 return _bitmark[index_type(index)];
11566 }
11567 };
11568 // find_last_not_of
11570 template<typename T>
11571 [[nodiscard]]constexpr T* find_last_not_of(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11572 if constexpr(basic_integer_type<T>){
11574 if(mark.mark(pattern))
11575 return find_last_not_of_bitmark(mark,range);
11576 }
11577 return base_find_last_not_of(pattern,range);
11578 }
11580 template<typename T>
11581 [[nodiscard]]constexpr size_t find_last_not_of_size_t(const array_like_view_t<T>&pattern,array_like_view_t<T> range){
11582 auto result = find_last_not_of(pattern,range);
11583 if(result)
11584 return result - range.begin();
11585 else
11586 return npos;
11587 }
11588}
11589using range_n::range_t;
11590using range_n::in_range;
11591using range_n::in_range_size_t;
11592using range_n::in_range_but_reverse;
11593using range_n::in_range_but_reverse_size_t;
11594using range_n::find_first_of;
11595using range_n::find_last_of;
11596using range_n::find_first_not_of;
11597using range_n::find_last_not_of;
11598
11599//file_end
11600
11601 #line 114 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
11602 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/sort.hpp"
11603//sort.hpp
11604//at namespace elc::defs::base
11605/*
11606未完成的elc解释器base_defs文件
11607由steve02081504与Alex0125设计、编写
11608转载时请在不对此文件做任何修改的同时注明出处
11609项目地址:https://github.com/ELC-lang/ELC
11610*/
11611/*
11612 ,??????????????????????????
11613 ????????????????????????????
11614 ?????????????????????????????+
11615 ?????+++++++++++++++++++++++++
11616 ?????+++++++++++++++++++++++++
11617 ??????++++++++++++++++++++++++
11618 ?????++
11619 ?????+++
11620 ??????+++IIIIIIIIIIIIIIIIII
11621 ?????+++++IIIIIIIIIIIIIIIIII
11622 ?????++++++++++++++++++++++++
11623 ??????+++++++++++++++++++++++:
11624 ?????++
11625 ?????+++
11626 ??????++
11627 ??????????????????????????????II
11628 ??????????????????????????????IIII
11629 ,?????????????????????????????IIIII+
11630 =???++++++++++++++++++++++++++III?
11631 ?++++++++++++++++++++++++++++I+
11632*/
11633
11634namespace sort_n{
11636
11637 //heapsort
11638 template<typename iter_t, typename compare_t = default_compare_t>
11639 void heapify(iter_t begin, iter_t end, iter_t i, compare_t compare = compare_t()) {
11640 auto largest = i; // 初始化largest为根节点
11641 auto left_child = begin + 2 * (i - begin) + 1; // 左子节点
11642 auto right_child = left_child + 1; // 右子节点
11643
11644 // 如果左子节点比根节点大,则更新largest
11645 if (left_child < end && compare(*left_child, *largest)==strong_ordering::greater)
11646 largest = left_child;
11647
11648 // 如果右子节点比根节点大,则更新largest
11649 if (right_child < end && compare(*right_child, *largest)==strong_ordering::greater)
11650 largest = right_child;
11651
11652 // 如果largest不是根节点,则交换根节点和largest的值,并递归地对largest子树进行heapify
11653 if (largest != i) {
11654 swap(*i,*largest);
11655 heapify(begin, end, largest, compare);
11656 }
11657 }
11658
11659 template<typename iter_t, typename compare_t = default_compare_t>
11660 void build_max_heap(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11661 auto n = end - begin;
11662
11663 // 从最后一个非叶子节点开始进行heapify,直到根节点
11664 for (auto i = n / 2 - 1; i >= 0; i--)
11665 heapify(begin, end, begin + i, compare);
11666 }
11667
11668 template<typename iter_t, typename compare_t = default_compare_t>
11669 void heapsort(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11670 auto n = end - begin;
11671
11672 // 构建最大堆
11673 build_max_heap(begin, end, compare);
11674
11675 // 从最后一个元素开始,依次将其与堆顶元素交换,并对堆顶元素进行heapify
11676 for (auto i = n - 1; i >= 0; i--) {
11677 swap(*begin,begin[i]);
11678 heapify(begin, begin + i, begin, compare);
11679 }
11680 }
11681
11682 template<typename array_t, typename compare_t = default_compare_t>
11683 void heapify(array_t& array, size_t i, compare_t compare = compare_t()) {
11684 heapify(array.begin(), array.end(), array.begin() + i, compare);
11685 }
11686 template<typename array_t, typename compare_t = default_compare_t>
11687 void build_max_heap(array_t& array, compare_t compare = compare_t()) {
11688 build_max_heap(array.begin(), array.end(), compare);
11689 }
11690 template<typename array_t, typename compare_t = default_compare_t>
11691 array_t&& heapsort(array_t&& array, compare_t compare = compare_t()) {
11692 heapsort(array.begin(), array.end(), compare);
11693 return forward<array_t>(array);
11694 }
11695
11696 //insertion_sort
11697 template<typename iter_t, typename compare_t = default_compare_t>
11698 void insertion_sort(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11699 // 从第二个元素开始,依次将其插入到前面已排序的数组中
11700 for (auto i = begin + 1; i < end; i++) {
11701 auto key = move(*i);
11702 auto j = i - 1;
11703 // 将比key大的元素向后移动
11704 while (j >= begin && compare(*j, key)==strong_ordering::greater) {
11705 *(j + 1) = move(*j);
11706 j--;
11707 }
11708 // 将key插入到正确的位置
11709 *(j + 1) = move(key);
11710 }
11711 }
11712 template<typename array_t, typename compare_t = default_compare_t>
11713 array_t&& insertion_sort(array_t&& array, compare_t compare = compare_t()) {
11714 insertion_sort(array.begin(), array.end(), compare);
11715 return forward<array_t>(array);
11716 }
11717
11718 //quicksort
11719 // partition函数
11720 template<typename iter_t, typename compare_t = default_compare_t>
11721 iter_t partition(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11722 // 选取最后一个元素作为pivot
11723 auto&pivot = end[-1];
11724 auto i = begin;
11725 for (auto j = begin; j < end - 1; j++) {
11726 // 如果当前元素小于pivot,将其交换到左边
11727 if (compare(*j, pivot)==strong_ordering::less) {
11728 swap(*i,*j);
11729 i++;
11730 }
11731 }
11732 // 将pivot放到正确的位置
11733 swap(*i,pivot);
11734 return i;
11735 }
11736
11737 // quicksort函数
11738 template<typename iter_t, typename compare_t = default_compare_t>
11739 void quicksort(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11740 while (end - begin > 1) {
11741 // 分割数组并递归排序
11742 const auto pivot = partition(begin, end, compare);
11743 quicksort(begin, pivot, compare);
11744 begin = pivot + 1;
11745 }
11746 }
11747 template<typename array_t, typename compare_t = default_compare_t>
11748 array_t&& quicksort(array_t&& array, compare_t compare = compare_t()) {
11749 quicksort(array.begin(), array.end(), compare);
11750 return forward<array_t>(array);
11751 }
11752
11753 //introsort
11754 constexpr size_t size_threshold = 1<<4;
11755
11756 // introsort循环函数
11757 template<typename iter_t, typename compare_t = default_compare_t>
11758 void introsort_loop(iter_t begin, iter_t end, size_t depth_limit, compare_t compare = compare_t()) {
11759 while (end - begin > size_threshold) {
11760 // 如果递归深度达到了限制,使用heapsort排序
11761 if (depth_limit == 0) {
11762 heapsort(begin, end, compare);
11763 return;
11764 }
11765 depth_limit--;
11766
11767 // 分割数组并递归排序
11768 const auto pivot = partition(begin, end, compare);
11769 introsort_loop(pivot + 1, end, depth_limit, compare);
11770 end = pivot;
11771 }
11772 insertion_sort(begin, end, compare);
11773 }
11774
11775 // introsort函数
11776 template<typename iter_t, typename compare_t = default_compare_t>
11777 void introsort(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11778 const auto n = end - begin;
11779 // 如果数组长度小于等于size_threshold,使用插入排序
11780 if (n <= size_threshold)
11781 return insertion_sort(begin, end, compare);
11782 // 否则使用introsort
11783 const auto depth_limit = decltype(n)(2 * log(n, 2));
11784 introsort_loop(begin, end, depth_limit, compare);
11785 }
11786 template<typename array_t, typename compare_t = default_compare_t>
11787 array_t&& introsort(array_t&& array, compare_t compare = compare_t()) {
11788 introsort(array.begin(), array.end(), compare);
11789 return forward<array_t>(array);
11790 }
11791
11792 // 默认排序函数
11793 template<typename iter_t, typename compare_t = default_compare_t>
11794 void sort(iter_t begin, iter_t end, compare_t compare = compare_t()) {
11795 introsort(begin, end, compare);
11796 }
11797 template<typename array_t, typename compare_t = default_compare_t>
11798 array_t&& sort(array_t&& array, compare_t compare = compare_t()) {
11799 sort(array.begin(), array.end(), compare);
11800 return forward<array_t>(array);
11801 }
11802}
11803using sort_n::sort;
11804
11805//file_end
11806
11807 #line 115 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
11808 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/string_view.hpp"
11809//string_view.hpp
11810//at namespace elc::defs::base
11811/*
11812未完成的elc解释器base_defs文件
11813由steve02081504与Alex0125设计、编写
11814转载时请在不对此文件做任何修改的同时注明出处
11815项目地址:https://github.com/ELC-lang/ELC
11816*/
11817/*
11818 ,??????????????????????????
11819 ????????????????????????????
11820 ?????????????????????????????+
11821 ?????+++++++++++++++++++++++++
11822 ?????+++++++++++++++++++++++++
11823 ??????++++++++++++++++++++++++
11824 ?????++
11825 ?????+++
11826 ??????+++IIIIIIIIIIIIIIIIII
11827 ?????+++++IIIIIIIIIIIIIIIIII
11828 ?????++++++++++++++++++++++++
11829 ??????+++++++++++++++++++++++:
11830 ?????++
11831 ?????+++
11832 ??????++
11833 ??????????????????????????????II
11834 ??????????????????????????????IIII
11835 ,?????????????????????????????IIIII+
11836 =???++++++++++++++++++++++++++III?
11837 ?++++++++++++++++++++++++++++I+
11838*/
11839//仅是声明
11840namespace constexpr_str_n{
11841 template<typename char_T>
11842 struct constexpr_str_t;
11843}
11845//重载range操作
11846//仅是声明以及size_t包装
11847namespace range_n{
11848 template<typename T>
11849 [[nodiscard]]constexpr T* in_range(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range);
11850 //若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
11851 template<typename T>
11852 [[nodiscard]]constexpr size_t in_range_size_t(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
11853 auto result = in_range(pattern, range);
11854 if(result)
11855 return result - range.data();
11856 else
11857 return npos;
11858 }
11859 template<typename T>
11860 [[nodiscard]]constexpr T* in_range_but_reverse(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range);
11861 //若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
11862 template<typename T>
11863 [[nodiscard]]constexpr size_t in_range_but_reverse_size_t(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
11864 auto result = in_range_but_reverse(pattern, range);
11865 if(result)
11866 return result - range.data();
11867 else
11868 return npos;
11869 }
11870 template<typename T>
11871 [[nodiscard]]constexpr T* find_first_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range);
11872 //若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
11873 template<typename T>
11874 [[nodiscard]]constexpr size_t find_first_of_size_t(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
11875 auto result = find_first_of(pattern, range);
11876 if(result)
11877 return result - range.data();
11878 else
11879 return npos;
11880 }
11881 template<typename T>
11882 [[nodiscard]]constexpr T* find_last_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range);
11883 //若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
11884 template<typename T>
11885 [[nodiscard]]constexpr size_t find_last_of_size_t(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
11886 auto result = find_last_of(pattern, range);
11887 if(result)
11888 return result - range.data();
11889 else
11890 return npos;
11891 }
11892 template<typename T>
11893 [[nodiscard]]constexpr T* find_first_not_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range);
11894 //若成功找到不匹配的数据项,返回其距离开头的步数,若未找到,返回npos
11895 template<typename T>
11896 [[nodiscard]]constexpr size_t find_first_not_of_size_t(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
11897 auto result = find_first_not_of(pattern, range);
11898 if(result)
11899 return result - range.data();
11900 else
11901 return npos;
11902 }
11903 template<typename T>
11904 [[nodiscard]]constexpr T* find_last_not_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range);
11905 //若成功找到不匹配的数据项,返回其距离开头的步数,若未找到,返回npos
11906 template<typename T>
11907 [[nodiscard]]constexpr T* find_last_not_of_size_t(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
11908 auto result = find_last_not_of(pattern,range);
11909 if(result)
11910 return result - range.begin();
11911 else
11912 return npos;
11913 }
11914}
11915//开始定义
11916namespace string_view_n{
11918 template<typename char_T>
11919 struct string_view_t:array_like_view_t<const char_T>{
11920 static constexpr size_t npos=bit::npos;
11922 typedef char_T*string_ptr_t;
11923 typedef const char_T*const_string_ptr_t;
11924 //构造函数
11925 using base_t::base_t;
11927 //成员函数
11928 [[nodiscard]]constexpr const char_T*str()const noexcept{return base_t::cbegin();}
11929 [[nodiscard]]constexpr const char_T*data()const noexcept{return base_t::cbegin();}
11930 [[nodiscard]]constexpr operator const char_T*()const noexcept{return str();}
11931 //substr
11932 [[nodiscard]]constexpr string_view_t substr(size_t pos,size_t len)const noexcept{
11933 return string_view_t(base_t::cbegin()+pos,len);
11934 }
11935 [[nodiscard]]constexpr string_view_t substr(size_t pos)const noexcept{
11936 return string_view_t(base_t::cbegin()+pos,base_t::size()-pos);
11937 }
11938 [[nodiscard]]constexpr string_view_t substr(size_t pos,const char_T*end)const noexcept{
11939 return string_view_t(base_t::cbegin()+pos,end-base_t::cbegin());
11940 }
11941 [[nodiscard]]constexpr string_view_t substr(const char_T*begin,size_t len)const noexcept{
11942 return string_view_t(begin,len);
11943 }
11944 [[nodiscard]]constexpr string_view_t substr(const char_T*begin)const noexcept{
11945 return string_view_t(begin,base_t::cend()-begin);
11946 }
11947 [[nodiscard]]constexpr string_view_t substr(const char_T*begin,const char_T*end)const noexcept{
11948 return string_view_t(begin,end-begin);
11949 }
11950 //starts_with
11951 [[nodiscard]]constexpr bool starts_with(const char_T ch)const noexcept{
11952 return base_t::size()&&base_t::cbegin()[0]==ch;
11953 }
11954 [[nodiscard]]constexpr bool starts_with(string_view_t str)const noexcept{
11955 if(str.size()>base_t::size())
11956 return false;
11957 return equal(base_t::cbegin(),str.cbegin(),str.size());
11958 }
11959 [[nodiscard]]constexpr bool starts_with(const char_T*str)const noexcept{
11960 size_t i = 0;
11961 const auto len = base_t::size();
11962 while(i<len&&str[i])
11963 if(base_t::cbegin()[i]!=str[i])
11964 return false;
11965 else
11966 ++i;
11967 return str[i]==0;
11968 }
11969 //find
11970 [[nodiscard]]constexpr size_t find(const char_T ch)const{
11971 return in_range_size_t(ch, *this);
11972 }
11973 [[nodiscard]]constexpr size_t reverse_find(const char_T ch)const{
11974 return in_range_but_reverse_size_t(ch, *this);
11975 }
11976 [[nodiscard]]constexpr size_t find(string_view_t str)const{
11977 return in_range_size_t(str, *this);
11978 }
11979 [[nodiscard]]constexpr size_t reverse_find(string_view_t str)const{
11980 return in_range_but_reverse_size_t(str, *this);
11981 }
11982 [[nodiscard]]constexpr size_t find(const constexpr_str_t<char_T>&str)const{
11983 return in_range_size_t(str, *this);
11984 }
11985 [[nodiscard]]constexpr size_t reverse_find(const constexpr_str_t<char_T>&str)const{
11986 return in_range_but_reverse_size_t(str, *this);
11987 }
11988 //others by range_n::find_last_of_size_t etc
11989 [[nodiscard]]constexpr size_t find_first_of(const char_T ch)const{
11990 return range_n::find_first_of_size_t(array_like_view_t<const char_T>(&ch, 1), *this);
11991 }
11992 [[nodiscard]]constexpr size_t find_last_of(const char_T ch)const{
11993 return range_n::find_last_of_size_t(array_like_view_t<const char_T>(&ch, 1), *this);
11994 }
11995 [[nodiscard]]constexpr size_t find_first_not_of(const char_T ch)const{
11996 return range_n::find_first_not_of_size_t(array_like_view_t<const char_T>(&ch, 1), *this);
11997 }
11998 [[nodiscard]]constexpr size_t find_last_not_of(const char_T ch)const{
11999 return range_n::find_last_not_of_size_t(array_like_view_t<const char_T>(&ch, 1), *this);
12000 }
12001 [[nodiscard]]constexpr size_t find_first_of(string_view_t str)const{
12002 return range_n::find_first_of_size_t(str, *this);
12003 }
12004 [[nodiscard]]constexpr size_t find_last_of(string_view_t str)const{
12005 return range_n::find_last_of_size_t(str, *this);
12006 }
12007 [[nodiscard]]constexpr size_t find_first_not_of(string_view_t str)const{
12008 return range_n::find_first_not_of_size_t(str, *this);
12009 }
12010 [[nodiscard]]constexpr size_t find_last_not_of(string_view_t str)const{
12011 return range_n::find_last_not_of_size_t(str, *this);
12012 }
12013 [[nodiscard]]constexpr size_t find_first_of(const constexpr_str_t<char_T>&str)const{
12014 return range_n::find_first_of_size_t(str, *this);
12015 }
12016 [[nodiscard]]constexpr size_t find_last_of(const constexpr_str_t<char_T>&str)const{
12017 return range_n::find_last_of_size_t(str, *this);
12018 }
12019 [[nodiscard]]constexpr size_t find_first_not_of(const constexpr_str_t<char_T>&str)const{
12020 return range_n::find_first_not_of_size_t(str, *this);
12021 }
12022 [[nodiscard]]constexpr size_t find_last_not_of(const constexpr_str_t<char_T>&str)const{
12023 return range_n::find_last_not_of_size_t(str, *this);
12024 }
12025 };
12027}
12030
12031//file_end
12032
12033 #line 116 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12034 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/type_name.hpp"
12035//type_name.hpp
12036//at namespace elc::defs::base
12037/*
12038未完成的elc解释器base_defs文件
12039由steve02081504与Alex0125设计、编写
12040转载时请在不对此文件做任何修改的同时注明出处
12041项目地址:https://github.com/ELC-lang/ELC
12042*/
12043/*
12044 ,??????????????????????????
12045 ????????????????????????????
12046 ?????????????????????????????+
12047 ?????+++++++++++++++++++++++++
12048 ?????+++++++++++++++++++++++++
12049 ??????++++++++++++++++++++++++
12050 ?????++
12051 ?????+++
12052 ??????+++IIIIIIIIIIIIIIIIII
12053 ?????+++++IIIIIIIIIIIIIIIIII
12054 ?????++++++++++++++++++++++++
12055 ??????+++++++++++++++++++++++:
12056 ?????++
12057 ?????+++
12058 ??????++
12059 ??????????????????????????????II
12060 ??????????????????????????????IIII
12061 ,?????????????????????????????IIIII+
12062 =???++++++++++++++++++++++++++III?
12063 ?++++++++++++++++++++++++++++I+
12064*/
12066 //对于gcc和clang,这个类型有一个malloced的char*,以便于在析构时释放
12067 //一切源于abi::__cxa_demangle
12068 //对于msvc,这个类型析构时不需要做任何事情
12071 static base_t demangle(const char*original_name)noexcept{
12072 push_and_disable_msvc_warning(26494);//未初始化警告diss
12073 size_t len;
12074 const char*demangled_name;
12076 #if defined(__clang__)||defined(__GNUC__)
12077 //gcc和clang
12078 //使用abi::__cxa_demangle重整
12079 int status;
12080 demangled_name=::abi::__cxa_demangle(original_name,nullptr,&len,&status);
12081 if(status!=0){
12082 demangled_name=original_name;
12083 len=::std::strlen(original_name);
12084 ::std::free((void*)demangled_name);
12085 }
12086 #else
12087 //msvc
12088 //不需要重整
12089 demangled_name=original_name;
12090 len=::std::strlen(original_name);
12091 #endif
12092 return base_t{demangled_name,len};
12093 }
12095 static base_t copy_demangle(base_t demangled_name)noexcept{
12096 #if defined(__clang__)||defined(__GNUC__)
12097 //gcc和clang
12098 //需要复制重整结果(用malloced的char*)
12099 char*copyed_name=(char*)::std::malloc(demangled_name.size()+1);
12100 if(copyed_name==nullptr)
12101 return base_t{nullptr,0};
12102 ::std::memcpy(copyed_name,demangled_name.data(),demangled_name.size());
12103 copyed_name[demangled_name.size()]='\0';
12104 return base_t{copyed_name,demangled_name.size()};
12105 #else
12106 //msvc
12107 //不需要复制重整结果
12108 return demangled_name;
12109 #endif
12110 }
12112 demangle_name_t(const char*original_name)noexcept:base_t(demangle(original_name)){}
12114 demangle_name_t(const demangle_name_t&other)noexcept:base_t(copy_demangle(other)){}
12117 swap_with(other);
12118 }
12121 #if defined(__clang__)||defined(__GNUC__)
12122 //gcc和clang
12123 //需要释放malloced的char*
12124 ::std::free((void*)begin());
12125 #endif
12126 }
12127};
12132[[nodiscard]]inline type_name_t base_type_info_t::get_name()const noexcept{
12133 return _tid.get_name();
12134}
12135[[nodiscard]]inline type_name_t base_type_info_t::type_id_t::get_name()const noexcept{
12136 return _m->name();
12137}
12138template<typename T>
12139[[nodiscard]]inline type_name_t type_info_t<T>::get_name()const noexcept{
12140 return base_type_info_t(*this).get_name();
12141}
12142
12143//file_end
12144
12145 #line 117 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12146 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/constexpr_str.hpp"
12147//constexpr_str.hpp
12148//at namespace elc::defs::base
12149/*
12150未完成的elc解释器base_defs文件
12151由steve02081504与Alex0125设计、编写
12152转载时请在不对此文件做任何修改的同时注明出处
12153项目地址:https://github.com/ELC-lang/ELC
12154*/
12155/*
12156 ,??????????????????????????
12157 ????????????????????????????
12158 ?????????????????????????????+
12159 ?????+++++++++++++++++++++++++
12160 ?????+++++++++++++++++++++++++
12161 ??????++++++++++++++++++++++++
12162 ?????++
12163 ?????+++
12164 ??????+++IIIIIIIIIIIIIIIIII
12165 ?????+++++IIIIIIIIIIIIIIIIII
12166 ?????++++++++++++++++++++++++
12167 ??????+++++++++++++++++++++++:
12168 ?????++
12169 ?????+++
12170 ??????++
12171 ??????????????????????????????II
12172 ??????????????????????????????IIII
12173 ,?????????????????????????????IIIII+
12174 =???++++++++++++++++++++++++++III?
12175 ?++++++++++++++++++++++++++++I+
12176*/
12177namespace constexpr_str_n{
12179 template<typename char_T>
12182 using base_t::base_t;
12186 //成员函数
12187 [[nodiscard]]constexpr const_string_ptr_t str()const noexcept{return base_t::cbegin();}
12188 [[nodiscard]]constexpr const_string_ptr_t data()const noexcept{return base_t::cbegin();}
12189 [[nodiscard]]constexpr operator const_string_ptr_t ()const noexcept{return str();}
12190 //substr
12191 [[nodiscard]]constexpr constexpr_str_view_t substr(size_t pos,size_t len)const noexcept{
12192 return base_t::substr(pos,len);
12193 }
12194 [[nodiscard]]constexpr constexpr_str_view_t substr(size_t pos)const noexcept{
12195 return base_t::substr(pos);
12196 }
12197 [[nodiscard]]constexpr constexpr_str_view_t substr(size_t pos,const char_T*end)const noexcept{
12198 return base_t::substr(pos,end);
12199 }
12200 [[nodiscard]]constexpr constexpr_str_view_t substr(const char_T*begin,size_t len)const noexcept{
12201 return base_t::substr(begin,len);
12202 }
12203 [[nodiscard]]constexpr constexpr_str_view_t substr(const char_T*begin)const noexcept{
12204 return base_t::substr(begin);
12205 }
12206 [[nodiscard]]constexpr constexpr_str_view_t substr(const char_T*begin,const char_T*end)const noexcept{
12207 return base_t::substr(begin,end);
12208 }
12209 };
12211 template<typename char_T>
12214 typedef char_T*string_ptr_t;
12215 typedef const char_T*const_string_ptr_t;
12222 bool is_bitmark_for_unindex_workable=0;
12223 constexpr constexpr_str_t(const_string_ptr_t str, size_t size):
12224 base_t(str, size),
12225 hash_result(defs::hash(str, size)),
12226 match_pattern(array_like_view_t<const char_T>{str, size}),
12227 reverse_match_pattern(array_like_view_t<const char_T>{str, size}){
12228 is_bitmark_workable = bitmark_for_finds.mark(*this);
12229 if(is_bitmark_workable)
12230 is_bitmark_for_unindex_workable=bitmark_for_unindex.mark(*this);
12231 }
12232 constexpr constexpr_str_t(const_string_ptr_t str):constexpr_str_t(str,array_end_by_zero_t<char_T>::get_length_of(str)){}
12233 consteval constexpr_str_t(const constexpr_str_t&str)=default;
12234 [[nodiscard]]constexpr hash_t hash()const noexcept{return hash_result;}
12235 };
12237 template<class char_T,size_t N>
12239 typedef char_T*string_ptr_t;
12240 typedef const char_T*const_string_ptr_t;
12242 constexpr constexpr_str_t_literal_helper(const char_T(&str)[N])noexcept{
12243 _array_begin=str;
12244 }
12245 [[nodiscard]]constexpr auto get_constexpr_str_t()const noexcept{
12246 return constexpr_str_t{_array_begin,N-1};
12247 }
12248 };
12249 template<constexpr_str_t_literal_helper v>
12251 distinctive static constexpr auto value = v.get_constexpr_str_t();
12252 };
12253 //别问,问就是傻逼c++
12255 template<constexpr_str_t_literal_helper str_helper>
12256 [[nodiscard]]inline consteval const auto& operator ""_constexpr_str()noexcept{
12258 }
12260 template<class char_T>
12261 distinctive inline constexpr auto empty_constexpr_str_of = constexpr_str_t(&const_default_value_of<char_T>,0);
12262};
12266using constexpr_str_n::empty_constexpr_str_of;
12267using constexpr_str_n::operator ""_constexpr_str;
12268
12269//重载range操作
12270namespace range_n{
12271 template<typename T>
12272 [[nodiscard]]constexpr T* in_range(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
12273 return pattern.match_pattern.match(range);
12274 }
12275 template<typename T>
12276 [[nodiscard]]constexpr T* in_range_but_reverse(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
12277 return pattern.reverse_match_pattern.match(range);
12278 }
12279 //find_first_of
12280 //若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
12281 template<typename T>
12282 [[nodiscard]]constexpr T* find_first_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
12283 if(pattern.is_bitmark_workable)
12284 return find_first_of_bitmark(pattern.bitmark_for_finds,range);
12285 else
12286 return find_first_of((const constexpr_str_view_t<T>&)pattern,range);
12287 }
12288 //find_last_of
12289 //若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
12290 template<typename T>
12291 [[nodiscard]]constexpr T* find_last_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
12292 if(pattern.is_bitmark_workable)
12293 return find_last_of_bitmark(pattern.bitmark_for_finds,range);
12294 else
12295 return find_last_of((const constexpr_str_view_t<T>&)pattern,range);
12296 }
12297 //find_first_not_of
12298 //若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
12299 template<typename T>
12300 [[nodiscard]]constexpr T* find_first_not_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
12301 if(pattern.is_bitmark_workable)
12302 return find_first_not_of_bitmark(pattern.bitmark_for_finds,range);
12303 else
12304 return find_first_not_of((const constexpr_str_view_t<T>&)pattern,range);
12305 }
12306 //find_last_not_of
12307 //若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
12308 template<typename T>
12309 [[nodiscard]]constexpr T* find_last_not_of(const constexpr_str_t<remove_cvref<T>>&pattern,array_like_view_t<T> range){
12310 if(pattern.is_bitmark_workable)
12311 return find_last_not_of_bitmark(pattern.bitmark_for_finds,range);
12312 else
12313 return find_last_not_of((const constexpr_str_view_t<T>&)pattern,range);
12314 }
12315
12316 // 单字匹配相关
12317
12319 template<typename T>
12320 [[nodiscard]]constexpr const T* in_range(const remove_cvref<T>&pattern,const constexpr_str_t<T>&range){
12322 auto result = range.bitmark_for_unindex[pattern];
12323 return result==npos?nullptr:range.begin()+result;
12324 }
12325 else
12326 return in_range(pattern,(const constexpr_str_view_t<T>&)range);
12327 }
12329 template<typename T>
12330 [[nodiscard]]constexpr size_t in_range_size_t(const remove_cvref<T>&pattern,const constexpr_str_t<T>&range){
12332 return range.bitmark_for_unindex[pattern];
12333 else
12334 return in_range_size_t(pattern,(const constexpr_str_view_t<T>&)range);
12335 }
12337 template<typename T>
12338 [[nodiscard]]constexpr const T* in_range_but_reverse(const remove_cvref<T>&pattern,const constexpr_str_t<T>&range){
12340 auto result = range.bitmark_for_unindex[pattern];
12341 return result==npos?nullptr:range.begin()+result;
12342 }
12343 else
12344 return in_range_but_reverse(pattern,(const constexpr_str_view_t<T>&)range);
12345 }
12347 template<typename T>
12348 [[nodiscard]]constexpr size_t in_range_but_reverse_size_t(const remove_cvref<T>&pattern,const constexpr_str_t<T>&range){
12350 return range.bitmark_for_unindex[pattern];
12351 else
12352 return in_range_but_reverse_size_t(pattern,(const constexpr_str_view_t<T>&)range);
12353 }
12354};
12355using range_n::in_range;
12356using range_n::in_range_size_t;
12357using range_n::in_range_but_reverse;
12358using range_n::in_range_but_reverse_size_t;
12359using range_n::find_first_of;
12360using range_n::find_last_of;
12361using range_n::find_first_not_of;
12362using range_n::find_last_not_of;
12363
12364//file_end
12365
12366 #line 118 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12367 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/logical_bool.hpp"
12368//logical_bool.hpp
12369//at namespace elc::defs::base
12370/*
12371未完成的elc解释器base_defs文件
12372由steve02081504与Alex0125设计、编写
12373转载时请在不对此文件做任何修改的同时注明出处
12374项目地址:https://github.com/ELC-lang/ELC
12375*/
12376/*
12377 ,??????????????????????????
12378 ????????????????????????????
12379 ?????????????????????????????+
12380 ?????+++++++++++++++++++++++++
12381 ?????+++++++++++++++++++++++++
12382 ??????++++++++++++++++++++++++
12383 ?????++
12384 ?????+++
12385 ??????+++IIIIIIIIIIIIIIIIII
12386 ?????+++++IIIIIIIIIIIIIIIIII
12387 ?????++++++++++++++++++++++++
12388 ??????+++++++++++++++++++++++:
12389 ?????++
12390 ?????+++
12391 ??????++
12392 ??????????????????????????????II
12393 ??????????????????????????????IIII
12394 ,?????????????????????????????IIIII+
12395 =???++++++++++++++++++++++++++III?
12396 ?++++++++++++++++++++++++++++I+
12397*/
12398
12409/*
12410 在 虚伪 的 信 念 之 前 - 他 们 将 三 元 论 视 为 真理
12411 所 有 的 东西 都 是 三 部 分 。
12412 从 那里 , 他 们 终于 获得 了 答案 。
12413*/
12415private:
12416 [[no_unique_address]]bool _is_true;
12417 [[no_unique_address]]bool _is_false;
12418 [[no_unique_address]]bool _is_unknown;
12419public:
12420 constexpr logical_bool(special_init_t,bool is_true,bool is_false,bool is_unknown=0)noexcept:_is_true(is_true),_is_false(is_false),_is_unknown(is_unknown){}
12421 constexpr logical_bool(bool a)noexcept:_is_true(a),_is_false(!a),_is_unknown(0){}
12422 constexpr logical_bool(const logical_bool&)noexcept=default;
12423 constexpr logical_bool&operator=(const logical_bool&)&noexcept=default;
12424 constexpr explicit operator bool()const noexcept{return _is_true && !_is_unknown;}
12425 constexpr logical_bool operator!()const noexcept{
12426 logical_bool aret=*this;
12427 swap(aret._is_true,aret._is_false);
12428 return aret;
12429 }
12431 return logical_bool{special_init,a._is_true && b._is_true,a._is_false || b._is_false,a._is_unknown || b._is_unknown};
12432 }
12434 return logical_bool{special_init,a._is_true || b._is_true,a._is_false && b._is_false,a._is_unknown || b._is_unknown};
12435 }
12437 logical_bool aret(a._is_true == b._is_true && a._is_false == b._is_false);
12438 aret._is_unknown = a._is_unknown || b._is_unknown;
12439 return aret;
12440 }
12441};
12442constexpr logical_bool neither{special_init,0,0},either{special_init,1,1},unknown{special_init,0,0,1};
12443
12444//file_end
12445
12446 #line 119 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12447 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/count_able.hpp"
12448//count_able.hpp
12449//at namespace elc::defs::base
12450/*
12451未完成的elc解释器base_defs文件
12452由steve02081504与Alex0125设计、编写
12453转载时请在不对此文件做任何修改的同时注明出处
12454项目地址:https://github.com/ELC-lang/ELC
12455*/
12456/*
12457 ,??????????????????????????
12458 ????????????????????????????
12459 ?????????????????????????????+
12460 ?????+++++++++++++++++++++++++
12461 ?????+++++++++++++++++++++++++
12462 ??????++++++++++++++++++++++++
12463 ?????++
12464 ?????+++
12465 ??????+++IIIIIIIIIIIIIIIIII
12466 ?????+++++IIIIIIIIIIIIIIIIII
12467 ?????++++++++++++++++++++++++
12468 ??????+++++++++++++++++++++++:
12469 ?????++
12470 ?????+++
12471 ??????++
12472 ??????????????????????????????II
12473 ??????????????????????????????IIII
12474 ,?????????????????????????????IIIII+
12475 =???++++++++++++++++++++++++++III?
12476 ?++++++++++++++++++++++++++++I+
12477*/
12478template<class T>
12479[[nodiscard]]inline size_t the_number_of(type_info_t<T>)noexcept;
12480template<class T>
12482private:
12483 friend size_t the_number_of<T>(type_info_t<T>)noexcept;
12484 static size_t _number;
12485public:
12486 count_able()noexcept{_number++;}
12487 ~count_able()noexcept{_number--;}
12488};
12489template<class T>
12490[[nodiscard]]inline size_t the_number_of(type_info_t<T>)noexcept{
12491 if constexpr(type_info<T>.not_has_attribute(count_able))
12492 template_error("hey.");
12494}
12495
12496//file_end
12497
12498 #line 120 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12499 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/invoke.hpp"
12500//invoke.hpp
12501//at namespace elc::defs::base
12502/*
12503未完成的elc解释器base_defs文件
12504由steve02081504与Alex0125设计、编写
12505转载时请在不对此文件做任何修改的同时注明出处
12506项目地址:https://github.com/ELC-lang/ELC
12507*/
12508/*
12509 ,??????????????????????????
12510 ????????????????????????????
12511 ?????????????????????????????+
12512 ?????+++++++++++++++++++++++++
12513 ?????+++++++++++++++++++++++++
12514 ??????++++++++++++++++++++++++
12515 ?????++
12516 ?????+++
12517 ??????+++IIIIIIIIIIIIIIIIII
12518 ?????+++++IIIIIIIIIIIIIIIIII
12519 ?????++++++++++++++++++++++++
12520 ??????+++++++++++++++++++++++:
12521 ?????++
12522 ?????+++
12523 ??????++
12524 ??????????????????????????????II
12525 ??????????????????????????????IIII
12526 ,?????????????????????????????IIIII+
12527 =???++++++++++++++++++++++++++III?
12528 ?++++++++++++++++++++++++++++I+
12529*/
12530template<typename T>
12540 template<class...Args>
12541 static constexpr bool able= ::std::is_invocable_v<T,Args...>;
12550 template<class...Args>
12551 static constexpr bool nothrow= ::std::is_nothrow_invocable_v<T,Args...>;
12552
12553 //和期待类型
12554 template<class Ret_t>
12556 template<class...Args>
12557 static constexpr bool able= ::std::is_invocable_r_v<Ret_t,T,Args...>;
12558 template<class...Args>
12559 static constexpr bool nothrow= ::std::is_nothrow_invocable_r_v<Ret_t,T,Args...>;
12560
12568 template<class...Args> requires able<Args...>
12569 decltype(auto)_as(Args&&...rest)const noexcept(nothrow<Args...>){//invoke<T>.with_return_type<Ret_t>._as(...)
12570 return λ_with_catch(rest...)(const T&a)noexcept(nothrow<Args...>){return a(forward<Args>(rest)...);};
12571 }
12572 };
12573 template<class Ret_t>
12574 static constexpr with_return_type_t<Ret_t>with_return_type{};
12575
12583 template<class...Args> requires able<Args...>
12584 decltype(auto)_as(Args&&...rest)const noexcept(nothrow<Args...>){//invoke<T>._as(...)
12585 return λ_with_catch(rest...)(const T&a)noexcept(nothrow<Args...>){return a(forward<Args>(rest)...);};
12586 }
12587};
12588template<typename T>
12590
12591//file_end
12592
12593 #line 121 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12594 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/maybe_fail_reference.hpp"
12595//maybe_fail_reference.hpp
12596//at namespace elc::defs::base
12597/*
12598未完成的elc解释器base_defs文件
12599由steve02081504与Alex0125设计、编写
12600转载时请在不对此文件做任何修改的同时注明出处
12601项目地址:https://github.com/ELC-lang/ELC
12602*/
12603/*
12604 ,??????????????????????????
12605 ????????????????????????????
12606 ?????????????????????????????+
12607 ?????+++++++++++++++++++++++++
12608 ?????+++++++++++++++++++++++++
12609 ??????++++++++++++++++++++++++
12610 ?????++
12611 ?????+++
12612 ??????+++IIIIIIIIIIIIIIIIII
12613 ?????+++++IIIIIIIIIIIIIIIIII
12614 ?????++++++++++++++++++++++++
12615 ??????+++++++++++++++++++++++:
12616 ?????++
12617 ?????+++
12618 ??????++
12619 ??????????????????????????????II
12620 ??????????????????????????????IIII
12621 ,?????????????????????????????IIIII+
12622 =???++++++++++++++++++++++++++III?
12623 ?++++++++++++++++++++++++++++I+
12624*/
12625template<typename T>
12627 T*_ref_to;
12628public:
12629 constexpr maybe_fail_reference(T&a)noexcept:_ref_to(&a){}
12631 constexpr maybe_fail_reference(note::fail_t)noexcept:_ref_to(nullptr){}
12632
12633 [[nodiscard]]bool not_fail()noexcept{return _ref_to;}
12634 [[nodiscard]]bool fail()noexcept{return!not_fail();}
12635 T&get_ref()noexcept{return*_ref_to;}
12636};
12637
12638//file_end
12639
12640 #line 122 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12641 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/flag.hpp"
12642//flag.hpp
12643//at namespace elc::defs::base
12644/*
12645未完成的elc解释器base文件
12646由steve02081504与Alex0125设计、编写
12647转载时请在不对此文件做任何修改的同时注明出处
12648项目地址:https://github.com/ELC-lang/ELC
12649*/
12650/*
12651 ,??????????????????????????
12652 ????????????????????????????
12653 ?????????????????????????????+
12654 ?????+++++++++++++++++++++++++
12655 ?????+++++++++++++++++++++++++
12656 ??????++++++++++++++++++++++++
12657 ?????++
12658 ?????+++
12659 ??????+++IIIIIIIIIIIIIIIIII
12660 ?????+++++IIIIIIIIIIIIIIIIII
12661 ?????++++++++++++++++++++++++
12662 ??????+++++++++++++++++++++++:
12663 ?????++
12664 ?????+++
12665 ??????++
12666 ??????????????????????????????II
12667 ??????????????????????????????IIII
12668 ,?????????????????????????????IIIII+
12669 =???++++++++++++++++++++++++++III?
12670 ?++++++++++++++++++++++++++++I+
12671*/
12672/*
12673表示flag是否被设置的enum字面量.
12674*/
12675enum class flag_set_type:bool{seted=true,not_set=false};
12676using enum flag_set_type;
12677/*
12678bool的简易包装以表示『是否被设置』,无法使用operator=,因为不应如此.
12679*/
12680class flag{
12681 bool _m;
12682public:
12683 constexpr explicit flag(flag_set_type a=not_set)noexcept:_m(bool(a)){}
12684 [[nodiscard]]explicit operator bool()const noexcept{return _m;}
12685 flag(flag&a)noexcept:_m((bool)a){}
12686 flag(flag&&a)noexcept:_m((bool)a){}
12687 inline void operator=(flag&)&noexcept=delete;
12688 inline void operator=(flag&&)&noexcept=delete;
12689 inline void set()noexcept{_m=true;}
12690 inline void unset()noexcept{_m=false;}
12691};
12692
12693//file_end
12694
12695 #line 123 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12696 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/mark_type.hpp"
12697//mark_type.hpp
12698//at namespace elc::defs::base
12699/*
12700未完成的elc解释器base文件
12701由steve02081504与Alex0125设计、编写
12702转载时请在不对此文件做任何修改的同时注明出处
12703项目地址:https://github.com/ELC-lang/ELC
12704*/
12705/*
12706 ,??????????????????????????
12707 ????????????????????????????
12708 ?????????????????????????????+
12709 ?????+++++++++++++++++++++++++
12710 ?????+++++++++++++++++++++++++
12711 ??????++++++++++++++++++++++++
12712 ?????++
12713 ?????+++
12714 ??????+++IIIIIIIIIIIIIIIIII
12715 ?????+++++IIIIIIIIIIIIIIIIII
12716 ?????++++++++++++++++++++++++
12717 ??????+++++++++++++++++++++++:
12718 ?????++
12719 ?????+++
12720 ??????++
12721 ??????????????????????????????II
12722 ??????????????????????????????IIII
12723 ,?????????????????????????????IIIII+
12724 =???++++++++++++++++++++++++++III?
12725 ?++++++++++++++++++++++++++++I+
12726*/
12727/*
12728表明是否被标记的enum字面量.
12729*/
12730enum class mark_type:bool{marked=true,not_mark=false};
12731using enum mark_type;
12732/*
12733用于gc的可达性分析的普通模板式elc属性.
12734*/
12735template<typename T>
12737 mutable flag _m;
12738public:
12739 constexpr explicit mark_able(mark_type a=not_mark)noexcept:_m(a==not_mark?not_set:seted){};
12740 inline void mark()const noexcept{_m.set();}
12741 inline void unmark()const noexcept{_m.unset();}
12742 [[nodiscard]]bool was_marked()const noexcept{return(bool)_m;}
12743};
12744
12745//file_end
12746
12747 #line 124 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12748
12749 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/list.hpp"
12750//list.hpp
12751//at namespace elc::defs::base
12752/*
12753未完成的elc解释器base文件
12754由steve02081504与Alex0125设计、编写
12755转载时请在不对此文件做任何修改的同时注明出处
12756项目地址:https://github.com/ELC-lang/ELC
12757*/
12758/*
12759 ,??????????????????????????
12760 ????????????????????????????
12761 ?????????????????????????????+
12762 ?????+++++++++++++++++++++++++
12763 ?????+++++++++++++++++++++++++
12764 ??????++++++++++++++++++++++++
12765 ?????++
12766 ?????+++
12767 ??????+++IIIIIIIIIIIIIIIIII
12768 ?????+++++IIIIIIIIIIIIIIIIII
12769 ?????++++++++++++++++++++++++
12770 ??????+++++++++++++++++++++++:
12771 ?????++
12772 ?????+++
12773 ??????++
12774 ??????????????????????????????II
12775 ??????????????????????????????IIII
12776 ,?????????????????????????????IIIII+
12777 =???++++++++++++++++++++++++++III?
12778 ?++++++++++++++++++++++++++++I+
12779*/
12780//copy from old ELC
12781template<typename T>
12782class list_t;
12783/*
12784common attribute,表明这是对于list_t可加入的cons.
12785*/
12786template<typename T>
12789private:
12790 friend list_t<T>;
12791 friend iterator_t<T,this_t*>::base_t;
12793
12794 mutable this_t*_before;//为了在析构时修改前一项的next,勿删
12795 mutable this_t*_next;
12796
12797 [[nodiscard]]this_t*get_before()noexcept{return _before;}
12798 [[nodiscard]]this_t*get_next()noexcept{return _next;}
12799
12800 constexpr cons_t(this_t*a,this_t*b):_before(a),_next(b){}
12801
12802 constexpr void set_before(this_t*a){
12803 _before=a;
12804 a->_next=this;
12805 }
12806 constexpr void set_next(this_t*a){
12807 _next=a;
12808 a->_before=this;
12809 }
12810 constexpr void insert_to_before(this_t*a){
12811 set_before(a->_before);
12812 set_next(a);
12813 }
12814 constexpr void bind_with(this_t*a)noexcept{
12815 set_next(a);
12816 set_before(a);
12817 }
12818 constexpr void remove_from_list()noexcept{
12819 _before->set_next(_next);
12820 }
12821 [[nodiscard]]constexpr T*get_handle(){
12822 return attribute_t::get_handle();
12823 }
12824public:
12825 constexpr cons_t()=default;
12827 remove_from_list();
12828 }
12829};
12830/*
12831T类型的有序双向list.
12832方法有:
12833constexpr void add(cons_t<T>*a)noexcept;
12834constexpr iterator begin()noexcept;
12835constexpr iterator end()noexcept;
12836constexpr iterator head()noexcept;
12837constexpr bool empty()const noexcept;
12838*/
12839template<typename T>
12840struct list_t{
12843 typedef iterator_t<T,cons*>iterator;
12844private:
12845 cons _begin,_end;
12846public:
12847 constexpr list_t()noexcept{_begin.bind_with(&_end);}
12848 inline constexpr void add(cons*a)noexcept{
12849 a->insert_to_before(&_end);
12850 }
12851 [[nodiscard]]constexpr iterator begin()noexcept{return _begin.get_next();}//这叫头迭代器
12852 [[nodiscard]]constexpr iterator end()noexcept{return&_end;}//这叫超尾迭代器
12853 [[nodiscard]]constexpr iterator head()noexcept{return&_begin;}//。。。。这个大概就是超头迭代器了😂
12854 [[nodiscard]]constexpr bool empty()const noexcept{return _begin.get_next()==&_end;}
12855};
12856
12857//file_end
12858
12859 #line 126 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
12860
12861 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/function_base.hpp"
12862//function_base.hpp
12863//at namespace elc::defs::container
12864/*
12865未完成的elc解释器base文件
12866由steve02081504与Alex0125设计、编写
12867转载时请在不对此文件做任何修改的同时注明出处
12868项目地址:https://github.com/ELC-lang/ELC
12869*/
12870/*
12871 ,??????????????????????????
12872 ????????????????????????????
12873 ?????????????????????????????+
12874 ?????+++++++++++++++++++++++++
12875 ?????+++++++++++++++++++++++++
12876 ??????++++++++++++++++++++++++
12877 ?????++
12878 ?????+++
12879 ??????+++IIIIIIIIIIIIIIIIII
12880 ?????+++++IIIIIIIIIIIIIIIIII
12881 ?????++++++++++++++++++++++++
12882 ??????+++++++++++++++++++++++:
12883 ?????++
12884 ?????+++
12885 ??????++
12886 ??????????????????????????????II
12887 ??????????????????????????????IIII
12888 ,?????????????????????????????IIIII+
12889 =???++++++++++++++++++++++++++III?
12890 ?++++++++++++++++++++++++++++I+
12891*/
12892namespace function_base_n{
12893 #if !defined(_MSC_VER)
12894 template<typename>
12896
12897 template<typename Ret_t,typename T,typename...Args_t,bool nothrow>
12898 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)noexcept(nothrow)>
12899 {using type=Ret_t(Args_t...)noexcept(nothrow);};
12900
12901 template<typename Ret_t,typename T,typename...Args_t,bool nothrow>
12902 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)&noexcept(nothrow)>
12903 {using type=Ret_t(Args_t...)noexcept(nothrow);};
12904
12905 template<typename Ret_t,typename T,typename...Args_t,bool nothrow>
12906 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)const noexcept(nothrow)>
12907 {using type=Ret_t(Args_t...)noexcept(nothrow);};
12908
12909 template<typename Ret_t,typename T,typename...Args_t,bool nothrow>
12910 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)const&noexcept(nothrow)>
12911 {using type=Ret_t(Args_t...)noexcept(nothrow);};
12912
12913 template<typename T>
12914 [[nodiscard]]constexpr auto function_type_getter_conditional_helper()noexcept{
12915 if constexpr(::std::is_function_v<remove_cvref<T>>)
12916 return type_info<remove_cvref<T>>;
12917 elseif constexpr(is_pointer<T> && ::std::is_function_v<remove_cvref<::std::remove_pointer_t<T>>>)//不支持多级函数指针:懒得写(其实挺简单的),而且function_t若支持多级函数指针的推导指引会很不安全
12918 return function_type_getter_conditional_helper<::std::remove_pointer_t<T>>();
12919 else
12920 return type_info<type_name function_type_getter_helper<decltype(&T::operator())>::type>;
12921 }
12922 template<typename T>
12924 typedef decltype(function_type_getter_conditional_helper<T>())::template_name type type;
12925 };
12926
12927 /*
12928 获取一个callable类型的“函数类型”
12929 如T(int)返回char,其函数类型便是char(int)
12930 */
12931 template<typename T>
12933
12934 /*
12935 用处:容纳一个callable类型(除过函数类型,但可以是其指针)并提供operator()
12936 小包装工具,能在意想不到的地方发挥效果(比如要额外携带数据的callable类型定义!见"../../lib_loader/lib_loader.hpp")
12937 */
12938 template<class T,class Func_t=get_function_type<T>>
12940 template<class T,bool nothrow,class Ret_t,class...Args_t>
12941 struct function_data_wrapper_t<T,Ret_t(Args_t...)noexcept(nothrow)>{
12942 static_assert(!::std::is_function_v<remove_cvref<T>>);
12943
12945
12946 function_data_wrapper_t(T a)noexcept(construct<T>.nothrow<T>):_value(a){}
12947 ~function_data_wrapper_t()noexcept(destruct.nothrow<T>)=default;
12948 Ret_t operator()(Args_t...args)noexcept(nothrow || invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>){
12949 //BLOCK:constexpr checks
12950 if constexpr(!invoke<T>.able<Args_t...>)
12951 template_error("this T can\'t becall as args.");
12952 if constexpr(!invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
12953 template_error("the return type of T was wrong.");
12954 //BLOCK_END
12955 if constexpr(type_info<Ret_t> != type_info<void>)
12956 return _value(forward<Args_t>(args)...);
12957 else
12958 _value(forward<Args_t>(args)...);
12959 }
12960 Ret_t operator()(Args_t...args)const noexcept(nothrow || invoke<const T>.with_return_type<Ret_t>.nothrow<Args_t...>){
12961 //BLOCK:constexpr checks
12962 if constexpr(!invoke<T>.able<Args_t...>)
12963 template_error("this T can\'t becall as args.");
12964 if constexpr(!invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
12965 template_error("the return type of T was wrong.");
12966 //BLOCK_END
12967 if constexpr(type_info<Ret_t> != type_info<void>)
12968 return _value(forward<Args_t>(args)...);
12969 else
12970 _value(forward<Args_t>(args)...);
12971 }
12972 [[nodiscard]]auto&get_data()noexcept{return _value;}
12973 };
12974 #else
12975 //MSVC,我滴垃圾堆
12976 template<typename>
12977 struct function_type_getter_helper{};
12978
12979 template<typename Ret_t,typename T,typename...Args_t>
12980 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)>
12981 {using type=Ret_t(Args_t...);};
12982
12983 template<typename Ret_t,typename T,typename...Args_t>
12984 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)&>
12985 {using type=Ret_t(Args_t...);};
12986
12987 template<typename Ret_t,typename T,typename...Args_t>
12988 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)const>
12989 {using type=Ret_t(Args_t...);};
12990
12991 template<typename Ret_t,typename T,typename...Args_t>
12992 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)const&>
12993 {using type=Ret_t(Args_t...);};
12994
12995 template<typename Ret_t,typename T,typename...Args_t>
12996 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)noexcept>
12997 {using type=Ret_t(Args_t...)noexcept;};
12998
12999 template<typename Ret_t,typename T,typename...Args_t>
13000 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)&noexcept>
13001 {using type=Ret_t(Args_t...)noexcept;};
13002
13003 template<typename Ret_t,typename T,typename...Args_t>
13004 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)const noexcept>
13005 {using type=Ret_t(Args_t...)noexcept;};
13006
13007 template<typename Ret_t,typename T,typename...Args_t>
13008 struct function_type_getter_helper<Ret_t(T::*)(Args_t...)const&noexcept>
13009 {using type=Ret_t(Args_t...)noexcept;};
13010
13011 template<typename T>
13012 [[nodiscard]]constexpr auto function_type_getter_conditional_helper()noexcept{
13013 if constexpr(::std::is_function_v<remove_cvref<T>>)
13014 return type_info<remove_cvref<T>>;
13015 elseif constexpr(is_pointer<T> && ::std::is_function_v<remove_cvref<::std::remove_pointer_t<T>>>)//不支持多级函数指针:懒得写(其实挺简单的),而且function_t若支持多级函数指针的推导指引会很不安全
13016 return function_type_getter_conditional_helper<::std::remove_pointer_t<T>>();
13017 else
13018 return type_info<type_name function_type_getter_helper<decltype(&T::operator())>::type>;
13019 }
13020 template<typename T>
13021 struct function_type_getter{
13022 typedef decltype(function_type_getter_conditional_helper<T>())::template_name type type;
13023 };
13024
13025 /*
13026 获取一个callable类型的“函数类型”
13027 如T(int)返回char,其函数类型便是char(int)
13028 */
13029 template<typename T>
13030 using get_function_type=function_type_getter<T>::type;
13031
13032 /*
13033 用处:容纳一个callable类型(除过函数类型,但可以是其指针)并提供operator()
13034 小包装工具,能在意想不到的地方发挥效果(比如要额外携带数据的callable类型定义!见"../../lib_loader/lib_loader.hpp")
13035 */
13036 template<class T,class Func_t=get_function_type<T>>
13037 class function_data_wrapper_t;
13038 template<class T,class Ret_t,class...Args_t>
13039 struct function_data_wrapper_t<T,Ret_t(Args_t...)noexcept>{
13040 static_assert(!::std::is_function_v<remove_cvref<T>>);
13041
13042 T _value;
13043
13044 function_data_wrapper_t(T a)noexcept(construct<T>.nothrow<T>):_value(a){}
13045 ~function_data_wrapper_t()noexcept(destruct.nothrow<T>)=default;
13046 Ret_t operator()(Args_t...args)noexcept{
13047 //BLOCK:constexpr checks
13048 if constexpr(!invoke<T>.able<Args_t...>)
13049 template_error("this T can\'t becall as args.");
13050 if constexpr(!invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
13051 template_error("the return type of T was wrong.");
13052 if constexpr(!invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>)
13053 template_warning("this T may throw an exception.");
13054 //BLOCK_END
13055 if constexpr(type_info<Ret_t> != type_info<void>)
13056 return _value(forward<Args_t>(args)...);
13057 else
13058 _value(forward<Args_t>(args)...);
13059 }
13060 Ret_t operator()(Args_t...args)const noexcept{
13061 //BLOCK:constexpr checks
13062 if constexpr(!invoke<T>.able<Args_t...>)
13063 template_error("this T can\'t becall as args.");
13064 if constexpr(!invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
13065 template_error("the return type of T was wrong.");
13066 if constexpr(!invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>)
13067 template_warning("this T may throw an exception.");
13068 //BLOCK_END
13069 if constexpr(type_info<Ret_t> != type_info<void>)
13070 return _value(forward<Args_t>(args)...);
13071 else
13072 _value(forward<Args_t>(args)...);
13073 }
13074 [[nodiscard]]auto&get_data()noexcept{return _value;}
13075 };
13076 /*
13077 用处:容纳一个callable类型(除过函数类型,但可以是其指针)并提供operator()
13078 小包装工具,能在意想不到的地方发挥效果(比如要额外携带数据的callable类型定义!见"../../lib_loader/lib_loader.hpp")
13079 */
13080 template<class T,class Ret_t,class...Args_t>
13081 struct function_data_wrapper_t<T,Ret_t(Args_t...)>{
13082 static_assert(!::std::is_function_v<remove_cvref<T>>);
13083
13084 T _value;
13085
13086 function_data_wrapper_t(T a)noexcept(construct<T>.nothrow<T>):_value(a){}
13087 ~function_data_wrapper_t()noexcept(destruct.nothrow<T>)=default;
13088 Ret_t operator()(Args_t...args)noexcept(invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>){
13089 //BLOCK:constexpr checks
13090 //if constexpr(!invoke<T>.able<Args_t...>)
13091 //workaround of https://developercommunity.visualstudio.com/t/name-lookup-problem-after-update-1740/10189035
13092 if constexpr(!::std::is_invocable_v<T,Args_t...>)
13093 template_error("this T can\'t becall as args.");
13094 //if constexpr(!invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
13095 //workaround of https://developercommunity.visualstudio.com/t/name-lookup-problem-after-update-1740/10189035
13096 if constexpr(!::std::is_invocable_r_v<Ret_t,T,Args_t...>)
13097 template_error("the return type of T was wrong.");
13098 //BLOCK_END
13099 if constexpr(type_info<Ret_t> != type_info<void>)
13100 return _value(forward<Args_t>(args)...);
13101 else
13102 _value(forward<Args_t>(args)...);
13103 }
13104 Ret_t operator()(Args_t...args)const noexcept(invoke<const T>.with_return_type<Ret_t>.nothrow<Args_t...>){
13105 //BLOCK:constexpr checks
13106 //if constexpr(!invoke<const T>.able<Args_t...>)
13107 //workaround of https://developercommunity.visualstudio.com/t/name-lookup-problem-after-update-1740/10189035
13108 if constexpr(!::std::is_invocable_v<const T, Args_t...>)
13109 template_error("this T can\'t becall as args.");
13110 //if constexpr(!invoke<const T>.with_return_type<Ret_t>.able<Args_t...>)
13111 //workaround of https://developercommunity.visualstudio.com/t/name-lookup-problem-after-update-1740/10189035
13112 if constexpr(!::std::is_invocable_r_v<Ret_t,const T,Args_t...>)
13113 template_error("the return type of T was wrong.");
13114 //BLOCK_END
13115 if constexpr(type_info<Ret_t> != type_info<void>)
13116 return _value(forward<Args_t>(args)...);
13117 else
13118 _value(forward<Args_t>(args)...);
13119 }
13120 [[nodiscard]]auto&get_data()noexcept{return _value;}
13121 [[nodiscard]]const auto&get_data()const noexcept{return _value;}
13122 };
13123 #endif
13124}
13125using function_base_n::get_function_type;
13126using function_base_n::function_data_wrapper_t;
13127
13128//file_end
13129
13130 #line 128 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
13131 }
13132
13133 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
13134//_undefs.hpp
13135/*
13136未完成的elc解释器basic文件
13137由steve02081504与Alex0125设计、编写
13138转载时请在不对此文件做任何修改的同时注明出处
13139项目地址:https://github.com/ELC-lang/ELC
13140*/
13141/*
13142 ,??????????????????????????
13143 ????????????????????????????
13144 ?????????????????????????????+
13145 ?????+++++++++++++++++++++++++
13146 ?????+++++++++++++++++++++++++
13147 ??????++++++++++++++++++++++++
13148 ?????++
13149 ?????+++
13150 ??????+++IIIIIIIIIIIIIIIIII
13151 ?????+++++IIIIIIIIIIIIIIIIII
13152 ?????++++++++++++++++++++++++
13153 ??????+++++++++++++++++++++++:
13154 ?????++
13155 ?????+++
13156 ??????++
13157 ??????????????????????????????II
13158 ??????????????????????????????IIII
13159 ,?????????????????????????????IIIII+
13160 =???++++++++++++++++++++++++++III?
13161 ?++++++++++++++++++++++++++++I+
13162*/
13163#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
13164//_undefs.hpp
13165/*
13166未完成的elc解释器_share文件
13167由steve02081504与Alex0125设计、编写
13168转载时请在不对此文件做任何修改的同时注明出处
13169项目地址:https://github.com/ELC-lang/ELC
13170*/
13171/*
13172 ,??????????????????????????
13173 ????????????????????????????
13174 ?????????????????????????????+
13175 ?????+++++++++++++++++++++++++
13176 ?????+++++++++++++++++++++++++
13177 ??????++++++++++++++++++++++++
13178 ?????++
13179 ?????+++
13180 ??????+++IIIIIIIIIIIIIIIIII
13181 ?????+++++IIIIIIIIIIIIIIIIII
13182 ?????++++++++++++++++++++++++
13183 ??????+++++++++++++++++++++++:
13184 ?????++
13185 ?????+++
13186 ??????++
13187 ??????????????????????????????II
13188 ??????????????????????????????IIII
13189 ,?????????????????????????????IIIII+
13190 =???++++++++++++++++++++++++++III?
13191 ?++++++++++++++++++++++++++++I+
13192*/
13193
13194//defs at "_defs.hpp"
13195
13196#if defined(_MSC_VER)
13197 #pragma warning(pop)
13198#endif
13199//#undef suppress_msvc_warning
13200#undef disable_msvc_warning
13201#undef push_msvc_warning
13202#undef pop_msvc_warning
13203#undef push_and_disable_msvc_warning
13204#if defined(_MSC_VER)
13205 #pragma pack(pop)
13206#endif
13207#if defined(__GNUC__)
13208 #pragma GCC diagnostic pop
13209#endif
13210#if defined(_MSC_VER)
13211 #pragma pop_macro("new")
13212 #pragma pop_macro("delete")
13213 #pragma pop_macro("min")
13214 #pragma pop_macro("max")
13215 #pragma pop_macro("abs")
13216 #pragma pop_macro("export")
13217 #pragma pop_macro("rand")
13218 #pragma pop_macro("sqrt")
13219 #pragma pop_macro("type_info")
13220 #pragma pop_macro("elc")
13221#endif
13222
13223//
13224#if defined(ELC_VOID_NAME)
13225 #define void the_void
13226#endif
13227//
13228#if defined(ELC_PUBLIC_ALL)
13229 #undef protected
13230 #undef private
13231#endif
13232//
13233#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
13234 #define rand the_rand
13235#endif
13236
13237// #undef often_noexcept
13238#undef noexcept_as
13239#undef noexcept_as_auto
13240#undef constexpr_as
13241#undef constexpr_as_auto
13242
13243#undef using_method_from_base_t
13244#undef using_method_from_value
13245
13246#undef floop
13247#undef times
13248#undef debug_times
13249#undef enable_adl
13250
13251#undef re_declvalue
13252#undef re_decltype
13253
13254#undef declvalue
13255
13256#undef template_error
13257#undef template_error_of_type
13258#undef template_warning
13259
13260#undef type_info_of
13261#undef type_name_of
13262
13263#undef is_common_attribute
13264#undef is_special_attribute
13265
13266#undef has_attribute
13267#undef not_has_attribute
13268
13269#undef float_size_of
13270#undef bitnum_of
13271
13272#undef def_common_attribute_with_nothing
13273#undef def_special_attribute_with_nothing
13274
13275#undef common_attribute_t
13276#undef special_attribute_t
13277
13278#undef enable_if
13279#undef enabled_by_default
13280#undef disabled_by_default
13281#undef enable_if_not_ill_form
13282#undef enable_flag
13283
13284#undef was_an_ill_form
13285#undef was_an_ill_form_with_parameter
13286#undef was_not_an_ill_form
13287#undef was_not_an_ill_form_and_noexcept
13288#undef was_not_an_ill_form_with_parameter
13289
13290#undef recursive_λ
13291#undef get_recursive_λ_caller
13292#undef λ
13293#undef exλ
13294#undef λ_with_catch
13295#undef self_recursion
13296#undef λ_RLSRRS
13297#undef λ_inline
13298#undef λ_force_inline
13299
13300#undef MAGIC
13301
13302#undef nothing
13303
13304#undef elseif
13305#undef _big_than_
13306#undef _small_than_
13307
13308#if defined(_MSC_VER)
13309 #undef not
13310 #undef and
13311 #undef or
13312#endif
13313
13314#undef INTER_NAMESPACE
13315#undef BREAK_NAMESPACE
13316
13317#undef szie
13318#undef form
13319
13320#undef template_name
13321#undef type_name
13322
13323#undef not_in_debug
13324
13325#undef es
13326#undef ec
13327
13328#undef ELC_TEST_EVENTNAME
13329
13330#undef override_instance_struct
13331
13332#undef distinctive
13333
13334#undef force_inline
13335
13336#undef with_no_vtable
13337
13338#undef in_consteval
13339
13340#undef no_vtable_struct
13341#undef no_vtable_class
13342
13343//#undef get_elc_defs
13344
13345//file_end
13346
13347#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
13348
13349//file_end
13350
13351 #line 131 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_defs/_body.hpp"
13352}
13353
13354//file_end
13355
13356 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
13357#endif
13358
13359//file_end
13360
13361 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
13362 #include <cstring>//memcpy、memmove
13363 #include <atomic>//atomic
13364 #if defined(ELC_TEST_ON)
13365 #include <ctime>//time
13366 #endif
13367 #define ELC_BASE
13368 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
13369//_body.hpp
13370//at namespace ::
13371/*
13372未完成的elc解释器base文件
13373由steve02081504与Alex0125设计、编写
13374转载时请在不对此文件做任何修改的同时注明出处
13375项目地址:https://github.com/ELC-lang/ELC
13376*/
13377/*
13378 ,??????????????????????????
13379 ????????????????????????????
13380 ?????????????????????????????+
13381 ?????+++++++++++++++++++++++++
13382 ?????+++++++++++++++++++++++++
13383 ??????++++++++++++++++++++++++
13384 ?????++
13385 ?????+++
13386 ??????+++IIIIIIIIIIIIIIIIII
13387 ?????+++++IIIIIIIIIIIIIIIIII
13388 ?????++++++++++++++++++++++++
13389 ??????+++++++++++++++++++++++:
13390 ?????++
13391 ?????+++
13392 ??????++
13393 ??????????????????????????????II
13394 ??????????????????????????????IIII
13395 ,?????????????????????????????IIIII+
13396 =???++++++++++++++++++++++++++III?
13397 ?++++++++++++++++++++++++++++I+
13398*/
13399#if defined(ELC_TEST)//若已包含elc/test则报错:其应在此文件后被包含
13400 #error "this part cannot be tested."
13401#endif
13402
13403//include APIs:elc中可能根据编译环境而修改的底层函数
13404//using at memory/alloc
13405#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
13406//alloc.hpp
13407/*
13408未完成的elc解释器_share文件
13409由steve02081504与Alex0125设计、编写
13410转载时请在不对此文件做任何修改的同时注明出处
13411项目地址:https://github.com/ELC-lang/ELC
13412*/
13413/*
13414 ,??????????????????????????
13415 ????????????????????????????
13416 ?????????????????????????????+
13417 ?????+++++++++++++++++++++++++
13418 ?????+++++++++++++++++++++++++
13419 ??????++++++++++++++++++++++++
13420 ?????++
13421 ?????+++
13422 ??????+++IIIIIIIIIIIIIIIIII
13423 ?????+++++IIIIIIIIIIIIIIIIII
13424 ?????++++++++++++++++++++++++
13425 ??????+++++++++++++++++++++++:
13426 ?????++
13427 ?????+++
13428 ??????++
13429 ??????????????????????????????II
13430 ??????????????????????????????IIII
13431 ,?????????????????????????????IIIII+
13432 =???++++++++++++++++++++++++++III?
13433 ?++++++++++++++++++++++++++++I+
13434*/
13435/*
13436APIs说明
13437elc依赖的基础函数.
13438调整这些,实现快速移植,快速优化与行为自定义.
13439*/
13440#if !defined(ELC_APIS_alloc)
13441 #define ELC_APIS_alloc
13442 #if defined(ELC_MEMORY_ALLOC_LOCATION_RECORD)
13443 #include <stacktrace>//for operate_source_location
13444 #endif
13445 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/decl_system_type.hpp"
13446//decl_system_type.hpp
13447/*
13448未完成的elc解释器_share文件
13449由steve02081504与Alex0125设计、编写
13450转载时请在不对此文件做任何修改的同时注明出处
13451项目地址:https://github.com/ELC-lang/ELC
13452*/
13453/*
13454 ,??????????????????????????
13455 ????????????????????????????
13456 ?????????????????????????????+
13457 ?????+++++++++++++++++++++++++
13458 ?????+++++++++++++++++++++++++
13459 ??????++++++++++++++++++++++++
13460 ?????++
13461 ?????+++
13462 ??????+++IIIIIIIIIIIIIIIIII
13463 ?????+++++IIIIIIIIIIIIIIIIII
13464 ?????++++++++++++++++++++++++
13465 ??????+++++++++++++++++++++++:
13466 ?????++
13467 ?????+++
13468 ??????++
13469 ??????????????????????????????II
13470 ??????????????????????????????IIII
13471 ,?????????????????????????????IIIII+
13472 =???++++++++++++++++++++++++++III?
13473 ?++++++++++++++++++++++++++++I+
13474*/
13475//copy&rewrite from steve02081504/steve.h
13476#define linux 2
13477#define windows 3
13478#define other 4
13479#if defined(__linux)||defined(__linux__)||defined(__gnu_linux__)
13480 #define SYSTEM_TYPE linux
13481#elif defined(_WIN32)||defined(__MINGW32__)||defined(__CYGWIN__)
13482 #define SYSTEM_TYPE windows
13483#else
13484 #define SYSTEM_TYPE other
13485#endif
13486#define ERROR_MSG_UNABLE_OS "Unable OS,edit this file on your own or contact ELC's producers."
13487
13488//file_end
13489
13490 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
13491 //overhead默认启用(即使windows下可以通过_aligned_msize获取块大小),参见https://developercommunity.visualstudio.com/t/_aligned_realloc-does-not-reduce-block-s/10334132
13492 #define ELC_USING_OVERHEADED_ALLOC
13493 #if SYSTEM_TYPE != windows
13494 #if defined(_DEBUG)
13495 #include <crtdbg.h>
13496 #else
13497 #include <malloc.h>
13498 #endif
13499 #else
13500 #include <cstdlib>
13501 #endif
13502 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
13503//base_defs
13504//at namespace ::
13505/*@
13506未完成的elc解释器include文件
13507由steve02081504与Alex0125设计、编写
13508转载时请在不对此文件做任何修改的同时注明出处
13509项目地址:https://github.com/ELC-lang/ELC
13510*/
13511/*
13512 ,??????????????????????????
13513 ????????????????????????????
13514 ?????????????????????????????+
13515 ?????+++++++++++++++++++++++++
13516 ?????+++++++++++++++++++++++++
13517 ??????++++++++++++++++++++++++
13518 ?????++
13519 ?????+++
13520 ??????+++IIIIIIIIIIIIIIIIII
13521 ?????+++++IIIIIIIIIIIIIIIIII
13522 ?????++++++++++++++++++++++++
13523 ??????+++++++++++++++++++++++:
13524 ?????++
13525 ?????+++
13526 ??????++
13527 ??????????????????????????????II
13528 ??????????????????????????????IIII
13529 ,?????????????????????????????IIIII+
13530 =???++++++++++++++++++++++++++III?
13531 ?++++++++++++++++++++++++++++I+
13532*/
13533#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
13534//pre_checks.hpp
13535/*
13536未完成的elc解释器_share文件
13537由steve02081504与Alex0125设计、编写
13538转载时请在不对此文件做任何修改的同时注明出处
13539项目地址:https://github.com/ELC-lang/ELC
13540*/
13541/*
13542 ,??????????????????????????
13543 ????????????????????????????
13544 ?????????????????????????????+
13545 ?????+++++++++++++++++++++++++
13546 ?????+++++++++++++++++++++++++
13547 ??????++++++++++++++++++++++++
13548 ?????++
13549 ?????+++
13550 ??????+++IIIIIIIIIIIIIIIIII
13551 ?????+++++IIIIIIIIIIIIIIIIII
13552 ?????++++++++++++++++++++++++
13553 ??????+++++++++++++++++++++++:
13554 ?????++
13555 ?????+++
13556 ??????++
13557 ??????????????????????????????II
13558 ??????????????????????????????IIII
13559 ,?????????????????????????????IIIII+
13560 =???++++++++++++++++++++++++++III?
13561 ?++++++++++++++++++++++++++++I+
13562*/
13563//__cplusplus needs 20+
13564#if !defined(__cplusplus)||__cplusplus<202002L
13565 //if msvc, check _MSVC_LANG
13566 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
13567 //ok
13568 #else
13569 #error "elc files needs c++20 or higher"
13570 #endif
13571#endif
13572
13573//check if the compiler is msvc
13574#if defined(_MSC_VER)
13575 //check if _CPPRTTI
13576 #if !defined(_CPPRTTI)
13577 #error "elc files needs rtti"
13578 #endif
13579 //check _MSC_VER at last 1932
13580 #if _MSC_VER<1932
13581 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
13582 #endif
13583#endif
13584
13585//file_end
13586
13587#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
13588#line 57 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
13589
13590//file_end
13591
13592 #line 52 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
13595 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
13596//_defs.hpp
13597/*
13598未完成的elc解释器_share文件
13599由steve02081504与Alex0125设计、编写
13600转载时请在不对此文件做任何修改的同时注明出处
13601项目地址:https://github.com/ELC-lang/ELC
13602*/
13603/*
13604 ,??????????????????????????
13605 ????????????????????????????
13606 ?????????????????????????????+
13607 ?????+++++++++++++++++++++++++
13608 ?????+++++++++++++++++++++++++
13609 ??????++++++++++++++++++++++++
13610 ?????++
13611 ?????+++
13612 ??????+++IIIIIIIIIIIIIIIIII
13613 ?????+++++IIIIIIIIIIIIIIIIII
13614 ?????++++++++++++++++++++++++
13615 ??????+++++++++++++++++++++++:
13616 ?????++
13617 ?????+++
13618 ??????++
13619 ??????????????????????????????II
13620 ??????????????????????????????IIII
13621 ,?????????????????????????????IIIII+
13622 =???++++++++++++++++++++++++++III?
13623 ?++++++++++++++++++++++++++++I+
13624*/
13625
13626//undefs at "_undefs.hpp"
13627
13628#if defined(ELC_CODE_REALM)
13629 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
13630#endif
13631
13632//set ELC_WARNING_LEVEL default to 4(max)
13633#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
13634
13635#if defined(_MSC_VER)
13636 #pragma warning(push,ELC_WARNING_LEVEL)
13637 #pragma warning(disable:4099)//class与struct混用警告diss
13638 #pragma warning(disable:4584)//重复子类警告diss
13639 #pragma warning(disable:4250)//域控制继承警告diss
13640 #pragma warning(disable:26432)//不完全默认方法警告diss
13641 #pragma warning(disable:26435)//virtual override方法警告diss
13642 #pragma warning(disable:26481)//容器安利diss
13643 #pragma warning(disable:26446)//gsl::at安利diss
13644 #pragma warning(disable:26434)//方法覆盖警告diss
13645 #pragma warning(disable:26429)//gsl::not_null安利diss
13646 #pragma warning(disable:26471)//对void*进行static_cast安利diss
13647 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
13648 #pragma warning(disable:26473)//相同指针显式cast警告diss
13649 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
13650 #pragma warning(disable:26485)//数组作指针警告diss
13651 #pragma warning(disable:26490)//reinterpret_cast警告diss
13652 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
13653 #pragma warning(disable:26482)//非常数数组索引警告diss
13654 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
13655#endif
13656#if defined(__GNUC__)
13657 #pragma GCC diagnostic push
13658 #pragma GCC diagnostic warning "-Wall"//开启所有警告
13659 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
13660#endif
13661#if defined(_MSC_VER)
13662 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
13663 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
13664 #define push_msvc_warning() __pragma(warning(push))
13665 #define pop_msvc_warning() __pragma(warning(pop))
13666 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
13667#else
13668 //#define suppress_msvc_warning(...)
13669 #define disable_msvc_warning(...)
13670 #define push_msvc_warning()
13671 #define pop_msvc_warning()
13672 #define push_and_disable_msvc_warning(...)
13673#endif
13674#if defined(_MSC_VER)
13675 //push pack settings
13676 #pragma pack(push)
13677 #pragma pack()
13678#endif
13679#if defined(_MSC_VER)
13680 //push and undef common macros
13681 #pragma push_macro("new")
13682 #undef new
13683 #pragma push_macro("delete")
13684 #undef delete
13685 #pragma push_macro("min")
13686 #undef min
13687 #pragma push_macro("max")
13688 #undef max
13689 #pragma push_macro("abs")
13690 #undef abs
13691 #pragma push_macro("export")
13692 #undef export
13693 #pragma push_macro("rand")
13694 #undef rand
13695 #pragma push_macro("sqrt")
13696 #undef sqrt
13697 #pragma push_macro("type_info")
13698 #undef type_info
13699 #pragma push_macro("elc")
13700 #undef elc
13701#endif
13702//
13703#if defined(ELC_VOID_NAME)
13704 #undef void
13705#endif
13706//
13707#if defined(ELC_PUBLIC_ALL)
13708 #define protected public
13709 #define private public
13710#endif
13711//
13712#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
13713 #undef rand
13714#endif
13715
13716// #define often_noexcept
13717#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
13718#define noexcept_as_auto MAGIC//哦现在有了
13719#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
13720#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
13721
13722#define using_method_from_base_t(name,...) \
13723template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
13724auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
13725{\
13726 return base_t::name(forward<Args>(rest)...);\
13727}\
13728
13729#define using_method_from_value(name,value_name,...) \
13730template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
13731auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
13732{\
13733 return value_name.name(forward<Args>(rest)...);\
13734}\
13735
13736#define floop while(__builtin_is_my_dick_still_there())
13737#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
13738#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
13739#if defined(_MSC_VER) && _MSC_VER>=1935
13740 //@see https://developercommunity.visualstudio.com/t/10193638
13741 #define enable_adl(name) template<typename=void>void name()noexcept=delete
13742#else
13743 #define enable_adl(name) void name()noexcept=delete
13744#endif
13745
13746#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
13747#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
13748
13749#define declvalue(...) (::std::declval<__VA_ARGS__>())
13750
13752#define template_error(reason) static_assert(template_error_helper<T>,reason)
13754#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
13756#define template_warning(reason) template_warning_helper<T>(reason)
13757
13758//for type_info
13759#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
13760#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
13761
13762#define is_common_attribute(name) public attribute<T,name<T>>
13763#define is_special_attribute(name) public attribute<T,name>
13764
13765#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
13766#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
13767
13768//for float_size_t
13769#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
13770//bitnum_of
13771#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
13772
13773//for attribute
13774#define def_common_attribute_with_nothing(name) \
13775template<typename T>\
13776class name{}\
13777
13778#define def_special_attribute_with_nothing(name) \
13779class name{}\
13780
13781#define common_attribute_t template<class>class
13782#define special_attribute_t class
13783
13792#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
13794#define enabled_by_default class enable_state=void
13796#define disabled_by_default class enable_state= ::std::enable_if_t<false>
13798#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
13800#define enable_flag class enable_state
13801
13802#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
13803#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
13804#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
13805#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
13806#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
13807
13809#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
13811#define get_recursive_λ_caller(name,...) \
13812exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
13813 return name(name,Args...);\
13814}
13816#define λ []
13818#define exλ [&]
13820#define λ_with_catch(...) [__VA_ARGS__]
13822#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
13823//recursive_λ_self_referential_reserved_symbolname
13824#define λ_RLSRRS _my_jb_super_sb_name_
13825
13826#if defined(_MSC_VER) && !defined(__clang__)
13827 #define λ_inline [[msvc::forceinline]]
13828 #define λ_force_inline [[msvc::forceinline]]
13829#elif
13830 #define λ_inline [[gnu::always_inline]]
13831 #define λ_force_inline [[gnu::always_inline]]
13832#else
13833 #define λ_inline
13834 #define λ_force_inline
13835#endif
13836
13837#define MAGIC//ahh,ko no tenno da!
13838
13840#define nothing
13841
13843#define elseif else if
13845#define _big_than_ >
13847#define _small_than_ <
13848
13849#if defined(_MSC_VER)
13850 #define not !
13851 #define and &&
13852 #define or ||
13853#endif
13854
13856#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
13858#define BREAK_NAMESPACE }
13859
13861#define template_name template
13863#define type_name class
13864
13865#if defined(DEBUG) || defined(_DEBUG)
13866 #define not_in_debug 0
13867 #define in_debug 1
13868#else
13869 #define not_in_debug 1
13870 #define in_debug 0
13871#endif
13872
13873#define es U""
13874#define ec(ch) U ## ch
13875
13876#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
13877 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
13878#else
13879 #define ELC_TEST_EVENTNAME(name)
13880#endif
13881
13882#define override_instance_struct \
13883protected:\
13884 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
13885 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
13886 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
13887 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
13888 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
13889
13890#if defined(_MSC_VER) && !defined(__clang__)
13891 #define distinctive __declspec(dllexport)
13892#else
13893 #define distinctive
13894#endif
13895
13896#if defined(_MSC_VER) && !defined(__clang__)
13897 #define force_inline __forceinline
13898#elif defined(__GNUC__) || defined(__clang__)
13899 #define force_inline __attribute__((always_inline)) inline
13900#else
13901 #define force_inline inline
13902#endif
13903
13904#if defined(_MSC_VER) && !defined(__clang__)
13905 #define with_no_vtable __declspec(novtable)
13906#else
13907 #define with_no_vtable
13908#endif
13909
13910#define in_consteval (::std::is_constant_evaluated())
13911
13912#define no_vtable_struct struct with_no_vtable
13913#define no_vtable_class class with_no_vtable
13914
13915//#define get_elc_defs using namespace ::elc::defs
13916
13917//file_end
13918
13919 #line 55 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
13920
13921 using namespace ::elc::defs;//remove_const||byte
13922 #if defined(ELC_USING_OVERHEADED_ALLOC)
13923 //overhead
13924 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc/default_method/overhead.hpp"
13925//overhead.hpp
13926//at namespace elc::APIs::alloc
13927/*
13928未完成的elc解释器base文件
13929由steve02081504与Alex0125设计、编写
13930转载时请在不对此文件做任何修改的同时注明出处
13931项目地址:https://github.com/ELC-lang/ELC
13932*/
13933/*
13934 ,??????????????????????????
13935 ????????????????????????????
13936 ?????????????????????????????+
13937 ?????+++++++++++++++++++++++++
13938 ?????+++++++++++++++++++++++++
13939 ??????++++++++++++++++++++++++
13940 ?????++
13941 ?????+++
13942 ??????+++IIIIIIIIIIIIIIIIII
13943 ?????+++++IIIIIIIIIIIIIIIIII
13944 ?????++++++++++++++++++++++++
13945 ??????+++++++++++++++++++++++:
13946 ?????++
13947 ?????+++
13948 ??????++
13949 ??????????????????????????????II
13950 ??????????????????????????????IIII
13951 ,?????????????????????????????IIIII+
13952 =???++++++++++++++++++++++++++III?
13953 ?++++++++++++++++++++++++++++I+
13954*/
13955namespace overhead_n{
13956 using namespace ::elc::defs;
13957 constexpr size_t overhead_get_align(size_t align)noexcept{
13958 return max(align,alignof(size_t));//保证最高对齐需求
13959 }
13960 constexpr size_t overhead_get_offset_value(size_t align)noexcept{
13961 align=overhead_get_align(align);
13962 return ceil_div(sizeof(size_t),align)*align;//等同于sizeof(size_t)-sizeof(size_t)%align+(sizeof(size_t)%align?align:0)
13963 //暨,偏移量既要大于sizeof(size_t)以装下overhead,又要是align的整数倍以保证T实例的对齐被满足
13964 }
13965 constexpr size_t correct_size(size_t size,size_t align)noexcept{
13966 return size+overhead_get_offset_value(align);
13967 }
13968 constexpr size_t correct_align(size_t align)noexcept{
13969 return overhead_get_align(align);
13970 }
13971 constexpr inline pointer correct_pointer(pointer a,size_t align)noexcept{
13972 return apply_off_set(a,overhead_get_offset_value(align));
13973 }
13974 constexpr inline pointer recorrect_pointer(pointer a,size_t align)noexcept{
13975 return unapply_off_set(a,overhead_get_offset_value(align));
13976 }
13977 constexpr inline const_pointer recorrect_pointer(const_pointer a, size_t align)noexcept{
13978 return unapply_off_set(a,overhead_get_offset_value(align));
13979 }
13980 inline void set_overhead(pointer a,size_t size)noexcept{
13981 *reinterpret_cast<size_t*>(a)=size;
13982 }
13983 inline size_t get_overhead(const_pointer a)noexcept{
13984 return*reinterpret_cast<const size_t*>(a);
13985 }
13986}
13987
13988//file_end
13989
13990 #line 59 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
13991 #endif
13992
13993 //operate_source_location & source_location_guard
13994 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc/debug_info/source_location_guard.hpp"
13995//source_location_guard.hpp
13996//at namespace elc::APIs::alloc
13997/*
13998未完成的elc解释器base文件
13999由steve02081504与Alex0125设计、编写
14000转载时请在不对此文件做任何修改的同时注明出处
14001项目地址:https://github.com/ELC-lang/ELC
14002*/
14003/*
14004 ,??????????????????????????
14005 ????????????????????????????
14006 ?????????????????????????????+
14007 ?????+++++++++++++++++++++++++
14008 ?????+++++++++++++++++++++++++
14009 ??????++++++++++++++++++++++++
14010 ?????++
14011 ?????+++
14012 ??????+++IIIIIIIIIIIIIIIIII
14013 ?????+++++IIIIIIIIIIIIIIIIII
14014 ?????++++++++++++++++++++++++
14015 ??????+++++++++++++++++++++++:
14016 ?????++
14017 ?????+++
14018 ??????++
14019 ??????????????????????????????II
14020 ??????????????????????????????IIII
14021 ,?????????????????????????????IIIII+
14022 =???++++++++++++++++++++++++++III?
14023 ?++++++++++++++++++++++++++++I+
14024*/
14025#if defined(_MSC_VER)
14026 #if defined(ELC_MEMORY_ALLOC_LOCATION_RECORD)
14027 #pragma detect_mismatch("ELC_MEMORY_ALLOC_LOCATION_RECORD","true")
14028 #else
14029 #pragma detect_mismatch("ELC_MEMORY_ALLOC_LOCATION_RECORD","false")
14030 #endif
14031#endif
14032#if defined(ELC_MEMORY_ALLOC_LOCATION_RECORD)
14033 distinctive inline ::std::stacktrace_entry operate_source_frame;
14034 distinctive inline struct source_location_info_t{
14035 const char*_file=nullptr;
14036 uint_least32_t _line=0;
14037 const char*file()noexcept{
14038 if(!_file){
14039 try{
14040 static ::std::string file_cache;
14041 file_cache=operate_source_frame.source_file();
14042 _file=file_cache.c_str();
14043 }
14044 catch(...){
14045 }
14046 }
14047 return _file;
14048 }
14049 uint_least32_t line()noexcept{
14050 if(!_line){
14051 try{
14052 _line=operate_source_frame.source_line();
14053 }
14054 catch(...){
14055 }
14056 }
14057 return _line;
14058 }
14059 void clear()noexcept{
14060 _file=nullptr;
14061 _line=0;
14062 }
14064 struct source_location_guard{
14065 bool _is_set=false;
14066 source_location_guard(size_t lookup=0)noexcept{
14067 if(!operate_source_frame){
14068 ::std::stacktrace stack = ::std::stacktrace::current(/*skip*/lookup+2,/*max_depth*/1);
14069 if(stack.size()){
14070 operate_source_frame = stack[0];
14071 _is_set = true;
14072 }
14073 }
14074 }
14075 ~source_location_guard()noexcept{
14076 if(_is_set){
14077 operate_source_frame = ::std::stacktrace_entry{};
14079 }
14080 }
14081 };
14082#else
14084 constexpr source_location_guard([[maybe_unused]]size_t lookup=0)noexcept{}
14085 };
14087 constexpr const char*file()noexcept{return nullptr;}
14088 constexpr uint_least32_t line()noexcept{return 0;}
14089 }operate_source_location;
14090#endif
14091
14092//file_end
14093
14094 #line 62 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
14095
14096 //BLOCK: Counting memory allocations
14097 #if defined(_MSC_VER)
14098 #if defined(ELC_TEST_COUNT_MEMORY_ALLOC)
14099 #pragma detect_mismatch("ELC_TEST_COUNT_MEMORY_ALLOC","true")
14100 #else
14101 #pragma detect_mismatch("ELC_TEST_COUNT_MEMORY_ALLOC","false")
14102 #endif
14103 #endif
14104
14105 #if defined(ELC_TEST_COUNT_MEMORY_ALLOC)
14106 [[nodiscard]]inline size_t get_size_of_alloc(const byte*p,size_t align)noexcept;
14107 namespace count_info{
14108 distinctive inline size_t alloc_count=0;
14109 distinctive inline size_t free_count=0;
14110 distinctive inline size_t alloc_size=0;
14111 distinctive inline size_t free_size=0;
14112 distinctive inline size_t memory_using=0;
14113 distinctive inline size_t memory_using_max=0;
14114 inline void update_memory_using(ptrdiff_t diff)noexcept{
14115 memory_using+=diff;
14116 if(memory_using>memory_using_max)
14117 memory_using_max=memory_using;
14118 }
14119 inline void clear()noexcept{
14120 alloc_count=0;
14121 free_count=0;
14122 alloc_size=0;
14123 free_size=0;
14124 memory_using=0;
14125 memory_using_max=0;
14126 }
14127 }
14128 #endif
14129 //BLOCK_END
14130
14131 #if defined(ELC_MEMORY_ALLOC_LOCATION_RECORD) && defined(ELC_SPEED_TEST)
14132 #error "ELC_MEMORY_ALLOC_LOCATION_RECORD and ELC_SPEED_TEST can't be defined at the same time."
14133 #endif
14134 #if defined(_MSC_VER)
14135 #if defined(ELC_MEMORY_ALLOC_LOCATION_RECORD)
14136 #pragma detect_mismatch("ELC_MEMORY_ALLOC_LOCATION_RECORD","true")
14137 #else
14138 #pragma detect_mismatch("ELC_MEMORY_ALLOC_LOCATION_RECORD","false")
14139 #endif
14140 #endif
14141
14142 inline constexpr bool use_debug_alloc_lib=
14143 #if in_debug && !defined(ELC_SPEED_TEST)
14144 true
14145 #else
14146 false
14147 #endif
14148 ;
14149
14150 #if SYSTEM_TYPE != windows
14152 static void* aligned_alloc(size_t align,size_t size)noexcept{
14153 return ::std::aligned_alloc(align,size);
14154 }
14155 static void aligned_free(void*ptr,[[maybe_unused]]size_t align)noexcept{
14156 ::std::free(ptr);
14157 }
14158 static void* aligned_realloc(void*ptr,size_t size,[[maybe_unused]]size_t align)noexcept{
14159 return ::std::realloc(ptr,size);
14160 }
14161 static size_t aligned_blocksize([[maybe_unused]]const void*ptr,[[maybe_unused]]size_t align)noexcept{
14162 return 0;//无法获取,所以依赖overhead
14163 }
14164 };
14165 #else
14166 struct default_operators_provider_t{
14167 static void* aligned_alloc(size_t align,size_t size)noexcept{
14168 if constexpr(use_debug_alloc_lib)
14169 return _aligned_malloc_dbg(size,align,operate_source_location.file(),operate_source_location.line());
14170 else
14171 return _aligned_malloc(size,align);
14172 }
14173 static void aligned_free(void*ptr,[[maybe_unused]]size_t align)noexcept{
14174 if constexpr(use_debug_alloc_lib)
14175 _aligned_free_dbg(ptr);
14176 else
14177 _aligned_free(ptr);
14178 }
14179 static void* aligned_realloc(void*ptr,size_t size,size_t align)noexcept{
14180 if constexpr(use_debug_alloc_lib)
14181 return _aligned_realloc_dbg(ptr,size,align,operate_source_location.file(),operate_source_location.line());
14182 else
14183 return _aligned_realloc(ptr,size,align);
14184 }
14185 static size_t aligned_blocksize(const void*ptr,size_t align)noexcept{
14186 if constexpr(use_debug_alloc_lib)
14187 return _aligned_msize_dbg(remove_const(ptr),align,0);
14188 else
14189 return _aligned_msize(remove_const(ptr),align,0);
14190 }
14191 };
14192 #endif
14193
14194 #if defined(ELC_USING_OVERHEADED_ALLOC)
14195 template<class base_operators>
14197 static void* aligned_alloc(size_t align,size_t size)noexcept{
14198 using namespace overhead_n;
14199 void*tmp=base_operators::aligned_alloc(correct_align(align),correct_size(size,align));
14200 if(tmp){
14201 set_overhead(tmp,size);
14202 return correct_pointer(tmp,align);
14203 }
14204 else
14205 return nullptr;
14206 }
14207 static void aligned_free(void*ptr,size_t align)noexcept{
14208 using namespace overhead_n;
14209 base_operators::aligned_free(recorrect_pointer(ptr,align),correct_align(align));
14210 }
14211 static void* aligned_realloc(void*ptr,size_t size,size_t align)noexcept{
14212 using namespace overhead_n;
14213 void*tmp=base_operators::aligned_realloc(recorrect_pointer(ptr,align),correct_size(size,align),correct_align(align));
14214 if(tmp){
14215 set_overhead(tmp,size);
14216 return correct_pointer(tmp,align);
14217 }
14218 else
14219 return nullptr;
14220 }
14221 static size_t aligned_blocksize(const void*ptr,size_t align)noexcept{
14222 using namespace overhead_n;
14223 return get_overhead(recorrect_pointer(ptr,align));
14224 }
14225 };
14226 #endif
14227
14228 typedef
14229 #if defined(ELC_USING_OVERHEADED_ALLOC)
14230 overheaded_operators_provider_t<default_operators_provider_t>
14231 #else
14232 default_operators_provider_t
14233 #endif
14240 [[nodiscard]]inline byte*aligned_alloc(size_t align,size_t size)noexcept{
14241 push_and_disable_msvc_warning(26494);//未初始化警告diss
14242 void* aret;//返回值放这里
14244
14245 aret=alloc_operators_provider::aligned_alloc(align,size);
14246
14247 #if defined(ELC_TEST_COUNT_MEMORY_ALLOC)
14248 if(aret){
14249 count_info::alloc_count++;
14250 count_info::alloc_size+=size;
14251 count_info::update_memory_using(size);
14252 }
14253 #endif
14254
14255 return(byte*)aret;
14256 }
14264 [[nodiscard]]inline byte*realloc(byte*ptr,size_t nsize,size_t align)noexcept{
14265 #if defined(ELC_TEST_COUNT_MEMORY_ALLOC)
14266 const auto osize=get_size_of_alloc(ptr,align);
14267 #endif
14268 push_and_disable_msvc_warning(26494);//未初始化警告diss
14269 void* aret;//返回值放这里
14271
14272 aret=alloc_operators_provider::aligned_realloc(ptr,nsize,align);
14273
14274 #if defined(ELC_TEST_COUNT_MEMORY_ALLOC)
14275 if(aret){
14276 count_info::alloc_size+=nsize-osize;
14277 count_info::update_memory_using(nsize-osize);
14278 }
14279 #endif
14280
14281 return(byte*)aret;
14282 }
14287 inline void free(byte*p,size_t align)noexcept{
14288 #if defined(ELC_TEST_COUNT_MEMORY_ALLOC)
14289 const auto size=get_size_of_alloc(p,align);
14290 count_info::free_count++;
14291 count_info::free_size+=size;
14292 count_info::update_memory_using(-ptrdiff_t(size));
14293 #endif
14294
14295 alloc_operators_provider::aligned_free(p,align);
14296 }
14301 [[nodiscard]]inline size_t get_size_of_alloc(const byte*p,[[maybe_unused]]size_t align)noexcept{
14302 return alloc_operators_provider::aligned_blocksize(p,align);
14303 }
14304
14305 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
14306//_undefs.hpp
14307/*
14308未完成的elc解释器_share文件
14309由steve02081504与Alex0125设计、编写
14310转载时请在不对此文件做任何修改的同时注明出处
14311项目地址:https://github.com/ELC-lang/ELC
14312*/
14313/*
14314 ,??????????????????????????
14315 ????????????????????????????
14316 ?????????????????????????????+
14317 ?????+++++++++++++++++++++++++
14318 ?????+++++++++++++++++++++++++
14319 ??????++++++++++++++++++++++++
14320 ?????++
14321 ?????+++
14322 ??????+++IIIIIIIIIIIIIIIIII
14323 ?????+++++IIIIIIIIIIIIIIIIII
14324 ?????++++++++++++++++++++++++
14325 ??????+++++++++++++++++++++++:
14326 ?????++
14327 ?????+++
14328 ??????++
14329 ??????????????????????????????II
14330 ??????????????????????????????IIII
14331 ,?????????????????????????????IIIII+
14332 =???++++++++++++++++++++++++++III?
14333 ?++++++++++++++++++++++++++++I+
14334*/
14335
14336//defs at "_defs.hpp"
14337
14338#if defined(_MSC_VER)
14339 #pragma warning(pop)
14340#endif
14341//#undef suppress_msvc_warning
14342#undef disable_msvc_warning
14343#undef push_msvc_warning
14344#undef pop_msvc_warning
14345#undef push_and_disable_msvc_warning
14346#if defined(_MSC_VER)
14347 #pragma pack(pop)
14348#endif
14349#if defined(__GNUC__)
14350 #pragma GCC diagnostic pop
14351#endif
14352#if defined(_MSC_VER)
14353 #pragma pop_macro("new")
14354 #pragma pop_macro("delete")
14355 #pragma pop_macro("min")
14356 #pragma pop_macro("max")
14357 #pragma pop_macro("abs")
14358 #pragma pop_macro("export")
14359 #pragma pop_macro("rand")
14360 #pragma pop_macro("sqrt")
14361 #pragma pop_macro("type_info")
14362 #pragma pop_macro("elc")
14363#endif
14364
14365//
14366#if defined(ELC_VOID_NAME)
14367 #define void the_void
14368#endif
14369//
14370#if defined(ELC_PUBLIC_ALL)
14371 #undef protected
14372 #undef private
14373#endif
14374//
14375#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
14376 #define rand the_rand
14377#endif
14378
14379// #undef often_noexcept
14380#undef noexcept_as
14381#undef noexcept_as_auto
14382#undef constexpr_as
14383#undef constexpr_as_auto
14384
14385#undef using_method_from_base_t
14386#undef using_method_from_value
14387
14388#undef floop
14389#undef times
14390#undef debug_times
14391#undef enable_adl
14392
14393#undef re_declvalue
14394#undef re_decltype
14395
14396#undef declvalue
14397
14398#undef template_error
14399#undef template_error_of_type
14400#undef template_warning
14401
14402#undef type_info_of
14403#undef type_name_of
14404
14405#undef is_common_attribute
14406#undef is_special_attribute
14407
14408#undef has_attribute
14409#undef not_has_attribute
14410
14411#undef float_size_of
14412#undef bitnum_of
14413
14414#undef def_common_attribute_with_nothing
14415#undef def_special_attribute_with_nothing
14416
14417#undef common_attribute_t
14418#undef special_attribute_t
14419
14420#undef enable_if
14421#undef enabled_by_default
14422#undef disabled_by_default
14423#undef enable_if_not_ill_form
14424#undef enable_flag
14425
14426#undef was_an_ill_form
14427#undef was_an_ill_form_with_parameter
14428#undef was_not_an_ill_form
14429#undef was_not_an_ill_form_and_noexcept
14430#undef was_not_an_ill_form_with_parameter
14431
14432#undef recursive_λ
14433#undef get_recursive_λ_caller
14434#undef λ
14435#undef exλ
14436#undef λ_with_catch
14437#undef self_recursion
14438#undef λ_RLSRRS
14439#undef λ_inline
14440#undef λ_force_inline
14441
14442#undef MAGIC
14443
14444#undef nothing
14445
14446#undef elseif
14447#undef _big_than_
14448#undef _small_than_
14449
14450#if defined(_MSC_VER)
14451 #undef not
14452 #undef and
14453 #undef or
14454#endif
14455
14456#undef INTER_NAMESPACE
14457#undef BREAK_NAMESPACE
14458
14459#undef szie
14460#undef form
14461
14462#undef template_name
14463#undef type_name
14464
14465#undef not_in_debug
14466
14467#undef es
14468#undef ec
14469
14470#undef ELC_TEST_EVENTNAME
14471
14472#undef override_instance_struct
14473
14474#undef distinctive
14475
14476#undef force_inline
14477
14478#undef with_no_vtable
14479
14480#undef in_consteval
14481
14482#undef no_vtable_struct
14483#undef no_vtable_class
14484
14485//#undef get_elc_defs
14486
14487//file_end
14488
14489 #line 273 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
14490 }
14491 //
14492 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/undef_decl_system_type.hpp"
14493//undef_decl_system_type.hpp
14494/*
14495未完成的elc解释器_share文件
14496由steve02081504与Alex0125设计、编写
14497转载时请在不对此文件做任何修改的同时注明出处
14498项目地址:https://github.com/ELC-lang/ELC
14499*/
14500/*
14501 ,??????????????????????????
14502 ????????????????????????????
14503 ?????????????????????????????+
14504 ?????+++++++++++++++++++++++++
14505 ?????+++++++++++++++++++++++++
14506 ??????++++++++++++++++++++++++
14507 ?????++
14508 ?????+++
14509 ??????+++IIIIIIIIIIIIIIIIII
14510 ?????+++++IIIIIIIIIIIIIIIIII
14511 ?????++++++++++++++++++++++++
14512 ??????+++++++++++++++++++++++:
14513 ?????++
14514 ?????+++
14515 ??????++
14516 ??????????????????????????????II
14517 ??????????????????????????????IIII
14518 ,?????????????????????????????IIIII+
14519 =???++++++++++++++++++++++++++III?
14520 ?++++++++++++++++++++++++++++I+
14521*/
14522//copy&rewrite from steve02081504/evest.h
14523#undef linux
14524#undef windows
14525#undef other
14526#undef SYSTEM_TYPE
14527#undef ERROR_MSG_UNABLE_OS
14528
14529//file_end
14530
14531 #line 276 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/alloc.hpp"
14532#endif
14533
14534//file_end
14535
14536#line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
14537//using at memory/gc
14538#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
14539//die.hpp
14540/*
14541未完成的elc解释器_share文件
14542由steve02081504与Alex0125设计、编写
14543转载时请在不对此文件做任何修改的同时注明出处
14544项目地址:https://github.com/ELC-lang/ELC
14545*/
14546/*
14547 ,??????????????????????????
14548 ????????????????????????????
14549 ?????????????????????????????+
14550 ?????+++++++++++++++++++++++++
14551 ?????+++++++++++++++++++++++++
14552 ??????++++++++++++++++++++++++
14553 ?????++
14554 ?????+++
14555 ??????+++IIIIIIIIIIIIIIIIII
14556 ?????+++++IIIIIIIIIIIIIIIIII
14557 ?????++++++++++++++++++++++++
14558 ??????+++++++++++++++++++++++:
14559 ?????++
14560 ?????+++
14561 ??????++
14562 ??????????????????????????????II
14563 ??????????????????????????????IIII
14564 ,?????????????????????????????IIIII+
14565 =???++++++++++++++++++++++++++III?
14566 ?++++++++++++++++++++++++++++I+
14567*/
14568/*
14569APIs说明
14570elc依赖的基础函数.
14571调整这些,实现快速移植,快速优化与行为自定义.
14572*/
14573#if !defined(ELC_APIS_die)
14574 #define ELC_APIS_die
14575 #include <cuchar>
14576 #include <clocale>
14577 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/default_data_type.hpp"
14578//default_data_type.hpp
14579/*
14580未完成的elc解释器_share文件
14581由steve02081504与Alex0125设计、编写
14582转载时请在不对此文件做任何修改的同时注明出处
14583项目地址:https://github.com/ELC-lang/ELC
14584*/
14585/*
14586 ,??????????????????????????
14587 ????????????????????????????
14588 ?????????????????????????????+
14589 ?????+++++++++++++++++++++++++
14590 ?????+++++++++++++++++++++++++
14591 ??????++++++++++++++++++++++++
14592 ?????++
14593 ?????+++
14594 ??????+++IIIIIIIIIIIIIIIIII
14595 ?????+++++IIIIIIIIIIIIIIIIII
14596 ?????++++++++++++++++++++++++
14597 ??????+++++++++++++++++++++++:
14598 ?????++
14599 ?????+++
14600 ??????++
14601 ??????????????????????????????II
14602 ??????????????????????????????IIII
14603 ,?????????????????????????????IIIII+
14604 =???++++++++++++++++++++++++++III?
14605 ?++++++++++++++++++++++++++++I+
14606*/
14607namespace elc{
14608 /*ELC内部string统一采用char_t宽字符,使用setlocale(LC_ALL,"en_US.utf8")下的UTF编码。*/
14609 typedef char32_t char_t;
14610 /*c_string表示*/
14611 typedef char_t* string_ptr_t;
14612 /*c_string表示*/
14613 typedef const char_t* const_string_ptr_t;
14614 /*ELC内部钦定int_t类型*/
14615 typedef int64_t int_t;
14616 /*ELC内部钦定uint_t类型*/
14617 typedef uint64_t uint_t;
14618 /*ELC内部钦定float_t类型*/
14619 typedef double float_t;
14620 /*ELC内部钦定float_size_t类型,用以描述内存大小的浮点状况*/
14621 typedef long double float_size_t;
14622}
14623
14624//file_end
14625
14626 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
14627 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
14628//_body.hpp
14629/*
14630未完成的elc解释器_share文件
14631由steve02081504与Alex0125设计、编写
14632转载时请在不对此文件做任何修改的同时注明出处
14633项目地址:https://github.com/ELC-lang/ELC
14634*/
14635/*
14636 ,??????????????????????????
14637 ????????????????????????????
14638 ?????????????????????????????+
14639 ?????+++++++++++++++++++++++++
14640 ?????+++++++++++++++++++++++++
14641 ??????++++++++++++++++++++++++
14642 ?????++
14643 ?????+++
14644 ??????+++IIIIIIIIIIIIIIIIII
14645 ?????+++++IIIIIIIIIIIIIIIIII
14646 ?????++++++++++++++++++++++++
14647 ??????+++++++++++++++++++++++:
14648 ?????++
14649 ?????+++
14650 ??????++
14651 ??????????????????????????????II
14652 ??????????????????????????????IIII
14653 ,?????????????????????????????IIIII+
14654 =???++++++++++++++++++++++++++III?
14655 ?++++++++++++++++++++++++++++I+
14656*/
14657/*
14658APIs说明
14659elc依赖的基础函数.
14660调整这些,实现快速移植,快速优化与行为自定义.
14661*/
14662#if !defined(ELC_APIS_char_set)
14663 #define ELC_APIS_char_set
14664 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
14665//base_defs
14666//at namespace ::
14667/*@
14668未完成的elc解释器include文件
14669由steve02081504与Alex0125设计、编写
14670转载时请在不对此文件做任何修改的同时注明出处
14671项目地址:https://github.com/ELC-lang/ELC
14672*/
14673/*
14674 ,??????????????????????????
14675 ????????????????????????????
14676 ?????????????????????????????+
14677 ?????+++++++++++++++++++++++++
14678 ?????+++++++++++++++++++++++++
14679 ??????++++++++++++++++++++++++
14680 ?????++
14681 ?????+++
14682 ??????+++IIIIIIIIIIIIIIIIII
14683 ?????+++++IIIIIIIIIIIIIIIIII
14684 ?????++++++++++++++++++++++++
14685 ??????+++++++++++++++++++++++:
14686 ?????++
14687 ?????+++
14688 ??????++
14689 ??????????????????????????????II
14690 ??????????????????????????????IIII
14691 ,?????????????????????????????IIIII+
14692 =???++++++++++++++++++++++++++III?
14693 ?++++++++++++++++++++++++++++I+
14694*/
14695#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
14696//pre_checks.hpp
14697/*
14698未完成的elc解释器_share文件
14699由steve02081504与Alex0125设计、编写
14700转载时请在不对此文件做任何修改的同时注明出处
14701项目地址:https://github.com/ELC-lang/ELC
14702*/
14703/*
14704 ,??????????????????????????
14705 ????????????????????????????
14706 ?????????????????????????????+
14707 ?????+++++++++++++++++++++++++
14708 ?????+++++++++++++++++++++++++
14709 ??????++++++++++++++++++++++++
14710 ?????++
14711 ?????+++
14712 ??????+++IIIIIIIIIIIIIIIIII
14713 ?????+++++IIIIIIIIIIIIIIIIII
14714 ?????++++++++++++++++++++++++
14715 ??????+++++++++++++++++++++++:
14716 ?????++
14717 ?????+++
14718 ??????++
14719 ??????????????????????????????II
14720 ??????????????????????????????IIII
14721 ,?????????????????????????????IIIII+
14722 =???++++++++++++++++++++++++++III?
14723 ?++++++++++++++++++++++++++++I+
14724*/
14725//__cplusplus needs 20+
14726#if !defined(__cplusplus)||__cplusplus<202002L
14727 //if msvc, check _MSVC_LANG
14728 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
14729 //ok
14730 #else
14731 #error "elc files needs c++20 or higher"
14732 #endif
14733#endif
14734
14735//check if the compiler is msvc
14736#if defined(_MSC_VER)
14737 //check if _CPPRTTI
14738 #if !defined(_CPPRTTI)
14739 #error "elc files needs rtti"
14740 #endif
14741 //check _MSC_VER at last 1932
14742 #if _MSC_VER<1932
14743 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
14744 #endif
14745#endif
14746
14747//file_end
14748
14749#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
14750#line 57 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
14751
14752//file_end
14753
14754 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
14756 namespace elc::char_set{
14757 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
14758//_defs.hpp
14759/*
14760未完成的elc解释器_share文件
14761由steve02081504与Alex0125设计、编写
14762转载时请在不对此文件做任何修改的同时注明出处
14763项目地址:https://github.com/ELC-lang/ELC
14764*/
14765/*
14766 ,??????????????????????????
14767 ????????????????????????????
14768 ?????????????????????????????+
14769 ?????+++++++++++++++++++++++++
14770 ?????+++++++++++++++++++++++++
14771 ??????++++++++++++++++++++++++
14772 ?????++
14773 ?????+++
14774 ??????+++IIIIIIIIIIIIIIIIII
14775 ?????+++++IIIIIIIIIIIIIIIIII
14776 ?????++++++++++++++++++++++++
14777 ??????+++++++++++++++++++++++:
14778 ?????++
14779 ?????+++
14780 ??????++
14781 ??????????????????????????????II
14782 ??????????????????????????????IIII
14783 ,?????????????????????????????IIIII+
14784 =???++++++++++++++++++++++++++III?
14785 ?++++++++++++++++++++++++++++I+
14786*/
14787
14788//undefs at "_undefs.hpp"
14789
14790#if defined(ELC_CODE_REALM)
14791 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
14792#endif
14793
14794//set ELC_WARNING_LEVEL default to 4(max)
14795#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
14796
14797#if defined(_MSC_VER)
14798 #pragma warning(push,ELC_WARNING_LEVEL)
14799 #pragma warning(disable:4099)//class与struct混用警告diss
14800 #pragma warning(disable:4584)//重复子类警告diss
14801 #pragma warning(disable:4250)//域控制继承警告diss
14802 #pragma warning(disable:26432)//不完全默认方法警告diss
14803 #pragma warning(disable:26435)//virtual override方法警告diss
14804 #pragma warning(disable:26481)//容器安利diss
14805 #pragma warning(disable:26446)//gsl::at安利diss
14806 #pragma warning(disable:26434)//方法覆盖警告diss
14807 #pragma warning(disable:26429)//gsl::not_null安利diss
14808 #pragma warning(disable:26471)//对void*进行static_cast安利diss
14809 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
14810 #pragma warning(disable:26473)//相同指针显式cast警告diss
14811 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
14812 #pragma warning(disable:26485)//数组作指针警告diss
14813 #pragma warning(disable:26490)//reinterpret_cast警告diss
14814 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
14815 #pragma warning(disable:26482)//非常数数组索引警告diss
14816 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
14817#endif
14818#if defined(__GNUC__)
14819 #pragma GCC diagnostic push
14820 #pragma GCC diagnostic warning "-Wall"//开启所有警告
14821 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
14822#endif
14823#if defined(_MSC_VER)
14824 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
14825 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
14826 #define push_msvc_warning() __pragma(warning(push))
14827 #define pop_msvc_warning() __pragma(warning(pop))
14828 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
14829#else
14830 //#define suppress_msvc_warning(...)
14831 #define disable_msvc_warning(...)
14832 #define push_msvc_warning()
14833 #define pop_msvc_warning()
14834 #define push_and_disable_msvc_warning(...)
14835#endif
14836#if defined(_MSC_VER)
14837 //push pack settings
14838 #pragma pack(push)
14839 #pragma pack()
14840#endif
14841#if defined(_MSC_VER)
14842 //push and undef common macros
14843 #pragma push_macro("new")
14844 #undef new
14845 #pragma push_macro("delete")
14846 #undef delete
14847 #pragma push_macro("min")
14848 #undef min
14849 #pragma push_macro("max")
14850 #undef max
14851 #pragma push_macro("abs")
14852 #undef abs
14853 #pragma push_macro("export")
14854 #undef export
14855 #pragma push_macro("rand")
14856 #undef rand
14857 #pragma push_macro("sqrt")
14858 #undef sqrt
14859 #pragma push_macro("type_info")
14860 #undef type_info
14861 #pragma push_macro("elc")
14862 #undef elc
14863#endif
14864//
14865#if defined(ELC_VOID_NAME)
14866 #undef void
14867#endif
14868//
14869#if defined(ELC_PUBLIC_ALL)
14870 #define protected public
14871 #define private public
14872#endif
14873//
14874#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
14875 #undef rand
14876#endif
14877
14878// #define often_noexcept
14879#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
14880#define noexcept_as_auto MAGIC//哦现在有了
14881#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
14882#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
14883
14884#define using_method_from_base_t(name,...) \
14885template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
14886auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
14887{\
14888 return base_t::name(forward<Args>(rest)...);\
14889}\
14890
14891#define using_method_from_value(name,value_name,...) \
14892template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
14893auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
14894{\
14895 return value_name.name(forward<Args>(rest)...);\
14896}\
14897
14898#define floop while(__builtin_is_my_dick_still_there())
14899#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
14900#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
14901#if defined(_MSC_VER) && _MSC_VER>=1935
14902 //@see https://developercommunity.visualstudio.com/t/10193638
14903 #define enable_adl(name) template<typename=void>void name()noexcept=delete
14904#else
14905 #define enable_adl(name) void name()noexcept=delete
14906#endif
14907
14908#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
14909#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
14910
14911#define declvalue(...) (::std::declval<__VA_ARGS__>())
14912
14914#define template_error(reason) static_assert(template_error_helper<T>,reason)
14916#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
14918#define template_warning(reason) template_warning_helper<T>(reason)
14919
14920//for type_info
14921#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
14922#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
14923
14924#define is_common_attribute(name) public attribute<T,name<T>>
14925#define is_special_attribute(name) public attribute<T,name>
14926
14927#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
14928#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
14929
14930//for float_size_t
14931#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
14932//bitnum_of
14933#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
14934
14935//for attribute
14936#define def_common_attribute_with_nothing(name) \
14937template<typename T>\
14938class name{}\
14939
14940#define def_special_attribute_with_nothing(name) \
14941class name{}\
14942
14943#define common_attribute_t template<class>class
14944#define special_attribute_t class
14945
14954#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
14956#define enabled_by_default class enable_state=void
14958#define disabled_by_default class enable_state= ::std::enable_if_t<false>
14960#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
14962#define enable_flag class enable_state
14963
14964#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
14965#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
14966#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
14967#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
14968#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
14969
14971#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
14973#define get_recursive_λ_caller(name,...) \
14974exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
14975 return name(name,Args...);\
14976}
14978#define λ []
14980#define exλ [&]
14982#define λ_with_catch(...) [__VA_ARGS__]
14984#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
14985//recursive_λ_self_referential_reserved_symbolname
14986#define λ_RLSRRS _my_jb_super_sb_name_
14987
14988#if defined(_MSC_VER) && !defined(__clang__)
14989 #define λ_inline [[msvc::forceinline]]
14990 #define λ_force_inline [[msvc::forceinline]]
14991#elif
14992 #define λ_inline [[gnu::always_inline]]
14993 #define λ_force_inline [[gnu::always_inline]]
14994#else
14995 #define λ_inline
14996 #define λ_force_inline
14997#endif
14998
14999#define MAGIC//ahh,ko no tenno da!
15000
15002#define nothing
15003
15005#define elseif else if
15007#define _big_than_ >
15009#define _small_than_ <
15010
15011#if defined(_MSC_VER)
15012 #define not !
15013 #define and &&
15014 #define or ||
15015#endif
15016
15018#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
15020#define BREAK_NAMESPACE }
15021
15023#define template_name template
15025#define type_name class
15026
15027#if defined(DEBUG) || defined(_DEBUG)
15028 #define not_in_debug 0
15029 #define in_debug 1
15030#else
15031 #define not_in_debug 1
15032 #define in_debug 0
15033#endif
15034
15035#define es U""
15036#define ec(ch) U ## ch
15037
15038#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
15039 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
15040#else
15041 #define ELC_TEST_EVENTNAME(name)
15042#endif
15043
15044#define override_instance_struct \
15045protected:\
15046 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
15047 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
15048 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
15049 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
15050 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
15051
15052#if defined(_MSC_VER) && !defined(__clang__)
15053 #define distinctive __declspec(dllexport)
15054#else
15055 #define distinctive
15056#endif
15057
15058#if defined(_MSC_VER) && !defined(__clang__)
15059 #define force_inline __forceinline
15060#elif defined(__GNUC__) || defined(__clang__)
15061 #define force_inline __attribute__((always_inline)) inline
15062#else
15063 #define force_inline inline
15064#endif
15065
15066#if defined(_MSC_VER) && !defined(__clang__)
15067 #define with_no_vtable __declspec(novtable)
15068#else
15069 #define with_no_vtable
15070#endif
15071
15072#define in_consteval (::std::is_constant_evaluated())
15073
15074#define no_vtable_struct struct with_no_vtable
15075#define no_vtable_class class with_no_vtable
15076
15077//#define get_elc_defs using namespace ::elc::defs
15078
15079//file_end
15080
15081 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
15082
15083 using namespace ::elc::defs;//string_view_t
15084
15085 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/marcos/_defs.hpp"
15086//_defs.hpp
15087/*
15088未完成的elc解释器_share文件
15089由steve02081504与Alex0125设计、编写
15090转载时请在不对此文件做任何修改的同时注明出处
15091项目地址:https://github.com/ELC-lang/ELC
15092*/
15093/*
15094 ,??????????????????????????
15095 ????????????????????????????
15096 ?????????????????????????????+
15097 ?????+++++++++++++++++++++++++
15098 ?????+++++++++++++++++++++++++
15099 ??????++++++++++++++++++++++++
15100 ?????++
15101 ?????+++
15102 ??????+++IIIIIIIIIIIIIIIIII
15103 ?????+++++IIIIIIIIIIIIIIIIII
15104 ?????++++++++++++++++++++++++
15105 ??????+++++++++++++++++++++++:
15106 ?????++
15107 ?????+++
15108 ??????++
15109 ??????????????????????????????II
15110 ??????????????????????????????IIII
15111 ,?????????????????????????????IIIII+
15112 =???++++++++++++++++++++++++++III?
15113 ?++++++++++++++++++++++++++++I+
15114*/
15115#define U_MASK(x) ((uint32_t)1<<(x))
15116
15117#define GET_CATEGORY(props) ((props)&0x1f)
15118
15119#define CAT_MASK(props) U_MASK(GET_CATEGORY(props))
15120
15121#define _UTRIE_INDEX_FROM_SUPP(trieIndex, c) \
15122 (((int32_t)((trieIndex)[\
15123 (trieIndex)[(UTRIE_INDEX_1_OFFSET-UTRIE_OMITTED_BMP_INDEX_1_LENGTH)+\
15124 ((c)>>UTRIE_SHIFT_1)]+\
15125 (((c)>>UTRIE_SHIFT_2)&UTRIE_INDEX_2_MASK)])\
15126 <<UTRIE_INDEX_SHIFT)+\
15127 ((c)&UTRIE_DATA_MASK))
15128
15129#define _UTRIE_INDEX_RAW(offset, trieIndex, c) \
15130 (((int32_t)((trieIndex)[(offset)+((c)>>UTRIE_SHIFT_2)])\
15131 <<UTRIE_INDEX_SHIFT)+\
15132 ((c)&UTRIE_DATA_MASK))
15133
15134#define _UTRIE_INDEX_FROM_CP(trie, asciiOffset, c) \
15135 ((uint32_t)(c)<0xd800 ?\
15136 _UTRIE_INDEX_RAW(0, (trie)->index, c) :\
15137 (uint32_t)(c)<=0xffff ?\
15138 _UTRIE_INDEX_RAW(\
15139 (c)<=0xdbff ? UTRIE_LSCP_INDEX_2_OFFSET-(0xd800>>UTRIE_SHIFT_2) : 0,\
15140 (trie)->index, c) :\
15141 (uint32_t)(c)>0x10ffff ?\
15142 (asciiOffset)+UTRIE_BAD_UTF8_DATA_OFFSET :\
15143 (c)>=(trie)->highStart ?\
15144 (trie)->highValueIndex :\
15145 _UTRIE_INDEX_FROM_SUPP((trie)->index, c))
15146
15147#define _UTRIE_GET(trie, data, asciiOffset, c) (trie)->data[_UTRIE_INDEX_FROM_CP(trie, asciiOffset, c)]
15148
15149#define UTRIE_GET16(trie, c) _UTRIE_GET((trie), index, (trie)->indexLength, (c))
15150
15151#define GET_PROPS(c) (UTRIE_GET16(&propstrie, c))
15152
15153//file_end
15154
15155 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
15156 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/constexprs.hpp"
15157//constexprs.hpp
15158/*
15159未完成的elc解释器_share文件
15160由steve02081504与Alex0125设计、编写
15161转载时请在不对此文件做任何修改的同时注明出处
15162项目地址:https://github.com/ELC-lang/ELC
15163*/
15164/*
15165 ,??????????????????????????
15166 ????????????????????????????
15167 ?????????????????????????????+
15168 ?????+++++++++++++++++++++++++
15169 ?????+++++++++++++++++++++++++
15170 ??????++++++++++++++++++++++++
15171 ?????++
15172 ?????+++
15173 ??????+++IIIIIIIIIIIIIIIIII
15174 ?????+++++IIIIIIIIIIIIIIIIII
15175 ?????++++++++++++++++++++++++
15176 ??????+++++++++++++++++++++++:
15177 ?????++
15178 ?????+++
15179 ??????++
15180 ??????????????????????????????II
15181 ??????????????????????????????IIII
15182 ,?????????????????????????????IIIII+
15183 =???++++++++++++++++++++++++++III?
15184 ?++++++++++++++++++++++++++++I+
15185*/
15186inline namespace constexprs{
15187 inline namespace offsets{
15189 inline constexpr auto UTRIE_SHIFT_1=6+5;
15190
15192 inline constexpr auto UTRIE_SHIFT_2=5;
15193
15199
15204 inline constexpr auto UTRIE_OMITTED_BMP_INDEX_1_LENGTH=0x10000>>UTRIE_SHIFT_1;
15205
15208
15211
15214
15216 inline constexpr auto UTRIE_DATA_BLOCK_LENGTH=1<<UTRIE_SHIFT_2;
15217
15220
15227 inline constexpr auto UTRIE_INDEX_SHIFT=2;
15228
15231
15232 /* Fixed layout of the first part of the index array. ------------------- */
15233
15238 inline constexpr auto UTRIE_INDEX_2_OFFSET=0;
15239
15246 inline constexpr auto UTRIE_LSCP_INDEX_2_OFFSET=0x10000>>UTRIE_SHIFT_2;
15247 inline constexpr auto UTRIE_LSCP_INDEX_2_LENGTH=0x400>>UTRIE_SHIFT_2;
15248
15251
15257 inline constexpr auto UTRIE_UTF8_2B_INDEX_2_LENGTH=0x800>>6; /* U+0800 is the first code point after 2-byte UTF-8 */
15258
15272 inline constexpr auto UTRIE_MAX_INDEX_1_LENGTH=0x100000>>UTRIE_SHIFT_1;
15273
15274 /*
15275 * Fixed layout of the first part of the data array. -----------------------
15276 * Starts with 4 blocks (128=0x80 entries) for ASCII.
15277 */
15278
15284 inline constexpr auto UTRIE_BAD_UTF8_DATA_OFFSET=0x80;
15285
15287 inline constexpr auto UTRIE_DATA_START_OFFSET=0xc0;
15288 }
15289 inline namespace categorys{
15291 inline constexpr auto U_UNASSIGNED = 0;
15293 inline constexpr auto U_GENERAL_OTHER_TYPES = 0;
15295 inline constexpr auto U_UPPERCASE_LETTER = 1;
15297 inline constexpr auto U_LOWERCASE_LETTER = 2;
15299 inline constexpr auto U_TITLECASE_LETTER = 3;
15301 inline constexpr auto U_MODIFIER_LETTER = 4;
15303 inline constexpr auto U_OTHER_LETTER = 5;
15305 inline constexpr auto U_NON_SPACING_MARK = 6;
15307 inline constexpr auto U_ENCLOSING_MARK = 7;
15309 inline constexpr auto U_COMBINING_SPACING_MARK = 8;
15311 inline constexpr auto U_DECIMAL_DIGIT_NUMBER = 9;
15313 inline constexpr auto U_LETTER_NUMBER = 10;
15315 inline constexpr auto U_OTHER_NUMBER = 11;
15317 inline constexpr auto U_SPACE_SEPARATOR = 12;
15319 inline constexpr auto U_LINE_SEPARATOR = 13;
15321 inline constexpr auto U_PARAGRAPH_SEPARATOR = 14;
15323 inline constexpr auto U_CONTROL_CHAR = 15;
15325 inline constexpr auto U_FORMAT_CHAR = 16;
15327 inline constexpr auto U_PRIVATE_USE_CHAR = 17;
15329 inline constexpr auto U_SURROGATE = 18;
15331 inline constexpr auto U_DASH_PUNCTUATION = 19;
15333 inline constexpr auto U_START_PUNCTUATION = 20;
15335 inline constexpr auto U_END_PUNCTUATION = 21;
15337 inline constexpr auto U_CONNECTOR_PUNCTUATION = 22;
15339 inline constexpr auto U_OTHER_PUNCTUATION = 23;
15341 inline constexpr auto U_MATH_SYMBOL = 24;
15343 inline constexpr auto U_CURRENCY_SYMBOL = 25;
15345 inline constexpr auto U_MODIFIER_SYMBOL = 26;
15347 inline constexpr auto U_OTHER_SYMBOL = 27;
15349 inline constexpr auto U_INITIAL_PUNCTUATION = 28;
15351 inline constexpr auto U_FINAL_PUNCTUATION = 29;
15352 }
15353 inline namespace masks{
15354 inline constexpr auto U_GC_CN_MASK = U_MASK(U_GENERAL_OTHER_TYPES);
15355
15357 inline constexpr auto U_GC_LU_MASK = U_MASK(U_UPPERCASE_LETTER);
15359 inline constexpr auto U_GC_LL_MASK = U_MASK(U_LOWERCASE_LETTER);
15361 inline constexpr auto U_GC_LT_MASK = U_MASK(U_TITLECASE_LETTER);
15363 inline constexpr auto U_GC_LM_MASK = U_MASK(U_MODIFIER_LETTER);
15365 inline constexpr auto U_GC_LO_MASK = U_MASK(U_OTHER_LETTER);
15366
15368 inline constexpr auto U_GC_MN_MASK = U_MASK(U_NON_SPACING_MARK);
15370 inline constexpr auto U_GC_ME_MASK = U_MASK(U_ENCLOSING_MARK);
15372 inline constexpr auto U_GC_MC_MASK = U_MASK(U_COMBINING_SPACING_MARK);
15373
15375 inline constexpr auto U_GC_ND_MASK = U_MASK(U_DECIMAL_DIGIT_NUMBER);
15377 inline constexpr auto U_GC_NL_MASK = U_MASK(U_LETTER_NUMBER);
15379 inline constexpr auto U_GC_NO_MASK = U_MASK(U_OTHER_NUMBER);
15380
15382 inline constexpr auto U_GC_ZS_MASK = U_MASK(U_SPACE_SEPARATOR);
15384 inline constexpr auto U_GC_ZL_MASK = U_MASK(U_LINE_SEPARATOR);
15386 inline constexpr auto U_GC_ZP_MASK = U_MASK(U_PARAGRAPH_SEPARATOR);
15387
15389 inline constexpr auto U_GC_CC_MASK = U_MASK(U_CONTROL_CHAR);
15391 inline constexpr auto U_GC_CF_MASK = U_MASK(U_FORMAT_CHAR);
15393 inline constexpr auto U_GC_CO_MASK = U_MASK(U_PRIVATE_USE_CHAR);
15395 inline constexpr auto U_GC_CS_MASK = U_MASK(U_SURROGATE);
15396
15398 inline constexpr auto U_GC_PD_MASK = U_MASK(U_DASH_PUNCTUATION);
15400 inline constexpr auto U_GC_PS_MASK = U_MASK(U_START_PUNCTUATION);
15402 inline constexpr auto U_GC_PE_MASK = U_MASK(U_END_PUNCTUATION);
15404 inline constexpr auto U_GC_PC_MASK = U_MASK(U_CONNECTOR_PUNCTUATION);
15406 inline constexpr auto U_GC_PO_MASK = U_MASK(U_OTHER_PUNCTUATION);
15407
15409 inline constexpr auto U_GC_SM_MASK = U_MASK(U_MATH_SYMBOL);
15411 inline constexpr auto U_GC_SC_MASK = U_MASK(U_CURRENCY_SYMBOL);
15413 inline constexpr auto U_GC_SK_MASK = U_MASK(U_MODIFIER_SYMBOL);
15415 inline constexpr auto U_GC_SO_MASK = U_MASK(U_OTHER_SYMBOL);
15416
15418 inline constexpr auto U_GC_PI_MASK = U_MASK(U_INITIAL_PUNCTUATION);
15420 inline constexpr auto U_GC_PF_MASK = U_MASK(U_FINAL_PUNCTUATION);
15421
15422
15425
15428
15431
15434
15437
15440
15443
15446 }
15447 inline namespace chars{
15448 inline constexpr auto TAB =0x0009;
15449 inline constexpr auto LF =0x000a;
15450 inline constexpr auto FF =0x000c;
15451 inline constexpr auto CR =0x000d;
15452 inline constexpr auto NBSP =0x00a0;
15453 inline constexpr auto CGJ =0x034f;
15454 inline constexpr auto FIGURESP=0x2007;
15455 inline constexpr auto HAIRSP =0x200a;
15456 inline constexpr auto ZWNJ =0x200c;
15457 inline constexpr auto ZWJ =0x200d;
15458 inline constexpr auto RLM =0x200f;
15459 inline constexpr auto NNBSP =0x202f;
15460 inline constexpr auto ZWNBSP =0xfeff;
15461 }
15462}
15463
15464//file_end
15465
15466 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
15467 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/props_data.hpp"
15468//props_data.hpp
15469/*
15470未完成的elc解释器_share文件
15471由steve02081504与Alex0125设计、编写
15472转载时请在不对此文件做任何修改的同时注明出处
15473项目地址:https://github.com/ELC-lang/ELC
15474*/
15475/*
15476 ,??????????????????????????
15477 ????????????????????????????
15478 ?????????????????????????????+
15479 ?????+++++++++++++++++++++++++
15480 ?????+++++++++++++++++++++++++
15481 ??????++++++++++++++++++++++++
15482 ?????++
15483 ?????+++
15484 ??????+++IIIIIIIIIIIIIIIIII
15485 ?????+++++IIIIIIIIIIIIIIIIII
15486 ?????++++++++++++++++++++++++
15487 ??????+++++++++++++++++++++++:
15488 ?????++
15489 ?????+++
15490 ??????++
15491 ??????????????????????????????II
15492 ??????????????????????????????IIII
15493 ,?????????????????????????????IIIII+
15494 =???++++++++++++++++++++++++++III?
15495 ?++++++++++++++++++++++++++++I+
15496*/
15497inline constexpr uint16_t props_index[23016]={
154980x495,0x49d,0x4a5,0x4ad,0x4c5,0x4cd,0x4d5,0x4dd,0x4e5,0x4ed,0x4f3,0x4fb,0x503,0x50b,0x513,0x51b,
154990x521,0x529,0x531,0x539,0x53c,0x544,0x54c,0x554,0x55c,0x564,0x560,0x568,0x570,0x578,0x57d,0x585,
155000x58d,0x595,0x599,0x5a1,0x5a9,0x5b1,0x5b9,0x5c1,0x5bd,0x5c5,0x5ca,0x5d2,0x5d8,0x5e0,0x5e8,0x5f0,
155010x5f8,0x600,0x608,0x610,0x615,0x61d,0x620,0x628,0x630,0x638,0x63e,0x646,0x645,0x64d,0x655,0x65d,
155020x66d,0x665,0x675,0x67d,0x683,0x600,0x693,0x68b,0x6a3,0x6a5,0x6ad,0x69b,0x6bd,0x6c3,0x6cb,0x6b5,
155030x6db,0x6e1,0x6e9,0x6d3,0x6f9,0x6ff,0x707,0x6f1,0x717,0x71d,0x725,0x70f,0x735,0x73d,0x745,0x72d,
155040x755,0x75b,0x763,0x74d,0x773,0x779,0x781,0x76b,0x791,0x796,0x79e,0x789,0x7ae,0x7b5,0x7bd,0x7a6,
155050x641,0x7c5,0x7cd,0x4b5,0x7d5,0x7dc,0x7e4,0x4b5,0x7ec,0x7f4,0x7fc,0x801,0x809,0x810,0x818,0x4b5,
155060x600,0x820,0x828,0x830,0x838,0x58d,0x848,0x840,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155070x600,0x600,0x850,0x600,0x858,0x85c,0x864,0x600,0x86a,0x600,0x870,0x878,0x880,0x58d,0x58d,0x888,
155080x890,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155090x600,0x600,0x600,0x895,0x89d,0x600,0x600,0x8a5,0x8ad,0x8b5,0x8bd,0x8c5,0x600,0x8cd,0x8d5,0x8dd,
155100x8ed,0x600,0x8f5,0x8f7,0x8ff,0x8e5,0x600,0x902,0x916,0x90a,0x912,0x91e,0x600,0x926,0x92c,0x934,
155110x93c,0x600,0x94c,0x954,0x95c,0x944,0x96c,0x4b5,0x974,0x977,0x97f,0x964,0x98f,0x987,0x600,0x996,
155120x600,0x9a5,0x99e,0x9ad,0x9b5,0x9b9,0x9c1,0x9c9,0x535,0x9d1,0x9d4,0x9da,0x9e1,0x9d4,0x55c,0x55c,
155130x4e5,0x4e5,0x4e5,0x4e5,0x9e9,0x4e5,0x4e5,0x4e5,0x9f9,0xa01,0xa09,0xa11,0xa19,0xa1d,0xa25,0x9f1,
155140xa3d,0xa45,0xa2d,0xa35,0xa4d,0xa55,0xa5d,0xa65,0xa7d,0xa6d,0xa75,0xa85,0xa8d,0xa9c,0xaa1,0xa94,
155150xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xab1,0xab9,0x934,0xabc,0xac4,0xacb,0xad0,0xad8,
155160x934,0xadf,0xade,0xaef,0xaf2,0x934,0x934,0xae7,0x934,0x934,0x934,0x934,0x934,0xb01,0xb09,0xaf9,
155170x934,0x934,0x934,0xb0e,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xb14,0xb1c,0x934,0xb24,0xb2b,
155180x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xaa9,0xaa9,0xaa9,0xaa9,0xb33,0xaa9,0xb3a,0xb41,
155190xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0xaa9,0x934,0xb49,0xb50,0xb54,0xb5a,0x934,0x934,0x934,
155200x58d,0x595,0x535,0xb62,0x4e5,0x4e5,0x4e5,0xb6a,0x535,0xb72,0x600,0xb78,0xb88,0xb80,0xb80,0x55c,
155210xb90,0xb98,0xba0,0x4b5,0xba8,0x934,0x934,0xbaf,0x934,0x934,0x934,0x934,0x934,0x934,0xbb7,0xbbd,
155220xbcd,0xbc5,0x641,0x600,0xbd5,0x890,0x600,0xbdd,0xbe5,0xbe9,0x600,0x600,0xbee,0x600,0x934,0xbf5,
155230xad9,0xbfd,0xc03,0x934,0xbfd,0xc0b,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,
155240xc13,0x600,0x600,0x600,0xc1b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155250x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155260x600,0xc21,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155270x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc26,0x600,0x600,0x600,0x600,0x600,
155280x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155290x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155300x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155310x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155320x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155330x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155340x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155350x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155360x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x934,0x934,
155370xc2e,0x600,0xc31,0x600,0xc39,0xc3f,0xc47,0xc4f,0xc54,0x600,0x600,0xc58,0x600,0x600,0x600,0x600,
155380x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc5f,0x600,0xc66,0xc6c,0x600,0x600,0x600,0x600,
155390x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc74,0x600,0x600,0x600,0xc7c,0x600,
155400x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155410x600,0x600,0x600,0x600,0x600,0x600,0xc7e,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155420x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc85,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155430x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155440x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155450x600,0x600,0x600,0xc8c,0x600,0x600,0x600,0xc93,0xc9b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155460x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155470x600,0x600,0x600,0x600,0x600,0x600,0x600,0xca0,0x600,0x600,0xca8,0x600,0x600,0x600,0x600,0x600,
155480x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155490x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcac,0x600,
155500x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155510x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155520x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155530x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcaf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155540x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155550x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcb2,0x600,0x600,0x600,
155560x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155570x600,0x600,0x600,0xcb8,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155580x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155590x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155600x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155610x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155620x600,0x600,0x600,0x600,0xcc0,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155630x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155640x600,0xcc5,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155650x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155660x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155670x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155680x600,0x600,0x600,0x600,0x600,0xcca,0x600,0x600,0x600,0xccf,0x600,0x600,0x600,0x600,0x600,0x600,
155690x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155700x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155710x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155720x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155730x600,0xcd7,0xcde,0xce2,0x600,0x600,0x600,0xce9,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155740x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155750x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155760x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155770x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155780xcf7,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155790x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155800x600,0x600,0x600,0x600,0xcef,0x934,0xcff,0x9ad,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155810xd04,0xd0c,0x4e5,0xd1c,0xd14,0x600,0x600,0xd24,0xd2c,0xd3c,0x4e5,0xd41,0xd49,0xd4f,0xd56,0xd34,
155820xd5e,0xd66,0x600,0xd6e,0xd7e,0xd81,0xd76,0xd89,0x655,0xd91,0xd98,0x8f6,0x6a3,0xda8,0xda0,0xdb0,
155830x600,0xdb8,0xdc0,0xdc8,0x600,0xdd0,0xdd8,0xde0,0xde8,0xdf0,0xdf4,0xdfc,0x535,0x535,0x600,0xe04,
155840x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155850x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155860x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155870x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155880x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155890x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155900x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155910x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155920x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155930x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155940x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155950x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155960x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155970x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155980x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
155990x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156000x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156010x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156020x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156030x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156040x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156050x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe0c,0xe18,0xe10,
156060x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156070x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156080xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,
156090xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,
156100xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156110xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156120xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156130xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156140xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156150xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156160xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156170xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156180xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156190xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156200xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156210xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
156220xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0x600,0x600,0x600,0xe30,0x600,0xcea,0xe37,0xe3c,
156230x600,0x600,0x600,0xe44,0x600,0x600,0x901,0x4b5,0xe5a,0xe4a,0xe52,0x600,0x600,0xe62,0xe6a,0x600,
156240x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe6f,0x938,0x600,0xe77,0x600,0xe7d,0xe81,
156250xe89,0xe91,0xe98,0xea0,0x600,0x600,0x600,0xea6,0xebe,0x4a5,0xec6,0xece,0xed3,0x916,0xeae,0xeb6,
156260xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,
156270xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,
156280x12d4,0x12d4,0x1314,0x1354,0x1394,0x13cc,0x140c,0x144c,0x1484,0x14c4,0x14f0,0x1530,0x1570,0x1580,0x15c0,0x15f4,
156290x1634,0x1664,0x16a4,0x16e4,0x16f4,0x1728,0x1760,0x17a0,0x17e0,0x1820,0x1854,0x1880,0x18c0,0x18f8,0x1914,0x1954,
156300xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0xa40,0xc0e,0xa40,0xa40,0xa40,0xa40,0xc4e,0x1db,0x1db,
156310xc8e,0xcce,0xa40,0xa40,0xa40,0xcf7,0xd37,0xd57,0xa40,0xd7d,0xdbd,0xdfd,0xe3d,0xe7d,0xebd,0xefd,
156320xf3d,0xf74,0x1db,0x1db,0xf98,0xfcc,0x1db,0xff4,0x1db,0x1db,0x1db,0x1db,0x1021,0x1db,0x1db,0x1db,
156330x1db,0x1db,0x1db,0x1db,0x1035,0x1db,0x106d,0x10ad,0x1db,0x10b8,0x1db,0x1db,0x1db,0x10ee,0xa40,0x112e,
156340x1db,0x1db,0x116e,0x1db,0x1191,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156350xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156360xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156370xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156380xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156390xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156400xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156410xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156420xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156430xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156440xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156450xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156460xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156470xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156480xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156490xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156500xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156510xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156520xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156530xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156540xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156550xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156560x11d1,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156570xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,
156580x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,
156590x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1211,
156600x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,
156610x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x700,0x1211,
156620x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156630x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156640x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156650x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156660xedb,0xee2,0xeea,0x4b5,0x600,0x600,0x600,0xef2,0xf02,0xefa,0xf19,0xf0a,0xf11,0xf21,0xf25,0xf29,
156670x4b5,0x4b5,0x4b5,0x4b5,0x8f6,0x600,0xf31,0xf39,0x600,0xf41,0xf49,0xf4d,0xf55,0x600,0xf5d,0x4b5,
156680x58d,0x597,0xf65,0x600,0xf69,0xf71,0xf81,0xf79,0x600,0xf89,0x600,0xf90,0xfa0,0xf98,0x4b5,0x4b5,
156690x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xb88,0x902,0xfa8,0xfb8,0xfb0,0x4b5,0x4b5,
156700xfc8,0xfc0,0xfcb,0xfd3,0x916,0xfdb,0x4b5,0xfe3,0xfeb,0xff3,0x4b5,0x4b5,0x600,0x1003,0x100b,0xffb,
156710x101b,0x1022,0x1013,0x102a,0x1032,0x4b5,0x1042,0x103a,0x600,0x1045,0x104d,0x1055,0x105d,0x1065,0x4b5,0x4b5,
156720x600,0x600,0x106d,0x4b5,0x58d,0x1075,0x535,0x107d,0x600,0x1085,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156730x4b5,0x4b5,0x4b5,0x108d,0x600,0x1095,0x4b5,0x109a,0x10a2,0x10aa,0x10b1,0xfdf,0x10b9,0xfdf,0x10c1,0xb88,
156740x10d1,0x636,0x10d9,0x10c9,0x98f,0x10e1,0x10e9,0x10ef,0x1107,0x10f7,0x10ff,0x110b,0x98f,0x111b,0x1113,0x1123,
156750x113b,0x112b,0x1133,0x4b5,0x1142,0x114a,0x658,0x1152,0x1162,0x1168,0x1170,0x115a,0x4b5,0x4b5,0x4b5,0x4b5,
156760x600,0x1178,0x1180,0x1099,0x600,0x1188,0x1190,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x1198,0x11a0,0x4b5,
156770x600,0x11a8,0x11b0,0x11b8,0x600,0x11c8,0x11c0,0x4b5,0x870,0x11d0,0x11d8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156780x600,0x11e0,0x4b5,0x4b5,0x4b5,0x58d,0x535,0x11e8,0x11f8,0x11fe,0x11f0,0x4b5,0x4b5,0x120e,0x1212,0x1206,
156790x122a,0x121a,0x1222,0x600,0x1238,0x1232,0x600,0x8f7,0x1248,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156800x1256,0x125b,0x1240,0x1250,0x126b,0x1263,0x4b5,0x4b5,0x127a,0x127e,0x1272,0x128e,0x1286,0x11c0,0x4b5,0x4b5,
156810x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1292,0x12a2,0x12a7,0x129a,0x4b5,0x4b5,0x12af,0x12bf,0x12b7,
156820x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156830x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x4b5,0x4b5,0x4b5,
156840x12cf,0x12d7,0x12df,0x12c7,0x600,0x600,0x600,0x600,0x600,0x600,0x12e7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156850x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156860x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156870x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156880x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0xfdf,0x600,0x600,0x12ef,0x600,0x600,0x600,0x600,0x600,
156890x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156900x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x12f7,0x12ff,0x4b5,0x4b5,
156910x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156920x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,
156930x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
156940x11d8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,
156950x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x8f7,
156960x916,0xda4,0x600,0x916,0x1307,0x130c,0x600,0x131c,0x1324,0x132c,0x1314,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156970x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
156980x58d,0x535,0x1334,0x4b5,0x4b5,0x4b5,0x600,0x600,0x133c,0x1341,0x1347,0x4b5,0x4b5,0x134f,0x600,0x600,
156990x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157000x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157010x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157020x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1357,0x600,0x600,
157030x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157040x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157050x600,0x600,0x600,0x600,0x902,0x4b5,0x106d,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157060x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157070x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157080x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157090x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x135d,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157100x1365,0x136a,0x1371,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe10,0x4b5,
157110x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157120x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157130x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,0x600,0x1377,0x137c,0x1384,0x4b5,0x4b5,0x4b5,
157140x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157150x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157160x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157170x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x1394,0x139b,0x934,0x934,0x934,0x138c,0x4b5,0x934,0x934,0x934,
157180x934,0x934,0x934,0x934,0xbb7,0x934,0x13a2,0x934,0x13a9,0x13b1,0x13b7,0x934,0xade,0x934,0x934,0x13bf,
157190x4b5,0x4b5,0x4b5,0x13c7,0x13c7,0x934,0x934,0xadb,0x13cf,0x4b5,0x4b5,0x4b5,0x4b5,0x13df,0x13e6,0x13eb,
157200x13f1,0x13f9,0x1401,0x1409,0x13e3,0x1411,0x1419,0x1421,0x1426,0x13f8,0x13df,0x13e6,0x13e2,0x13f1,0x142e,0x13e0,
157210x1431,0x13e3,0x1439,0x1441,0x1449,0x1450,0x143c,0x1444,0x144c,0x1453,0x143f,0x145b,0x13d7,0x934,0x934,0x934,
157220x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x55c,0x146b,0x55c,
157230x1472,0x1479,0x1463,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157240x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157250x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1488,0x1490,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1480,0x1498,0x9d4,
157260x14a8,0x14a0,0x4b5,0x4b5,0x4b5,0x600,0x14b8,0x14b0,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157270x4b5,0xfdf,0x14c0,0x600,0x14c8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157280x4b5,0x4b5,0x4b5,0xfdf,0x14d0,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157290x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14d8,0x600,0x600,0x600,
157300x600,0x600,0x600,0x14e0,0x4b5,0x58d,0x14f0,0x14e8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157310x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157320x14f8,0x1508,0x1500,0x4b5,0x4b5,0x1518,0x1510,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1528,0x1530,0x1538,
157330x1540,0x1548,0x1550,0x4b5,0x1520,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x1558,0x934,
157340x934,0xbaf,0x13a0,0x1560,0xbb7,0x1568,0x934,0x934,0x934,0x934,0xbb9,0x4b5,0x1570,0x1578,0x157c,0x1584,
157350x158c,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x1594,0x934,0x934,0x934,
157360x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,
157370x934,0x934,0x934,0x157d,0x159c,0x934,0x934,0x934,0x15a4,0x934,0x934,0x15ab,0x15b3,0x1558,0x934,0x15bb,
157380x934,0x15c3,0x15c8,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xbaf,
157390x15d0,0x15d9,0x15dd,0x15e5,0x15d5,0x934,0x934,0x934,0x934,0x15ed,0x934,0xade,0x11bc,0x4b5,0x4b5,0x4b5,
157400x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157410x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x15f5,0x600,0x600,
157420x15fc,0x600,0x600,0x600,0x1604,0x600,0x160c,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157430x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157440x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157450x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc90,0x600,0x600,
157460x1614,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x161c,0x1624,0x600,0x600,0x600,
157470x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157480x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157490x600,0x600,0x600,0x600,0xccf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157500x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157510x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x162b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157520x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157530x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157540x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1632,0x600,0x600,0x600,
157550x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157560x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157570x600,0x600,0x600,0x600,0x1639,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157580x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157590x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157600x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x4b5,0x600,0x600,0x600,
157610x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157620x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157630x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157640x600,0x600,0x600,0x600,0x600,0x600,0x901,0x600,0x600,0x600,0x600,0x600,0x600,0xf69,0x600,0x600,
157650x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157660x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157670x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157680x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1641,0x600,0x600,
157690x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157700x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1649,0x4b5,0x4b5,
157710x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157720x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,
157730x600,0x600,0x1651,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xf69,0x4b5,
157740x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157750x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157760x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,
157770x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157780x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x67d,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157790x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,
157800x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1314,0x4b5,
157810x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157820x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157830x4b5,0x1661,0x1659,0x1659,0x1659,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,
157840x1669,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157850x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157860x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,
157870x4b5,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
157880xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
157890xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
157900xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,
157910x1671,0x494,0x494,0x494,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
157920xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
157930xf,0xf,0xf,0xf,0xc,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18,
157940x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,
157950x18,0x18,0x18,0x17,0x17,1,1,1,1,1,1,1,1,1,1,1,
157961,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x14,
157970x17,0x15,0x1a,0x16,0x1a,2,2,2,2,2,2,2,2,2,2,2,
157982,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x14,
157990x18,0x15,0x18,0xf,0,0,0,0,0,0,0,0,0,0,0,0,
158000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
158010,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
158020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
158030,0,0,0,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
158040xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,
158050xf,0xf,0xf,0xf,0xc,0x17,0x19,0x19,0x19,0x19,0x1b,0x17,0x1a,0x1b,5,0x1c,
158060x18,0x10,0x1b,0x1a,0x1b,0x18,0x34b,0x38b,0x1a,2,0x17,0x17,0x1a,0x30b,5,0x1d,
158070x34cb,0x344b,0x3ccb,0x17,1,1,1,1,1,1,1,1,1,1,1,1,
158081,1,1,1,1,1,1,1,1,1,1,0x18,1,1,1,1,
158091,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,
158102,2,2,2,2,2,2,2,2,2,2,0x18,2,2,2,2,
158112,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2,
158121,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158131,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158141,2,1,2,1,2,1,2,1,2,1,2,2,1,2,1,
158152,1,2,1,2,2,1,2,1,2,1,2,1,2,1,2,
158161,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158171,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158181,2,1,2,1,1,2,1,2,1,2,2,2,1,1,2,
158191,2,1,1,2,1,1,1,2,2,1,1,1,1,2,1,
158201,2,1,1,1,2,2,2,1,1,2,1,1,2,1,2,
158211,2,1,1,2,1,2,2,1,2,1,1,2,1,1,1,
158222,1,2,1,1,2,2,5,1,2,2,2,5,5,5,5,
158231,3,2,1,3,2,1,3,2,1,2,1,2,1,2,1,
158242,1,2,1,2,1,2,1,2,2,1,2,1,2,1,2,
158251,2,1,2,1,2,1,2,1,2,1,2,2,1,3,2,
158261,2,1,1,1,2,1,2,1,2,1,2,1,2,1,2,
158271,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158281,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158291,2,1,2,1,2,1,2,2,2,2,2,2,2,1,1,
158302,1,1,2,2,1,2,1,1,1,1,2,1,2,1,2,
158311,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,
158322,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
158332,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
158342,2,2,2,5,2,2,2,2,2,2,2,2,2,2,2,
158352,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
158364,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
158374,4,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4,4,
158384,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
158394,4,4,4,4,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,0x1a,4,0x1a,
158400x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
158416,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158426,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158436,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158446,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158451,2,1,2,4,0x1a,1,2,0,0,4,2,2,2,0x17,1,
158460,0,0,0,0x1a,0x1a,1,0x17,1,1,1,0,1,0,1,1,
158472,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
158481,1,0,1,1,1,1,1,1,1,1,1,2,2,2,2,
158492,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
158502,2,2,1,2,2,1,1,1,2,2,2,1,2,1,2,
158511,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158521,2,1,2,2,2,2,2,1,2,0x18,1,2,1,1,2,
158532,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
158541,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
158551,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
158561,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
158572,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
158582,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2,
158591,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158601,2,1,2,1,2,0x1b,6,6,6,6,6,7,7,1,2,
158611,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158621,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158631,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158641,2,1,2,1,1,2,1,2,1,2,1,2,1,2,1,
158652,1,2,2,1,2,1,2,1,2,1,2,1,2,1,2,
158661,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158671,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
158681,2,1,2,0,1,1,1,1,1,1,1,1,1,1,1,
158691,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
158700,4,0x17,0x17,0x17,0x17,0x17,0x17,2,2,2,2,2,2,2,2,
158712,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
158722,2,2,2,2,2,2,2,2,0x17,0x13,0,0,0x1b,0x1b,0x19,
158730,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158746,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158756,6,6,6,6,6,6,6,6,6,6,6,6,6,0x13,6,
158760x17,6,6,0x17,6,6,0x17,6,0,0,0,0,0,0,0,0,
158775,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158785,5,5,5,5,5,5,5,5,5,5,0,0,0,0,5,
158795,5,5,0x17,0x17,0,0,0,0,0,0,0,0,0,0,0,
158800x10,0x10,0x10,0x10,0x10,0x10,0x18,0x18,0x18,0x17,0x17,0x19,0x17,0x17,0x1b,0x1b,
158816,6,6,6,6,6,6,6,6,6,6,0x17,0x10,0x17,0x17,0x17,
158825,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158835,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158844,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,
158856,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158860x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,5,5,
158876,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158885,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158895,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158905,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158915,5,5,5,0x17,5,6,6,6,6,6,6,6,0x10,0x1b,6,
158926,6,6,6,6,4,4,6,6,0x1b,6,6,6,6,5,5,
158930x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,0x1b,0x1b,5,
158940x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0x10,
158955,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158965,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
158976,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
158986,6,6,0,0,5,5,5,5,5,5,5,5,5,5,5,
158995,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
159005,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
159015,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,
159026,6,6,6,6,5,0,0,0,0,0,0,0,0,0,0,
159030,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,
159045,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
159055,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,
159066,6,6,6,6,6,6,6,4,4,0x1b,0x17,0x17,0x17,4,0,
159070,6,0x19,0x19,6,6,6,6,4,6,6,6,4,6,6,6,
159086,6,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
159090x17,0x17,0x17,0,5,5,5,5,5,5,5,5,5,5,5,5,
159105,5,5,5,5,5,5,5,5,5,6,6,6,6,4,6,
159116,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,
159125,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,
159130,0,0x17,0,5,5,5,5,5,5,5,5,5,5,5,0,
159140,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
159155,5,5,5,0x1a,5,5,5,5,5,5,0,0x10,0x10,0,0,
159160,0,0,0,6,6,6,6,6,6,6,6,6,6,0x10,6,
159176,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
159186,6,6,6,6,6,6,6,6,6,6,6,5,5,5,5,
159195,5,5,5,5,4,6,6,6,6,6,6,6,6,6,6,
159206,6,6,6,6,6,6,6,6,6,6,6,5,5,6,6,
159210x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,4,5,5,
159225,5,5,5,5,5,5,5,5,5,5,5,6,6,6,8,
159235,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
159245,5,5,5,5,5,5,5,5,5,5,5,5,5,6,8,
159256,5,8,8,8,6,6,6,6,6,6,6,6,8,8,8,
159268,6,8,8,5,6,6,6,6,6,6,6,5,5,5,5,
159275,5,5,5,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
159280x1c9,0x209,0x249,0x289,5,5,0x19,0x19,0x37cb,0x35cb,0x3fcb,0x34cb,0x3ccb,0x94b,0x1b,0x19,
159295,0x17,6,0,5,6,8,8,0,5,5,5,5,5,5,5,
159305,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5,
159315,5,5,5,5,0,5,5,5,5,5,5,5,0,5,0,
159320,0,5,5,5,5,0,0,6,5,8,8,8,6,6,6,
159336,0,0,8,8,0,0,8,8,6,5,0,0,0,0,0,
159340,0,0,8,0,0,0,0,5,5,0,5,0,0,0,0,
159350,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,6,6,5,5,
159365,6,0x17,0,0,0,0,0,0,0,0,0,0,6,6,8,
159370,5,5,5,5,5,5,0,0,0,0,5,5,0,0,5,
159385,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,
159395,5,5,5,5,0,5,5,0,5,5,0,5,5,0,0,
159406,0,8,8,8,6,6,0,0,0,0,6,6,0,0,6,
159416,6,0,0,0,6,0,0,0,0,0,0,0,5,5,5,
159425,0,5,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
159430x1c9,0x209,0x249,0x289,0x17,0x19,0,0,0,0,0,0,0,5,6,6,
159446,6,6,6,0,6,6,8,0,5,5,5,5,5,5,5,
159455,5,0,5,5,5,0,5,5,5,5,5,5,5,5,5,
159465,5,5,5,5,0,5,5,5,5,5,5,5,0,5,5,
159470,5,5,5,5,5,0,0,6,5,8,8,8,6,6,6,
159486,6,0,6,6,8,0,8,8,6,0,0,5,0,0,0,
159490,0,0,0,0,0,0,0,0,0,0,0,5,5,6,6,
159500,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x1b,5,0x34cb,0x344b,
159510x3ccb,0x37cb,0x35cb,0x3fcb,0,0,0,0,0,0,0,0,0,6,8,8,
159520,5,5,5,5,5,5,5,5,0,0,5,5,0,0,5,
159535,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,
159545,5,5,5,5,0,5,5,0,5,5,5,5,5,0,0,
159556,5,8,6,8,6,6,6,6,0,0,8,8,0,0,8,
159568,6,0,0,0,0,0,0,0,6,6,8,0,0,0,0,
159575,5,0,5,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
159580x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x1b,0,
159590,0,0,0,0,0,6,5,0,5,5,5,5,5,5,0,
159600,0,5,5,5,0,5,5,5,5,0,0,0,5,5,0,
159615,0,5,5,0,0,0,5,5,0,0,0,5,5,5,0,
159620,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,
159630,0,8,8,6,8,8,0,0,0,8,8,8,0,8,8,
159648,6,0,0,5,0,0,0,0,0,0,8,0,0,0,0,
159650,0,0,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
159660x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0x17,0x54b,0x58b,0x5cb,0x60b,
159670x58b,0x5cb,0x60b,0x1b,6,8,8,8,6,5,5,5,5,5,5,5,
159685,0,5,5,5,0,5,5,5,5,5,5,5,5,5,5,
159695,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,
159705,5,5,5,5,5,0,0,6,5,6,6,6,8,8,8,
159718,0,6,6,6,0,6,6,6,6,0,0,0,0,0,0,
159720,6,6,0,5,5,5,0,0,5,0,0,5,5,6,6,
159730,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,5,5,8,
159740,0,0,0,0,0,0,0,0,0,0,0,5,6,8,8,
159750x17,5,5,5,5,5,5,5,5,0,5,5,5,0,5,5,
159765,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,
159775,5,5,5,5,5,5,5,0,5,5,5,5,5,0,0,
159786,5,8,6,8,8,8,8,8,0,6,8,8,0,8,8,
159796,6,0,0,0,0,0,0,0,8,8,0,0,0,0,0,
159800,5,5,0,5,5,6,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
159810x1c9,0x209,0x249,0x289,0x7cb,0x1e4b,0x784b,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,5,5,
159825,5,5,5,6,6,8,8,5,5,5,5,5,5,5,5,
159835,0,5,5,5,0,5,5,5,5,5,5,5,5,5,5,
159845,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
159855,5,5,6,6,5,8,8,8,6,6,6,6,0,8,8,
159868,0,8,8,8,6,5,0x1b,0,0,0,0,5,5,5,8,
159870xcc0b,0xca0b,0xcb4b,0xc90b,0x364b,0xc94b,0x350b,5,0,0,0,0,0,0,0x49,0x89,
159880xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,8,8,0x17,0,0,0,
159890,0,0,0,0,0,0,0,0,6,8,8,0,5,5,5,
159905,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
159910,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
159925,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,
159930,5,0,0,5,5,5,5,5,5,5,0,0,0,6,0,
159940,0,0,8,8,8,6,6,6,0,6,0,8,8,8,8,
159958,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5,
159965,5,5,5,5,6,5,5,6,6,6,6,6,6,6,0,
159970,0,0,0x19,5,5,5,5,5,5,4,6,6,6,6,6,
159986,6,6,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,
159990,0,0,0,0,5,5,0,5,0,5,5,5,5,5,0,
160005,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160015,5,5,5,0,5,0,5,5,5,5,5,5,5,5,5,
160025,6,5,5,6,6,6,6,6,6,6,6,6,5,0,0,
160035,5,5,5,5,0,4,0,6,6,6,6,6,6,6,0,
160040x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,5,5,5,5,
160055,0x1b,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
160060x17,0x17,0x17,0x1b,0x17,0x1b,0x1b,0x1b,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
160070x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x344b,0x3c4b,0x444b,0x4c4b,0x544b,0x5c4b,
160080x644b,0x6c4b,0x744b,0x2c4b,0x1b,6,0x1b,6,0x1b,6,0x14,0x15,0x14,0x15,8,8,
160095,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,
160105,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160115,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,
160126,6,6,8,6,6,6,6,6,0x17,6,6,5,5,5,5,
160135,6,6,6,6,6,6,6,6,6,6,6,0,6,6,6,
160146,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
160156,6,6,6,6,6,6,6,6,6,6,6,6,0,0x1b,0x1b,
160160x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,
160170x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0,0,0,0,0,
160185,5,5,5,5,5,5,5,5,5,5,8,8,6,6,6,
160196,8,6,6,6,6,6,6,8,6,6,8,8,6,6,5,
160200x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,
160215,5,5,5,5,5,8,8,6,6,5,5,5,5,6,6,
160226,5,8,8,8,5,5,8,8,8,8,8,8,8,5,5,
160235,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,
160245,5,6,8,8,6,6,8,8,8,8,8,8,6,5,8,
160250x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,8,8,8,6,0x1b,0x1b,
160262,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
160272,2,2,2,2,2,2,2,2,2,2,0x17,4,2,2,2,
160281,1,1,1,1,1,0,1,0,0,0,0,0,1,0,0,
160292,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
160305,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0,
160315,5,5,5,5,5,5,0,5,0,5,5,5,5,0,0,
160325,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0,
160335,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160345,0,5,5,5,5,0,0,5,5,5,5,5,5,5,0,
160355,0,5,5,5,5,0,0,5,5,5,5,5,5,5,5,
160365,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,
160375,5,5,5,5,5,5,5,5,0,5,5,5,5,0,0,
160385,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160395,5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,
160400x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,
160410x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x788b,0,0,0,
160425,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160430x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,
160441,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
160451,1,1,1,1,1,0,0,2,2,2,2,2,2,0,0,
160460x13,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160475,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160485,0x1b,0x17,5,5,5,5,5,5,5,5,5,5,5,5,5,
160495,5,5,5,0xc,5,5,5,5,5,5,5,5,5,5,5,
160505,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x14,
160510x15,0,0,0,5,5,5,5,5,5,5,5,5,5,5,0x17,
160520x17,0x17,0x98a,0x9ca,0xa0a,5,5,5,5,5,5,5,5,0,0,0,
160530,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
160545,5,5,5,5,5,6,6,6,8,0,0,0,0,0,0,
160550,0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,
160565,5,5,5,5,5,6,6,8,0x17,0x17,0,0,0,0,0,
160570,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
160585,5,5,5,5,5,6,6,0,0,0,0,0,0,0,0,
160590,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
160605,0,5,5,5,0,6,6,0,0,0,0,0,0,0,0,
160610,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
160625,5,5,5,5,5,5,5,6,6,8,6,6,6,6,6,
160636,6,8,8,8,8,8,8,8,8,6,8,8,6,6,6,
160646,6,6,6,6,6,6,6,0x17,0x17,0x17,4,0x17,0x17,0x17,0x19,
160655,6,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
160660,0,0,0,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0,0,
160670,0,0,0,5,5,5,5,5,5,5,5,5,6,5,0,
160680,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
160695,5,5,5,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x17,0x17,6,
160706,6,0x10,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
160710,0,0,0,5,5,5,4,5,5,5,5,5,5,5,5,
160725,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160735,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5,
160745,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,
160755,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,
160760,0,0,0,0,0,0,0,6,6,6,8,8,8,8,6,
160776,8,8,8,0,0,0,0,8,8,6,8,8,8,8,8,
160788,6,6,6,0,0,0,0,0x1b,0,0,0,0x17,0x17,0x49,0x89,
160790xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,5,5,
160805,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160815,5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,
160825,5,5,5,5,5,0,0,5,5,5,5,5,0,0,0,
160830,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
160845,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,
160855,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,
160860x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x30b,0,0,0,0x1b,0x1b,
160870x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
160880x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
160895,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160905,5,5,5,5,5,5,6,6,8,8,6,0,0,0x17,0x17,
160910x17,0x17,0x17,0x17,0x17,0x17,0x17,4,0x17,0x17,0x17,0x17,0x17,0x17,0,0,
160926,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,
160935,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
160945,5,5,5,5,8,6,8,6,6,6,6,6,6,6,0,
160956,8,6,8,8,6,6,6,6,6,6,6,6,8,8,8,
160968,8,8,6,6,6,6,6,6,6,6,6,6,0,0,6,
160970x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
160980x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
160990x17,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6,
161006,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0,
161016,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,
161020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
161036,6,6,6,8,5,5,5,5,5,5,5,5,5,5,5,
161045,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
161056,8,6,6,6,6,6,8,6,8,8,8,8,8,6,8,
161068,5,5,5,5,5,5,5,5,0,0,0,0x49,0x89,0xc9,0x109,
161070x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,0x17,0x17,5,8,6,6,
161086,6,8,8,6,6,8,6,6,6,5,5,0x49,0x89,0xc9,0x109,
161090x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,5,6,6,8,5,
161105,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
161115,5,5,5,5,5,5,5,5,5,5,5,5,5,6,8,
161126,6,8,8,8,6,8,6,6,6,8,8,0,0,0,0,
161130,0,0,0,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
161140x249,0x289,0,0,0,5,5,5,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
161150x249,0x289,5,5,5,5,5,5,8,8,8,8,8,8,8,8,
161166,6,6,6,6,6,6,6,8,8,6,6,0,0,0,0x17,
161170x17,0x17,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5,
161185,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4,
161194,4,0x17,0x17,2,2,2,2,2,2,2,2,2,0,0,0,
161200,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,
161211,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
161220,1,1,1,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,
161230,0,0,0,6,6,6,0x17,6,6,6,6,6,6,6,6,
161246,6,6,6,6,8,6,6,6,6,6,6,6,5,5,5,
161255,6,5,5,5,5,5,5,6,5,5,8,6,6,5,0,
161260,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,
161274,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
161284,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
161294,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,
161304,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
161312,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4,
161324,4,4,4,1,2,1,2,1,2,1,2,1,2,1,2,
161331,2,1,2,1,2,1,2,1,2,2,2,2,2,2,2,
161342,2,1,2,2,2,2,2,2,2,2,2,1,1,1,1,
161351,0x1a,0x1a,0x1a,0,0,2,2,2,0,2,2,1,1,1,1,
161363,0x1a,0x1a,0,2,2,2,2,2,2,2,2,1,1,1,1,
161371,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1,
161381,1,0,0,2,2,2,2,2,2,2,2,1,1,1,1,
161391,1,1,1,2,2,2,2,2,2,2,2,1,1,1,1,
161401,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1,
161411,1,0,0,2,2,2,2,2,2,2,2,0,1,0,1,
161420,1,0,1,2,2,2,2,2,2,2,2,1,1,1,1,
161431,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
161442,2,0,0,2,2,2,2,2,2,2,2,3,3,3,3,
161453,3,3,3,2,2,2,2,2,2,2,2,3,3,3,3,
161463,3,3,3,2,2,2,2,2,0,2,2,1,1,1,1,
161473,0x1a,2,0x1a,0x1a,0x1a,2,2,2,0,2,2,1,1,1,1,
161483,0x1a,0x1a,0x1a,2,2,2,2,0,0,2,2,1,1,1,1,
161490,0x1a,0x1a,0x1a,0x16,0x17,0x17,0x17,0x18,0x14,0x15,0x17,0x17,0x17,0x17,0x17,
161500x17,0x17,0x17,0x17,0x17,0x17,0x18,0x17,0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
161510x17,0x17,0x17,0xc,0x10,0x10,0x10,0x10,0x10,0,0x10,0x10,0x10,0x10,0x10,0x10,
161520x10,0x10,0x10,0x10,0x2cb,4,0,0,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,
161530x18,0x14,0x15,4,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0xc,0x10,
161540x10,0x10,0x10,0x10,0x13,0x13,0x13,0x13,0x13,0x13,0x17,0x17,0x1c,0x1d,0x14,0x1c,
161550x1c,0x1d,0x14,0x1c,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0xd,0xe,0x10,0x10,
161560x10,0x10,0x10,0xc,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1c,0x1d,0x17,
161570x17,0x17,0x17,0x16,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x18,0x18,
161580x18,0x14,0x15,0,4,4,4,4,4,4,4,4,4,4,4,4,
161594,0,0,0,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
161600x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
161610x19,0x19,0x19,0x19,0x19,0,0,0,0,0,0,0,0,0,0,0,
161620,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,
161636,7,7,7,7,6,7,7,7,6,6,6,6,6,6,6,
161646,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,
161650,0,0,0,0x1b,0x1b,0x1b,0x1b,1,0x1b,1,0x1b,1,0x1b,1,1,
161661,1,0x1b,2,1,1,1,1,2,5,5,5,5,2,0x1b,0x1b,
161672,2,1,1,0x18,0x18,0x18,0x18,0x18,1,2,2,2,2,0x1b,0x18,
161680x1b,0x1b,2,0x1b,0x358b,0x360b,0x364b,0x348b,0x388b,0x350b,0x390b,0x3d0b,0x410b,0x354b,0x454b,0x35cb,
161690x3dcb,0x45cb,0x4dcb,0x58b,0x1b,0x1b,1,0x1b,0x1b,0x1b,0x1b,1,0x1b,0x1b,2,1,
161701,1,2,2,1,1,1,2,0x1b,1,0x1b,0x1b,0x18,1,1,1,
161711,1,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,
161720x11ca,0x1e4a,0x980a,0x784a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x7ca,0x80a,0x84a,
161730x11ca,0x1e4a,0x980a,0x784a,0x784a,0x984a,0x788a,1,2,0x6ca,0x11ca,0x988a,0x78ca,0x54b,0x1b,0x1b,
161740,0,0,0,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,
161750x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161760x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
161770x18,0x1b,0x1b,0x18,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,
161780x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161790x1b,0x1b,0x18,0x18,0x1b,0x1b,0x18,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161800x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
161810x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
161820x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,
161830x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161840x1b,0x1b,0x1b,0x1b,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x1b,
161850x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161860x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,
161870x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161880x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,
161890x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
161900x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161910x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,
161920x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161930x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
161940x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,
161950,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
161960x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,
161970xa4b,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,
161980x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0xa4b,
161990x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,
162000x98b,0x9cb,0xa0b,0xa4b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162010x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,
162020x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162030x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,
162040x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162050x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162060x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162070x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,
162080x14,0x15,0x14,0x15,0x14,0x15,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,
162090x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,
162100x48b,0x4cb,0x50b,0x7cb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162110x18,0x18,0x18,0x18,0x18,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162120x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162130x18,0x18,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,
162140x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x14,
162150x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,
162160x15,0x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162170x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162180x14,0x15,0x14,0x15,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162190x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162200x14,0x15,0x18,0x18,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162210x1b,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
162220x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x1b,
162230x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162240x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162250x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,
162260x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,1,2,1,1,1,2,2,1,
162272,1,2,1,2,1,1,1,1,2,1,2,2,1,2,2,
162282,2,2,2,4,4,1,1,1,2,1,2,2,0x1b,0x1b,0x1b,
162290x1b,0x1b,0x1b,1,2,1,2,6,6,6,1,2,0,0,0,0,
162300,0x17,0x17,0x17,0x17,0x344b,0x17,0x17,2,2,2,2,2,2,0,2,
162310,0,0,0,0,2,0,0,5,5,5,5,5,5,5,5,
162325,5,5,5,5,5,5,5,0,0,0,0,0,0,0,4,
162330x17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,
162345,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0,
162355,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0,
162365,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162375,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,
162380x17,0x17,0x1c,0x1d,0x1c,0x1d,0x17,0x17,0x17,0x1c,0x1d,0x17,0x1c,0x1d,0x17,0x17,
162390x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x17,0x17,0x13,0x17,0x1c,0x1d,0x17,0x17,
162400x1c,0x1d,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x17,0x17,4,
162410x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x13,0x13,0x17,0x17,0x17,0x17,
162420x13,0x17,0x14,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
162430x1b,0x1b,0x17,0x17,0x17,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x13,0,0,
162440x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162450x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,
162460x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162470,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
162480x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162490x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
162500,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162510,0,0,0,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,6,6,
162526,6,8,8,0x13,4,4,4,4,4,0x1b,0x1b,0x7ca,0xa4a,0xcca,4,
162535,0x17,0x1b,0x1b,0xc,0x17,0x17,0x17,0x1b,4,5,0x54a,0x14,0x15,0x14,0x15,
162540x14,0x15,0x14,0x15,0x14,0x15,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,
162550x13,0x14,0x15,0x15,5,5,5,5,5,5,5,5,5,5,5,5,
162565,5,5,5,5,5,5,5,5,5,5,0,0,6,6,0x1a,
162570x1a,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,
162585,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x17,
162594,4,4,5,0,0,0,0,0,5,5,5,5,5,5,5,
162605,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162615,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,
162625,5,5,5,5,5,5,0,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x1b,0x1b,
162630x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,
162640,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
162655,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x1b,0x1b,
162660x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
162670x1b,0x1b,0x1b,0x1b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1b,0xa8b,0xacb,0xb0b,
162680xb4b,0xb8b,0xbcb,0xc0b,0xc4b,0xc8b,0xccb,0xd0b,0xd4b,0xd8b,0xdcb,0xe0b,0x1b,0x1b,0x1b,0x1b,
162690x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0xe4b,0xe8b,0xecb,
162700xf0b,0xf4b,0xf8b,0xfcb,0x100b,0x104b,0x108b,0x10cb,0x110b,0x114b,0x118b,0x11cb,5,5,5,5,
162715,0x685,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162725,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x5c5,
162735,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162745,5,5,5,5,5,5,5,5,5,5,5,5,5,0x685,5,
162755,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162765,5,5,5,5,0x705,5,5,5,5,5,5,5,5,5,5,
162775,5,5,5,5,5,5,5,0x585,5,5,0x705,5,5,5,0x7885,
162785,0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162795,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162805,0x785,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162810x5c5,5,5,5,5,5,5,5,0x685,5,0x645,5,5,5,5,5,
162825,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162835,5,5,5,5,5,5,5,5,5,5,0x7985,0x7c5,5,5,5,
162845,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162855,5,5,5,5,5,5,5,5,5,5,0x7845,5,5,5,5,
162865,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5,
162875,5,5,5,5,5,5,5,5,5,5,5,5,0x685,5,5,
162885,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162890x1e45,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162900x7985,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162915,5,5,5,5,5,5,5,5,5,5,5,5,5,0x7a85,5,
162925,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162935,5,5,5,5,5,5,5,5,0x5c5,5,0x745,5,0x6c5,5,5,
162945,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162955,0x7c5,5,0x7845,0xa45,0xcc5,5,5,5,5,5,5,0xf45,5,5,5,
162965,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162975,0x605,0x605,0x605,0x605,5,5,5,5,5,5,5,5,5,5,5,
162985,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
162995,5,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,
163005,5,5,5,5,0x585,5,5,5,5,5,5,5,0x585,5,5,
163015,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163025,5,5,5,5,5,5,5,5,5,0x585,5,5,5,5,5,
163035,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163045,5,5,5,5,5,5,5,5,5,0x785,0xa45,5,5,5,5,
163055,5,5,5,5,5,5,5,0x585,0x5c5,0x605,5,0x5c5,5,5,5,
163065,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163075,5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5,
163085,5,5,5,5,5,5,5,5,5,5,5,0x745,5,5,5,
163095,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163105,5,0x705,5,5,5,5,5,5,5,5,5,5,5,5,5,
163115,5,5,5,5,5,5,5,5,5,5,5,5,5,0x785,5,
163125,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163135,5,5,5,5,5,5,5,5,5,5,5,5,5,0x1e45,5,
163145,5,5,5,5,5,0x645,5,5,5,5,5,5,5,5,5,
163155,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163160x7885,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163175,5,5,5,5,5,0x5c5,5,5,5,5,0x5c5,5,5,5,5,
163185,5,5,5,5,5,5,5,5,5,5,5,0x5c5,5,5,5,
163195,5,5,5,5,5,5,5,5,5,5,5,5,0x7845,5,5,
163205,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163215,5,5,5,5,5,5,5,5,5,5,5,5,5,0x6c5,5,
163225,5,5,5,0x1e45,5,5,5,5,5,5,5,5,5,5,5,
163235,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163240x6c5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163255,5,5,5,5,5,5,5,5,5,0x545,5,5,5,5,5,
163265,5,5,5,5,5,5,5,5,0,0,0,0x1b,0x1b,0x1b,0x1b,
163270x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,5,5,5,5,
163285,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163295,4,5,5,5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b,
163300x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,5,5,5,5,
163315,5,5,5,5,5,5,5,5,5,5,5,4,0x17,0x17,0x17,
163325,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163330x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,0,0,0,0,
163340,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
163351,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
163361,2,1,2,1,2,1,2,1,2,1,2,4,4,6,6,
163371,2,1,2,1,2,1,2,1,2,1,2,1,2,5,6,
163387,7,7,0x17,6,6,6,6,6,6,6,6,6,6,0x17,4,
163395,5,5,5,5,5,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x54a,
163406,6,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,
163410x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
163420x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4,
163430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
163440,0,4,4,4,1,2,5,4,4,2,5,5,5,5,5,
163450x1a,0x1a,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
163462,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
163471,2,1,2,4,2,2,2,2,2,2,2,2,1,2,1,
163482,1,1,2,1,2,1,2,1,2,1,2,4,0x1a,0x1a,1,
163492,1,2,5,1,2,1,2,2,2,1,2,1,2,1,2,
163501,2,1,2,1,2,1,1,1,1,1,2,1,1,1,1,
163511,2,1,2,1,2,1,2,1,2,1,2,1,1,1,1,
163522,1,2,0,0,0,0,0,1,2,0,2,0,2,1,2,
163531,2,0,0,0,0,0,0,5,5,6,5,5,5,6,5,
163545,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5,
163555,5,5,5,5,5,5,5,5,5,5,8,8,6,6,8,
163560x1b,0x1b,0x1b,0x1b,6,0,0,0,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,0x1b,
163570x19,0x1b,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
163585,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x17,
163590,0,0,0,0,0,0,0,8,8,8,8,6,6,0,0,
163600,0,0,0,0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
163610x249,0x289,0,0,0,0,0,0,8,8,5,5,5,5,5,5,
163625,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163635,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8,
163648,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,
163656,6,6,6,6,6,5,5,5,5,5,5,0x17,0x17,0x17,5,
163660x17,5,5,6,5,5,5,5,5,5,6,6,6,6,6,6,
163676,6,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5,
163685,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,
163696,6,8,8,0,0,0,0,0,0,0,0,0,0,0,0x17,
163708,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,4,
163710x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,
163725,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163735,5,5,6,8,8,6,6,6,6,8,8,6,6,8,8,
163745,5,5,5,5,6,4,5,5,5,5,5,5,5,5,5,
163750x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,0,
163765,5,5,5,5,5,5,5,5,6,6,6,6,6,6,8,
163778,6,6,8,8,6,6,0,0,0,0,0,0,0,0,0,
163785,5,5,6,5,5,5,5,5,5,5,5,6,8,0,0,
163790x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0x17,0x17,0x17,0x17,
163805,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163814,5,5,5,5,5,5,0x1b,0x1b,0x1b,5,8,6,8,5,5,
163825,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163836,5,6,6,6,5,5,6,6,5,5,5,5,5,6,6,
163845,6,5,0,0,0,0,0,0,0,0,0,0,0,0,0,
163850,0,0,0,0,0,0,0,0,0,0,5,5,4,0x17,0x17,
163865,5,5,5,5,5,5,5,5,5,5,8,6,6,8,8,
163870x17,0x17,5,4,4,8,6,0,0,0,0,0,0,0,0,0,
163880,5,5,5,5,5,5,0,0,5,5,5,5,5,5,0,
163890,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,
163905,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0,
163912,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
163922,2,2,2,2,2,2,2,2,2,2,0x1a,4,4,4,4,
163932,2,2,2,2,2,2,2,2,4,0x1a,0x1a,0,0,0,0,
163942,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
163955,5,5,8,8,6,8,8,6,8,8,0x17,8,6,0,0,
163960x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
163975,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,
163985,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
163995,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,
164005,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5,
164015,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164020x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
164030x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
164040x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
164050x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
164065,5,5,5,5,5,5,5,5,5,5,0x605,5,5,5,5,
164075,5,5,0x7c5,5,5,5,5,0x5c5,5,5,5,5,5,5,5,
164085,5,5,5,5,5,5,5,5,5,5,5,5,0x6c5,5,0x6c5,
164095,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164105,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5,5,
164115,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,
164125,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164135,0x18,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
164145,5,5,5,5,0,5,0,5,5,0,5,5,0,5,5,
164155,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164165,5,5,5,5,5,5,5,2,2,2,2,2,2,2,0,
164170,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,
164180,0,0,0,0,5,6,5,5,5,5,5,5,5,5,5,
164195,5,5,5,5,5,5,5,5,5,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
164200x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0,0,0,0,0,
164210,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,
164225,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164235,5,5,5,5,5,5,5,5,5,0x15,0x14,5,5,5,5,
164245,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5,
164255,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,
164260,0,0,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,
164270,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
164280x19,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,6,6,6,
164296,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x14,0x15,0x17,0,0,
164300,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,
164316,6,6,6,0x17,0x13,0x13,0x16,0x16,0x14,0x15,0x14,0x15,0x14,0x15,0x14,
164320x15,0x14,0x15,0x14,0x15,0x17,0x17,0x14,0x15,0x17,0x17,0x17,0x17,0x16,0x16,0x16,
164330x17,0x17,0x17,0,0x17,0x17,0x17,0x17,0x13,0x14,0x15,0x14,0x15,0x14,0x15,0x17,
164340x17,0x17,0x18,0x13,0x18,0x18,0x18,0,0x17,0x19,0x17,0x17,0,0,0,0,
164355,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,
164365,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164375,5,5,5,5,0,0,0x10,0,0,5,5,5,5,5,5,
164380,0,5,5,5,5,5,5,0,0,5,5,5,5,5,5,
164390,0,5,5,5,0,0,0,0x19,0x19,0x18,0x1a,0x1b,0x19,0x19,0,
164400x1b,0x18,0x18,0x18,0x18,0x1b,0x1b,0,0,0,0,0,0,0,0,0,
164410,0x10,0x10,0x10,0x1b,0x1b,0,0,0,0x17,0x17,0x17,0x19,0x17,0x17,0x17,
164420x14,0x15,0x17,0x18,0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
164430x249,0x289,0x17,0x17,0x18,0x18,0x18,0x17,0x1a,2,2,2,2,2,2,2,
164442,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
164452,2,2,0x14,0x18,0x15,0x18,0x14,0x15,0x17,0x14,0x15,0x17,0x17,5,5,
164465,5,5,5,5,5,5,5,4,5,5,5,5,5,5,5,
164475,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164485,5,5,5,5,5,5,5,5,5,4,4,5,5,5,5,
164495,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,
164505,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
164515,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164525,5,5,0,5,5,0,5,5,5,5,5,5,5,5,5,
164535,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5,
164545,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5,
164555,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164565,5,5,0,0,0,0,0,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,
164570xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0,0,0,0x1b,
164580x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0x17,0,0,0,0,0x58b,
164590x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,
164600x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0xcca,0x11ca,0x11ca,
164610x11ca,0x11ca,0x1e4a,0x880a,0x980a,0x980a,0x980a,0x980a,0x980a,0x784a,0x984a,0x68a,0x11ca,0x344b,0x344b,0x388b,
164620x3ccb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x54b,0x34cb,
164630x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
164640x1b,0,0,0,0x34ca,0x344a,0x58a,0x68a,0x11ca,0x980a,0x984a,0x988a,0x68a,0x7ca,0x11ca,0x1e4a,
164650x980a,0x784a,0x984a,0x68a,0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x788a,0x988a,0x7ca,0x58a,0x58a,0x58a,0x5ca,
164660x5ca,0x5ca,0x5ca,0x68a,0x1b,0,0,0,0,0,0,0,0,0,0,0,
164670,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
164680,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
164690x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
164700x1b,6,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
164715,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,
164720,0,0,0,6,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,
164730xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,
164740,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0,0,0,0,0,0,0,0,
164750,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164765,5,5,5,5,0x1bca,5,5,5,5,5,5,5,5,0xb80a,0,
164770,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
164785,5,5,5,5,5,5,5,5,5,6,6,6,6,6,0,
164790,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
164805,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164815,5,0,0x17,5,5,5,5,0,0,0,0,5,5,5,5,
164825,5,5,5,0x17,0x58a,0x5ca,0x7ca,0xa4a,0x1e4a,0,0,0,0,0,0,
164830,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,
164842,2,2,2,5,5,5,5,5,5,5,5,5,5,5,5,
164855,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
164865,5,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
164870,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,
164881,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,
164892,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
164900,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,
164911,1,1,1,1,1,1,1,0,0,0,0,2,2,2,2,
164922,2,2,2,5,5,5,5,5,5,5,5,0,0,0,0,
164930,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
164945,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0x17,
164951,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,
164962,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,
164972,2,0,2,2,2,2,2,2,2,0,2,2,0,0,0,
164981,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,
164991,1,1,0,1,1,0,2,2,2,2,2,2,2,2,2,
165005,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,
165010,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
165024,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
165034,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,
165044,4,4,4,4,4,0,4,4,4,4,4,4,4,4,4,
165054,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
165065,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165075,5,5,5,5,5,0,5,5,0,0,0,5,0,0,5,
165085,5,5,5,5,5,0,0,5,0,5,5,5,5,5,5,
165095,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165105,5,0,0x17,0x58b,0x5cb,0x60b,0x7cb,0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5,
165115,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165125,5,5,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0,0,0,0,
165130,0,0,0x58b,0x5cb,0x60b,0x64b,0x64b,0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0,
165140,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
165155,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
165165,5,0,0,0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5,
165175,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165185,5,0x58b,0x7cb,0xa4b,0x1e4b,0x5cb,0x60b,0,0,0,0x17,5,5,5,5,
165195,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165205,5,5,5,5,5,0,0,0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b,
165210x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb,
165220xb0cb,0xb8cb,0x36cb,0x354b,0x34cb,0x348b,0x46cb,0x344b,0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5,
165235,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165245,5,5,5,0,0,0,0,0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b,
165250x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b,
165260x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb,
165270x7cb,0xa4b,0x1e4b,0x784b,0x344b,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,
165280x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,5,6,6,6,
165290,6,6,0,0,0,0,0,6,6,6,6,5,5,5,5,
165300,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,
165315,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,
165326,6,6,0,0,0,0,6,5,5,5,5,5,5,5,5,
165335,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165345,5,5,5,5,0x58b,0x11cb,0x17,5,5,5,5,5,5,5,5,
165355,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165365,5,5,5,5,0x58b,0x7cb,0xa4b,5,5,5,5,5,6,6,0,
165370,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,
165380,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
165390x1b,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165405,5,5,5,5,5,5,5,5,5,0,0,0,0x17,0x17,0x17,
165410x17,0x17,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5,
165425,5,5,5,5,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,
165430x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5,5,5,5,5,5,5,5,5,
165445,5,5,5,5,5,5,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,
165450x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5,5,5,5,5,5,5,5,5,
165465,5,5,5,5,5,0,0,0,0,0,0,0,0x17,0x17,0x17,
165470x17,0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,
165480x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0,0,0,0,0,
165490,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0,
165500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
165510,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,
165521,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,
165530,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,
165542,2,2,2,2,2,2,0,0,0,0,0,0,0,0x58b,0x68b,
165550x7cb,0x11cb,0x1e4b,0x784b,5,5,5,5,6,6,6,6,0,0,0,0,
165560,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,
165570,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,
165580xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x344b,
165590x34cb,0x348b,0x388b,0,5,5,5,5,5,5,5,5,5,5,0,6,
165606,0x13,0,0,5,5,0,0,0,0,0,0,0,0,0,0,
165610,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
165620,0,0,0,0,6,6,6,5,5,5,5,5,5,5,5,
165635,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165645,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0xccb,0x1e4b,0x344b,5,
165650,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
165665,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,
165676,6,6,6,6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0,0,
165680,0,0,0,5,5,6,6,6,6,0x17,0x17,0x17,0x17,0,0,
165690,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
165700,0,0,0,5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,
165710,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
165720,0,0,0,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89,0xc9,0x109,0x149,0x189,
165730x1c9,0x209,0x249,0x289,6,5,5,6,6,5,0,0,0,0,0,0,
165740,0,0,6,8,6,8,5,5,5,5,5,5,5,5,5,
165755,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165765,5,5,5,6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,
165770x17,0x17,0,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,
165780xa4b,0xccb,0xf4b,0x11cb,5,5,5,5,5,5,5,5,5,5,5,5,
165795,5,5,5,8,8,8,6,6,6,6,8,8,6,6,0x17,
165800x17,0x10,0x17,0x17,0x17,0x17,6,0,0,0,0,0,0,0,0,0,
165810,0x10,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
165825,5,5,5,5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,
165830x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5,
165845,5,5,6,6,6,6,6,8,6,6,6,6,6,6,6,
165856,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,
165865,8,8,5,0,0,0,0,0,0,0,0,5,5,5,5,
165875,5,5,5,5,5,5,5,5,5,5,5,6,6,6,5,
165885,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
165895,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,
165900x17,0x17,5,0,0,0,0,0,0,0,0,0,8,5,5,5,
165915,0x17,0x17,0x17,0x17,6,6,6,6,0x17,8,6,0x49,0x89,0xc9,0x109,
165920x149,0x189,0x1c9,0x209,0x249,0x289,5,0x17,5,0x17,0x17,0x17,5,5,5,5,
165935,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8,
165948,8,6,6,6,6,6,6,6,6,6,8,0,0x58b,0x5cb,0x60b,
165950x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,
165960x784b,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
165975,5,5,5,5,5,5,5,8,8,8,6,6,6,8,8,
165986,8,6,6,0x17,0x17,0x17,0x17,0x17,0x17,6,5,5,6,0,0,
165990,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
166000,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
166015,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,
166025,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
166035,0,5,5,5,5,0,5,5,5,5,5,5,5,5,5,
166045,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,
166055,0x17,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
166065,5,5,5,5,5,5,5,8,8,8,6,6,6,6,6,
166076,6,6,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
166080x249,0x289,0,0,0,0,0,0,5,5,8,8,0,0,6,6,
166096,6,6,6,6,0,0,0,6,6,6,6,6,0,0,0,
166100,0,0,0,0,0,0,0,6,6,8,8,0,5,5,5,
166115,5,5,5,5,0,0,5,5,0,0,5,5,5,5,5,
166125,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,
166135,0,5,5,0,5,5,5,5,5,0,6,6,5,8,8,
166146,8,8,8,8,0,0,8,8,0,0,8,8,8,0,0,
166155,0,0,0,0,0,0,8,0,0,0,0,0,5,5,5,
166165,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166175,5,5,5,5,8,8,8,6,6,6,6,6,6,6,6,
166188,8,6,6,6,8,6,5,5,5,5,0x17,0x17,0x17,0x17,0x17,
166190x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0x17,6,5,
166205,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166218,8,8,6,6,6,6,6,6,8,6,8,8,8,8,6,
166226,8,6,6,5,5,0x17,5,0,0,0,0,0,0,0,0,
166230x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
166245,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8,
166258,8,6,6,6,6,0,0,8,8,8,8,6,6,8,6,
166266,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
166270x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5,6,6,0,0,
166285,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166298,8,8,6,6,6,6,6,6,6,6,8,8,6,8,6,
166306,0x17,0x17,0x17,5,0,0,0,0,0,0,0,0,0,0,0,
166310x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
166320x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,
166330,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
166340x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
166350,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
166365,5,5,5,5,5,5,5,5,5,5,6,8,6,8,8,
166376,6,6,6,6,6,8,6,5,0x17,0,0,0,0,0,0,
166388,8,6,6,6,6,8,6,6,6,6,6,0,0,0,0,
166390x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0x17,0x17,0x17,0x1b,
166405,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,
166410,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
166425,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,
166436,6,6,6,6,6,6,6,8,6,6,0x17,0,0,0,0,
166440x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,
166450x16cb,0x194b,0x1bcb,0,0,0,0,0,0,0,0,0,0,0,0,5,
166468,5,8,6,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,
166470x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
166485,5,5,5,5,5,5,0,0,5,0,0,5,5,5,5,
166495,5,5,5,0,5,5,0,5,5,5,5,5,5,5,5,
166505,5,5,5,5,5,5,5,8,8,8,8,8,8,0,8,
166518,0,0,6,6,8,6,5,6,5,0x17,5,8,0,0,0,
166520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
166530,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
166540,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166555,5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,
166560,0,6,6,8,8,8,8,5,5,5,5,5,5,5,5,
166575,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,
166586,8,5,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,6,
166590,0,0,0,0,0,0,0,5,6,6,6,6,6,6,8,
166608,6,6,6,5,5,5,5,5,6,6,6,6,6,6,6,
166616,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,
166625,5,5,5,5,5,5,5,0x17,0x17,0x17,0,0,0,0,0,
166630,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,
166645,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,
166656,6,6,6,6,6,6,8,6,6,0x17,0x17,0x17,5,0x17,0x17,
166665,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0,
166670x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,
166680x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,
166690,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
166700x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0,0,0,
166710x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166725,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166735,5,5,5,5,5,5,5,5,5,5,8,6,6,6,6,
166746,6,6,0,6,6,6,6,6,6,8,6,6,6,6,6,
166756,6,6,6,0,8,6,6,6,6,6,6,6,8,6,6,
166768,6,6,0,0,0,0,0,0,0,0,0,5,5,5,5,
166775,5,5,5,5,5,5,5,5,5,5,5,0,0,6,6,
166786,6,6,6,6,6,6,6,6,6,6,6,6,6,5,6,
166790,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
166800x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,0,
166815,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,
166825,5,5,5,5,5,5,5,5,6,6,6,6,6,6,0,
166830,0,6,0,6,6,0,6,5,5,5,5,5,5,5,5,
166845,5,8,8,8,8,8,0,6,6,0,8,8,6,8,6,
166855,0,0,0,0,0,0,0,5,5,5,5,5,5,0,5,
166865,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166875,5,5,5,5,5,5,5,5,5,5,6,6,8,8,0x17,
166880x17,0,0,0,0,0,0,0,6,8,6,0x17,0x17,0x17,0x17,0x17,
166890x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
166900x249,0x289,0,0,0,0,0,0,6,6,5,8,5,5,5,5,
166915,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,
166925,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
166938,8,6,6,6,6,6,0,0,0,8,8,0,0,0,0,
166940,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,
166950,0,0,0,0,0,0,0,0,0,0,0,0x19,0x1b,0x1b,0x1b,
166960x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,
166970,0,0,0,0,0,0,0,0,0,0,0x17,0xcd0b,0xcc0b,0xcb0b,0xd00b,
166980xca0b,0xcf0b,0xcb4b,0xd04b,0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b,0x34cb,0x344b,0x344b,0x3ccb,
166990xcd0b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19,0x34ca,0x354a,0x34ca,0x34ca,
167000x344a,0x348a,0x388a,0xf4a,0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0,0x17,0x17,0x17,0x17,
167010x17,0,0,0,0,0,0,0,0,0,0,0,0x5ca,0x60a,0x64a,0x68a,
167020x6ca,0x70a,0x74a,0x78a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a,0x68a,0x6ca,0x70a,0x74a,
167030x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x5ca,
167040x60a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0xc08a,0xc18a,
167050x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a,0x6ca,0x70a,0x70a,0x70a,
167060x74a,0x74a,0x78a,0x78a,0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a,0x5ca,0x60a,0x64a,0x64a,
167070x68a,0x68a,0x5ca,0x60a,0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca,5,5,5,5,
167080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
167090,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
167105,5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0,
167110,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
167125,5,5,5,5,5,5,5,5,5,5,5,0x10,0x10,0x10,0x10,
167130x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,5,5,5,
167145,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,
167156,6,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,
167160x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5,
167175,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,
167186,6,6,6,6,0x17,0,0,0,0,0,0,0,0,0,0,
167195,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
167200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
167215,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
167226,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,
167234,4,4,4,0x17,0x1b,0,0,0,0,0,0,0,0,0,0,
167240x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb,0x1e4b,0x788b,0x790b,0x798b,
167250x7a0b,0x7a8b,0,5,5,5,5,5,5,5,5,5,5,5,5,5,
167265,5,5,5,5,5,5,5,0,0,0,0,0,5,5,5,
167270x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,
167280x94b,0x98b,0x9cb,0xa0b,0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0,0,0,0,0,
167295,5,5,5,5,5,5,5,5,5,5,0,0,0,0,6,
167305,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
167318,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
167328,8,8,8,0,0,0,0,0,0,0,6,6,6,6,4,
167334,4,4,4,4,4,4,4,4,4,4,4,4,4,0x17,4,
167346,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,
167350,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,
167365,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
167375,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,
167380,0,0,0,4,4,4,4,0,4,4,4,4,4,4,4,
167390,4,4,0,5,5,5,0,0,0,0,0,0,0,0,0,
167400,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,
167410,0,0,0,0,0,0,0,5,5,5,0,0,5,0,0,
167420,0,0,0,0,0,0,0,5,5,5,5,0,0,0,0,
167430,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
167445,5,5,5,5,5,5,0,0,0,0,0,5,5,5,5,
167455,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,
167465,5,5,5,5,5,5,5,5,5,0,0,0x1b,6,6,0x17,
167470x10,0x10,0x10,0x10,0,0,0,0,0,0,0,0,0,0,0,0,
167480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
167490x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,
167500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
167516,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,
167526,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
167536,6,6,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
167540x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,
167550,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
167560x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6,6,6,0x1b,0x1b,
167570x1b,8,8,8,8,8,8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,
167586,6,6,6,6,6,6,0x1b,0x1b,6,6,6,6,6,6,6,
167590x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
167600x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
167610x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,
167626,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
167630,0,0,0,0,0,0,0,0,0,0,0,0x54b,0x58b,0x5cb,0x60b,
167640x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,
167650,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,
167660x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x58b,0x5cb,
167670x60b,0x64b,0x68b,0x58b,0x68b,0,0,0,0,0,0,0,0x249,0x289,0x49,0x89,
167680xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,
167690x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,1,1,1,1,
167701,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
167711,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,
167722,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,
167731,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,
167742,0,2,2,2,2,2,2,2,2,2,2,1,1,1,1,
167751,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
167761,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,
167772,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
167781,0,1,1,0,0,1,0,0,1,1,0,0,1,1,1,
167791,0,1,1,1,1,1,1,1,1,2,2,2,2,0,2,
167800,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,
167812,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
167821,1,1,1,2,2,2,2,1,1,0,1,1,1,1,0,
167830,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,
167841,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
167852,2,2,2,2,2,2,2,2,2,2,2,1,1,0,1,
167861,1,1,0,1,1,1,1,1,0,1,0,0,0,1,1,
167871,1,1,1,1,0,2,2,2,2,2,2,2,2,2,2,
167882,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
167891,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,
167902,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
167912,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
167921,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1,
167931,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
167941,1,1,1,1,0x18,2,2,2,2,2,2,2,2,2,2,
167952,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x18,
167962,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,
167971,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x18,
167982,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
167992,2,2,2,2,0x18,2,2,2,2,2,2,1,1,1,1,
168001,1,1,1,1,1,1,1,1,1,1,1,2,2,2,0x18,
168012,2,2,2,2,2,1,2,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,
168020x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0,6,6,6,
168036,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,
168040,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,
168056,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
168066,6,6,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,
168076,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,
168080x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,
168090,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,
168106,6,6,6,6,6,6,0,6,6,6,6,6,6,6,6,
168116,6,6,6,6,6,6,6,6,0,0,6,6,6,6,6,
168122,2,2,2,2,2,2,2,2,2,5,2,2,2,2,2,
168132,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,
168140,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0,
168150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168166,6,0,6,6,0,6,6,6,6,6,0,0,0,0,0,
168174,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
168180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,
168190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168204,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,
168210,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168220x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,5,0x1b,
168230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168245,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,
168256,6,6,6,6,6,6,4,4,4,4,4,4,4,0,0,
168265,5,5,5,5,5,5,5,5,5,5,5,5,5,6,0,
168270,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168285,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,
168290x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0x19,
168305,5,5,5,5,5,5,5,5,5,5,4,6,6,6,6,
168310x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,
168325,5,5,5,5,5,5,0,5,5,5,5,0,5,5,0,
168335,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,
168345,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,
168356,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,
168362,2,2,2,6,6,6,6,6,6,6,4,0,0,0,0,
168370x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,
168381,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
168392,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
168400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168410,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,
168420x78cb,0x794b,0x814b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x1b,0x34cb,0x344b,0x3ccb,
168430x19,0x58b,0x5cb,0x788b,0x78cb,0,0,0,0,0,0,0,0,0,0,0,
168440x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,
168450x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,
168460x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x1b,0x5cb,
168470x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b,0x344b,0x354b,0,0,
168480,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,
168490x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,
168500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168510x18,0x18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168525,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5,
168535,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
168540,5,5,0,5,0,0,5,0,5,5,5,5,5,5,5,
168555,5,5,0,5,5,5,5,0,5,0,5,0,0,0,0,
168560,0,5,0,0,0,0,5,0,5,0,5,0,5,5,5,
168570,5,5,0,5,0,0,5,0,5,0,5,0,5,0,5,
168580,5,5,0,5,0,0,5,5,5,5,0,5,5,5,5,
168595,5,5,0,5,5,5,5,0,5,5,5,5,0,5,0,
168605,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,
168615,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,
168620,5,5,5,0,5,5,5,5,5,0,5,5,5,5,5,
168635,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,
168640x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,
168650x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168660,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168670,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168680x2cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b,0x54b,0x1b,0x1b,0x1b,
168690x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168700,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168710x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168720x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,
168730x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168740x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,
168750x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,
168760x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168770x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,
168780,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168790x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168800x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x1a,
168810x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,
168820x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,
168830x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168840x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,
168850x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168860x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
168870x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0,0,0,
168880,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
168890x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
168900x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
168910x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,
168920x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,
168930x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168940x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,
168950x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,
168960,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,
168970,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168980x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
168990x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,
169000,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
169010,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
169020x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
169030x1b,0x1b,0x1b,0x1b,5,0x705,5,5,5,5,5,5,5,5,5,5,
169045,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169055,5,5,5,0x645,5,5,5,5,5,5,5,5,5,5,5,
169065,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169075,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5,
169085,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169095,0x685,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169105,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169115,5,5,0xcc5,5,5,5,5,5,5,5,5,0xf45,5,5,5,
169125,5,5,5,5,5,5,5,5,5,5,5,0xf45,5,5,5,
169135,5,5,5,5,5,5,5,5,5,0x6c5,5,5,5,5,5,
169145,5,5,5,5,5,5,5,5,5,5,5,5,0x605,5,5,
169155,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169165,5,5,5,5,5,5,5,5,0x605,5,5,5,5,5,5,
169175,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169185,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5,
169195,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169205,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5,5,
169215,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
169225,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,
169230,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
169245,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,
169250,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
169260,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,
169275,5,5,5,0x785,5,5,5,5,5,5,5,5,5,5,5,
169285,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
169290x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
169300x10,0x10,0x10,0x10,0,0x10,0,0,0,0,0,0,0,0,0,0,
169310,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
169320,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,
169336,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,
169340,0,0,0,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
169350x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
169360x11,0x11,0,0,0,0,0,0
16937};
16938
16939inline constexpr struct propstrie_t{
16940 /* protected: used by macros and functions for reading values */
16941 const uint16_t *index;
16943
16944 /* Start of the last range which ends at U+10ffff, and its value. */
16945 char32_t highStart;
16947}propstrie{
16949 4692,
16950 0x110000,
16951 0x59e4
16953
16954//file_end
16955
16956 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
16957 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/convert.hpp"
16958//convert.hpp
16959/*
16960未完成的elc解释器_share文件
16961由steve02081504与Alex0125设计、编写
16962转载时请在不对此文件做任何修改的同时注明出处
16963项目地址:https://github.com/ELC-lang/ELC
16964*/
16965/*
16966 ,??????????????????????????
16967 ????????????????????????????
16968 ?????????????????????????????+
16969 ?????+++++++++++++++++++++++++
16970 ?????+++++++++++++++++++++++++
16971 ??????++++++++++++++++++++++++
16972 ?????++
16973 ?????+++
16974 ??????+++IIIIIIIIIIIIIIIIII
16975 ?????+++++IIIIIIIIIIIIIIIIII
16976 ?????++++++++++++++++++++++++
16977 ??????+++++++++++++++++++++++:
16978 ?????++
16979 ?????+++
16980 ??????++
16981 ??????????????????????????????II
16982 ??????????????????????????????IIII
16983 ,?????????????????????????????IIIII+
16984 =???++++++++++++++++++++++++++III?
16985 ?++++++++++++++++++++++++++++I+
16986*/
16987typedef string_view_t<char8_t>string_view_u8_t;
16988typedef string_view_t<char16_t>string_view_u16_t;
16989typedef string_view_t<char32_t>string_view_u32_t;
16990
16991inline constexpr size_t utf16_to_utf8_code_size = 2;
16992inline constexpr size_t utf32_to_utf8_code_size = 4;
16993inline constexpr size_t utf32_to_utf16_code_size = 2;
16994
16995template<class char_T>
16996inline constexpr size_t to_u32_code_size=sizeof(char32_t)/sizeof(char_T);
16997
16998inline namespace convert_impl{
16999 inline constexpr size_t decode_utf8(char32_t *out, const char8_t *in, size_t in_size_max)noexcept{
17000 push_and_disable_msvc_warning(26494);//未初始化警告diss
17001 char8_t code1, code2, code3, code4;
17003 code1 = *in++;
17004 if(code1 < 0x80){ /* 1-byte sequence */
17005 *out = code1;
17006 return 1;
17007 }
17008 elseif(code1 < 0xC2)
17009 return npos;
17010 elseif(code1 < 0xE0){ /* 2-byte sequence */
17011 if(in_size_max < 2)
17012 return npos;
17013 code2 = *in++;
17014 if((code2 & 0xC0) != 0x80)
17015 return npos;
17016 *out = (code1 << 6) + code2 - 0x3080;
17017 return 2;
17018 }
17019 elseif(code1 < 0xF0){ /* 3-byte sequence */
17020 if(in_size_max < 3)
17021 return npos;
17022 code2 = *in++;
17023 if((code2 & 0xC0) != 0x80)
17024 return npos;
17025 if(code1 == 0xE0 && code2 < 0xA0)
17026 return npos;
17027 code3 = *in++;
17028 if((code3 & 0xC0) != 0x80)
17029 return npos;
17030 *out = (code1 << 12) + (code2 << 6) + code3 - 0xE2080;
17031 return 3;
17032 }
17033 elseif(code1 < 0xF5){ /* 4-byte sequence */
17034 if(in_size_max < 4)
17035 return npos;
17036 code2 = *in++;
17037 if((code2 & 0xC0) != 0x80)
17038 return npos;
17039 if(code1 == 0xF0 && code2 < 0x90)
17040 return npos;
17041 if(code1 == 0xF4 && code2 >= 0x90)
17042 return npos;
17043 code3 = *in++;
17044 if((code3 & 0xC0) != 0x80)
17045 return npos;
17046 code4 = *in++;
17047 if((code4 & 0xC0) != 0x80)
17048 return npos;
17049 *out = (code1 << 18) + (code2 << 12) + (code3 << 6) + code4 - 0x3C82080;
17050 return 4;
17051 }
17052 else
17053 return npos;
17054 }
17055 inline constexpr size_t get_decode_utf8_size(const char8_t* in)noexcept{
17056 if(*in < 0x80) /* 1-byte sequence */
17057 return 1;
17058 elseif(*in < 0xC2)
17059 return npos;
17060 elseif(*in < 0xE0) /* 2-byte sequence */
17061 return 2;
17062 elseif(*in < 0xF0) /* 3-byte sequence */
17063 return 3;
17064 elseif(*in < 0xF5) /* 4-byte sequence */
17065 return 4;
17066 else
17067 return npos;
17068 }
17069 inline constexpr size_t decode_utf16(char32_t *out, const char16_t *in, size_t in_size_max)noexcept{
17070 const char16_t code1 = *in++;
17071 if(code1 >= 0xD800 && code1 < 0xDC00){ /* surrogate pair */
17072 if(in_size_max < 2)
17073 return npos;
17074 const char16_t code2 = *in++;
17075 if(code2 >= 0xDC00 && code2 < 0xE000){
17076 *out = (code1 << 10) + code2 - 0x35FDC00;
17077 return 2;
17078 }
17079 return npos;
17080 }
17081 *out = code1;
17082 return 1;
17083 }
17084 inline constexpr size_t get_decode_utf16_size(const char16_t* in)noexcept{
17085 if(*in >= 0xD800 && *in < 0xDC00) /* surrogate pair */
17086 return 2;
17087 else
17088 return 1;
17089 }
17090 inline constexpr size_t encode_utf8(char8_t *out, char32_t in)noexcept{
17091 if(in < 0x80){
17092 *out++ = (char8_t)in;
17093 return 1;
17094 }
17095 elseif(in < 0x800){
17096 *out++ = char8_t((in >> 6) + 0xC0);
17097 *out++ = char8_t((in & 0x3F) + 0x80);
17098 return 2;
17099 }
17100 elseif(in < 0x10000){
17101 *out++ = char8_t((in >> 12) + 0xE0);
17102 *out++ = ((in >> 6) & 0x3F) + 0x80;
17103 *out++ = (in & 0x3F) + 0x80;
17104 return 3;
17105 }
17106 elseif(in < 0x110000){
17107 *out++ = char8_t((in >> 18) + 0xF0);
17108 *out++ = ((in >> 12) & 0x3F) + 0x80;
17109 *out++ = ((in >> 6) & 0x3F) + 0x80;
17110 *out++ = (in & 0x3F) + 0x80;
17111 return 4;
17112 }
17113 return npos;
17114 }
17115 inline constexpr size_t get_encode_utf8_size(char32_t in)noexcept{
17116 if(in < 0x80)
17117 return 1;
17118 elseif(in < 0x800)
17119 return 2;
17120 elseif(in < 0x10000)
17121 return 3;
17122 elseif(in < 0x110000)
17123 return 4;
17124 else
17125 return npos;
17126 }
17127 inline constexpr size_t encode_utf16(char16_t *out, char32_t in)noexcept{
17128 if(in < 0x10000){
17129 *out++ = char16_t(in);
17130 return 1;
17131 }
17132 elseif(in < 0x110000){
17133 *out++ = char16_t((in >> 10) + 0xD7C0);
17134 *out++ = (in & 0x3FF) + 0xDC00;
17135 return 2;
17136 }
17137 return npos;
17138 }
17139 inline constexpr size_t get_encode_utf16_size(char32_t in)noexcept{
17140 if(in < 0x10000)
17141 return 1;
17142 elseif(in < 0x110000)
17143 return 2;
17144 else
17145 return npos;
17146 }
17147}
17148template<typename in_char_t, typename out_char_t>
17151 string_view_t<in_char_t> _processed_input;
17152 string_view_t<out_char_t> _processed_output;
17153public:
17154 inline constexpr code_convert_result(bool success, string_view_t<in_char_t> processed_input, string_view_t<out_char_t> processed_output)noexcept:_success(success),_processed_input(processed_input),_processed_output(processed_output){}
17155 inline constexpr bool success()const noexcept{ return _success; }
17156 inline constexpr string_view_t<in_char_t> processed_input()const noexcept{ return _processed_input; }
17157 inline constexpr string_view_t<out_char_t> processed_output()const noexcept{ return _processed_output; }
17158 inline constexpr explicit operator bool()const noexcept{ return success(); }
17159};
17160inline constexpr auto get_utf8_to_utf16_size(const char8_t *in, size_t len)noexcept{
17161 size_t out_size = 0;
17162 const auto end = in + len;
17163 while(in < end){
17164 char32_t code;
17165 const auto size = decode_utf8(&code, in, end - in);
17166 if(size == npos)
17167 return npos;
17168 const auto tmp = get_encode_utf16_size(code);
17169 if(tmp == npos)
17170 return npos;
17171 out_size += tmp;
17172 in += size;
17173 }
17174}
17175inline constexpr auto get_utf8_to_utf16_size(string_view_u8_t in)noexcept{
17176 return get_utf8_to_utf16_size(in.data(), in.size());
17177}
17178inline constexpr auto utf8_to_utf16(char16_t *out, const char8_t *in, size_t len)noexcept{
17179 const auto end = in + len;
17180 push_and_disable_msvc_warning(26494);//未初始化警告diss
17181 char32_t code;
17183 //for return
17184 const auto out_start = out;
17185 const auto in_start = in;
17186 auto result_builder = exλ(bool success)noexcept{
17187 return code_convert_result<char8_t, char16_t>(success, string_view_t<char8_t>(in_start, in - in_start), string_view_t<char16_t>(out_start, out - out_start));
17188 };
17189 while(in < end){
17190 const auto size = decode_utf8(&code, in, end - in);
17191 if(size == npos)
17192 return result_builder(false);
17193 auto tmp = encode_utf16(out, code);
17194 if(tmp == npos)
17195 return result_builder(false);
17196 out += tmp;
17197 in += size;
17198 }
17199 return result_builder(true);
17200}
17201inline constexpr auto utf8_to_utf16(char16_t *out, string_view_u8_t in)noexcept{
17202 return utf8_to_utf16(out, in.data(), in.size());
17203}
17204inline constexpr auto get_utf8_to_utf32_size(const char8_t *in, size_t len)noexcept{
17205 size_t out_size = 0;
17206 const auto end = in + len;
17207 while(in < end){
17208 const auto tmp = get_decode_utf8_size(in);
17209 if(tmp == npos)
17210 return npos;
17211 in += tmp;
17212 out_size++;
17213 }
17214 return out_size;
17215}
17216inline constexpr auto get_utf8_to_utf32_size(string_view_u8_t in)noexcept{
17217 return get_utf8_to_utf32_size(in.data(), in.size());
17218}
17219inline constexpr auto utf8_to_utf32(char32_t *out, const char8_t *in, size_t len)noexcept{
17220 const auto end = in + len;
17221 push_and_disable_msvc_warning(26494);//未初始化警告diss
17222 char32_t code;
17224 //for return
17225 const auto out_start = out;
17226 const auto in_start = in;
17227 auto result_builder = exλ(bool success)noexcept{
17228 return code_convert_result<char8_t, char32_t>(success, string_view_t<char8_t>(in_start, in - in_start), string_view_t<char32_t>(out_start, out - out_start));
17229 };
17230 while(in < end){
17231 const auto size = decode_utf8(&code, in, end - in);
17232 if(size == npos)
17233 return result_builder(false);
17234 *out++ = code;
17235 in += size;
17236 }
17237 return result_builder(true);
17238}
17239inline constexpr auto utf8_to_utf32(char32_t *out, string_view_u8_t in)noexcept{
17240 return utf8_to_utf32(out, in.data(), in.size());
17241}
17242inline constexpr auto get_utf16_to_utf8_size(const char16_t *in, size_t len)noexcept{
17243 size_t out_size = 0;
17244 const auto end = in + len;
17245 while(in < end){
17246 char32_t code;
17247 const auto size = decode_utf16(&code, in, end - in);
17248 if(size == npos)
17249 return npos;
17250 const auto tmp = get_encode_utf8_size(code);
17251 if(tmp == npos)
17252 return npos;
17253 out_size += tmp;
17254 in += size;
17255 }
17256 return out_size;
17257}
17258inline constexpr auto get_utf16_to_utf8_size(string_view_u16_t in)noexcept{
17259 return get_utf16_to_utf8_size(in.data(), in.size());
17260}
17261inline constexpr auto utf16_to_utf8(char8_t *out, const char16_t *in, size_t len)noexcept{
17262 const auto end = in + len;
17263 push_and_disable_msvc_warning(26494);//未初始化警告diss
17264 char32_t code;
17266 //for return
17267 const auto out_start = out;
17268 const auto in_start = in;
17269 auto result_builder = exλ(bool success)noexcept{
17270 return code_convert_result<char16_t, char8_t>(success, string_view_t<char16_t>(in_start, in - in_start), string_view_t<char8_t>(out_start, out - out_start));
17271 };
17272 while(in < end){
17273 const auto size = decode_utf16(&code, in, end - in);
17274 if(size == npos)
17275 return result_builder(false);
17276 auto tmp = encode_utf8(out, code);
17277 if(tmp == npos)
17278 return result_builder(false);
17279 out += tmp;
17280 in += size;
17281 }
17282 return result_builder(true);
17283}
17284inline constexpr auto utf16_to_utf8(char8_t *out, string_view_u16_t in)noexcept{
17285 return utf16_to_utf8(out, in.data(), in.size());
17286}
17287inline constexpr auto get_utf16_to_utf32_size(const char16_t *in, size_t len)noexcept{
17288 size_t out_size = 0;
17289 const auto end = in + len;
17290 while(in < end){
17291 char32_t code;
17292 const auto size = decode_utf16(&code, in, end - in);
17293 if(size == npos)
17294 return npos;
17295 in += size;
17296 out_size++;
17297 }
17298 return out_size;
17299}
17300inline constexpr auto get_utf16_to_utf32_size(string_view_u16_t in)noexcept{
17301 return get_utf16_to_utf32_size(in.data(), in.size());
17302}
17303inline constexpr auto utf16_to_utf32(char32_t *out, const char16_t *in, size_t len)noexcept{
17304 const auto end = in + len;
17305 //for return
17306 const auto out_start = out;
17307 const auto in_start = in;
17308 auto result_builder = exλ(bool success)noexcept{
17309 return code_convert_result<char16_t, char32_t>(success, string_view_t<char16_t>(in_start, in - in_start), string_view_t<char32_t>(out_start, out - out_start));
17310 };
17311 while(in < end){
17312 char32_t code;
17313 const auto size = decode_utf16(&code, in, end - in);
17314 if(size == npos)
17315 return result_builder(false);
17316 *out++ = code;
17317 in += size;
17318 }
17319 return result_builder(true);
17320}
17321inline constexpr auto utf16_to_utf32(char32_t *out, string_view_u16_t in)noexcept{
17322 return utf16_to_utf32(out, in.data(), in.size());
17323}
17324inline constexpr auto get_utf32_to_utf8_size(const char32_t *in, size_t len)noexcept{
17325 size_t out_size = 0;
17326 const auto end = in + len;
17327 while(in < end){
17328 const auto tmp = get_encode_utf8_size(*in);
17329 if(tmp == npos)
17330 return npos;
17331 out_size += tmp;
17332 ++in;
17333 }
17334 return out_size;
17335}
17336inline constexpr auto get_utf32_to_utf8_size(string_view_u32_t in)noexcept{
17337 return get_utf32_to_utf8_size(in.data(), in.size());
17338}
17339inline constexpr auto utf32_to_utf8(char8_t *out, const char32_t *in, size_t len)noexcept{
17340 const auto end = in + len;
17341 //for return
17342 const auto out_start = out;
17343 const auto in_start = in;
17344 auto result_builder = exλ(bool success)noexcept{
17345 return code_convert_result<char32_t, char8_t>(success, string_view_t<char32_t>(in_start, in - in_start), string_view_t<char8_t>(out_start, out - out_start));
17346 };
17347 while(in < end){
17348 auto tmp = encode_utf8(out, *in);
17349 if(tmp == npos)
17350 return result_builder(false);
17351 out += tmp;
17352 ++in;
17353 }
17354 return result_builder(true);
17355}
17356inline constexpr auto utf32_to_utf8(char8_t *out, string_view_u32_t in)noexcept{
17357 return utf32_to_utf8(out, in.data(), in.size());
17358}
17359inline constexpr auto get_utf32_to_utf16_size(const char32_t *in, size_t len)noexcept{
17360 size_t out_size = 0;
17361 const auto end = in + len;
17362 while(in < end){
17363 const auto tmp = get_encode_utf16_size(*in);
17364 if(tmp == npos)
17365 return npos;
17366 out_size += tmp;
17367 ++in;
17368 }
17369 return out_size;
17370}
17371inline constexpr auto get_utf32_to_utf16_size(string_view_u32_t in)noexcept{
17372 return get_utf32_to_utf16_size(in.data(), in.size());
17373}
17374inline constexpr auto utf32_to_utf16(char16_t *out, const char32_t *in, size_t len)noexcept{
17375 const auto end = in + len;
17376 //for return
17377 const auto out_start = out;
17378 const auto in_start = in;
17379 auto result_builder = exλ(bool success)noexcept{
17380 return code_convert_result<char32_t, char16_t>(success, string_view_t<char32_t>(in_start, in - in_start), string_view_t<char16_t>(out_start, out - out_start));
17381 };
17382 while(in < end){
17383 auto tmp = encode_utf16(out, *in);
17384 if(tmp == npos)
17385 return result_builder(false);
17386 out += tmp;
17387 ++in;
17388 }
17389 return result_builder(true);
17390}
17391inline constexpr auto utf32_to_utf16(char16_t *out, string_view_u32_t in)noexcept{
17392 return utf32_to_utf16(out, in.data(), in.size());
17393}
17394inline constexpr auto utf32_to_utf8(char32_t ch, char8_t *out)noexcept{
17395 return utf32_to_utf8(out, &ch, 1);
17396}
17397inline constexpr auto utf32_to_utf16(char32_t ch, char16_t *out)noexcept{
17398 return utf32_to_utf16(out, &ch, 1);
17399}
17400inline constexpr auto utf16_to_utf8(char16_t ch, char8_t *out)noexcept{
17401 return utf16_to_utf8(out, &ch, 1);
17402}
17403inline constexpr void utf16_to_utf32(char32_t *out, char16_t in)noexcept=delete;
17404inline constexpr void utf8_to_utf16(char16_t *out, char8_t in)noexcept=delete;
17405
17406//
17407
17408//utf32 to utf32 for compatible
17409inline constexpr auto utf32_to_utf32(char32_t *out, const char32_t *in, size_t len)noexcept{
17410 const auto end = in + len;
17411 //for return
17412 const auto out_start = out;
17413 const auto in_start = in;
17414 auto result_builder = exλ(bool success)noexcept{
17415 return code_convert_result<char32_t, char32_t>(success, string_view_t<char32_t>(in_start, in - in_start), string_view_t<char32_t>(out_start, out - out_start));
17416 };
17417 while(in < end){
17418 *out++ = *in++;
17419 }
17420 return result_builder(true);
17421}
17422inline constexpr auto utf32_to_utf32(char32_t *out, string_view_u32_t in)noexcept{
17423 return utf32_to_utf32(out, in.data(), in.size());
17424}
17425inline constexpr auto utf32_to_utf32(char32_t ch, char32_t *out)noexcept{
17426 return utf32_to_utf32(out, &ch, 1);
17427}
17428
17429//utf32 to auto
17430force_inline constexpr auto utf32_to_auto(char32_t *out, const char32_t *in, size_t len)noexcept{
17431 return utf32_to_utf32(out, in, len);
17432}
17433force_inline constexpr auto utf32_to_auto(char16_t *out, const char32_t *in, size_t len)noexcept{
17434 return utf32_to_utf16(out, in, len);
17435}
17436force_inline constexpr auto utf32_to_auto(char8_t *out, const char32_t *in, size_t len)noexcept{
17437 return utf32_to_utf8(out, in, len);
17438}
17439force_inline constexpr auto utf32_to_auto(char32_t *out, string_view_u32_t in)noexcept{
17440 return utf32_to_utf32(out, in.data(), in.size());
17441}
17442force_inline constexpr auto utf32_to_auto(char16_t *out, string_view_u32_t in)noexcept{
17443 return utf32_to_utf16(out, in.data(), in.size());
17444}
17445force_inline constexpr auto utf32_to_auto(char8_t *out, string_view_u32_t in)noexcept{
17446 return utf32_to_utf8(out, in.data(), in.size());
17447}
17448force_inline constexpr auto utf32_to_auto(char32_t ch, char32_t *out)noexcept{
17449 return utf32_to_utf32(out, &ch, 1);
17450}
17451force_inline constexpr auto utf32_to_auto(char32_t ch, char16_t *out)noexcept{
17452 return utf32_to_utf16(out, &ch, 1);
17453}
17454force_inline constexpr auto utf32_to_auto(char32_t ch, char8_t *out)noexcept{
17455 return utf32_to_utf8(out, &ch, 1);
17456}
17457
17458//auto to utf32
17459force_inline constexpr auto auto_to_utf32(char32_t *out, const char32_t *in, size_t len)noexcept{
17460 return utf32_to_utf32(out, in, len);
17461}
17462force_inline constexpr auto auto_to_utf32(char32_t *out, const char16_t *in, size_t len)noexcept{
17463 return utf16_to_utf32(out, in, len);
17464}
17465force_inline constexpr auto auto_to_utf32(char32_t *out, const char8_t *in, size_t len)noexcept{
17466 return utf8_to_utf32(out, in, len);
17467}
17468force_inline constexpr auto auto_to_utf32(char32_t *out, string_view_u32_t in)noexcept{
17469 return utf32_to_utf32(out, in.data(), in.size());
17470}
17471force_inline constexpr auto auto_to_utf32(char32_t *out, string_view_u16_t in)noexcept{
17472 return utf16_to_utf32(out, in.data(), in.size());
17473}
17474force_inline constexpr auto auto_to_utf32(char32_t *out, string_view_u8_t in)noexcept{
17475 return utf8_to_utf32(out, in.data(), in.size());
17476}
17477force_inline constexpr auto auto_to_utf32(char32_t ch, char32_t *out)noexcept{
17478 return utf32_to_utf32(out, &ch, 1);
17479}
17480force_inline constexpr auto auto_to_utf32(char16_t ch, char32_t *out)noexcept{
17481 return utf16_to_utf32(out, &ch, 1);
17482}
17483force_inline constexpr auto auto_to_utf32(char8_t ch, char32_t *out)noexcept{
17484 return utf8_to_utf32(out, &ch, 1);
17485}
17486
17487//file_end
17488
17489 #line 47 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
17490 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/isX.hpp"
17491//isX.hpp
17492/*
17493未完成的elc解释器_share文件
17494由steve02081504与Alex0125设计、编写
17495转载时请在不对此文件做任何修改的同时注明出处
17496项目地址:https://github.com/ELC-lang/ELC
17497*/
17498/*
17499 ,??????????????????????????
17500 ????????????????????????????
17501 ?????????????????????????????+
17502 ?????+++++++++++++++++++++++++
17503 ?????+++++++++++++++++++++++++
17504 ??????++++++++++++++++++++++++
17505 ?????++
17506 ?????+++
17507 ??????+++IIIIIIIIIIIIIIIIII
17508 ?????+++++IIIIIIIIIIIIIIIIII
17509 ?????++++++++++++++++++++++++
17510 ??????+++++++++++++++++++++++:
17511 ?????++
17512 ?????+++
17513 ??????++
17514 ??????????????????????????????II
17515 ??????????????????????????????IIII
17516 ,?????????????????????????????IIIII+
17517 =???++++++++++++++++++++++++++III?
17518 ?++++++++++++++++++++++++++++I+
17519*/
17520/* Checks if ch is a lower case letter.*/
17521inline constexpr bool islower(char_t c)noexcept{
17522 const uint32_t props=GET_PROPS(c);
17523 return(GET_CATEGORY(props)==U_LOWERCASE_LETTER);
17524}
17525
17526/* Checks if ch is an upper case letter.*/
17527inline constexpr bool isupper(char_t c)noexcept{
17528 const uint32_t props=GET_PROPS(c);
17529 return(GET_CATEGORY(props)==U_UPPERCASE_LETTER);
17530}
17531
17532/* Checks if ch is a title case letter; usually upper case letters.*/
17533inline constexpr bool istitle(char_t c)noexcept{
17534 const uint32_t props=GET_PROPS(c);
17535 return(GET_CATEGORY(props)==U_TITLECASE_LETTER);
17536}
17537
17538/* Checks if ch is a decimal digit. */
17539inline constexpr bool isdigit(char_t c)noexcept{
17540 const uint32_t props=GET_PROPS(c);
17541 return(GET_CATEGORY(props)==U_DECIMAL_DIGIT_NUMBER);
17542}
17543
17544inline constexpr bool isxdigit(char_t c)noexcept{
17545 /* check ASCII and Fullwidth ASCII a-fA-F */
17546 if(
17547 (c<=0x66 && c>=0x41 && (c<=0x46 || c>=0x61)) ||
17548 (c>=0xff21 && c<=0xff46 && (c<=0xff26 || c>=0xff41))
17549 ){
17550 return true;
17551 }
17552
17553 const uint32_t props=GET_PROPS(c);
17554 return(GET_CATEGORY(props)==U_DECIMAL_DIGIT_NUMBER);
17555}
17556
17557/* Checks if the Unicode character is a letter.*/
17558inline constexpr bool isalpha(char_t c)noexcept{
17559 const uint32_t props=GET_PROPS(c);
17560 return((CAT_MASK(props)&U_GC_L_MASK)!=0);
17561}
17562
17563/* Checks if c is a letter or a decimal digit */
17564inline constexpr bool isalnum(char_t c)noexcept{
17565 const uint32_t props=GET_PROPS(c);
17566 return((CAT_MASK(props)&(U_GC_L_MASK|U_GC_ND_MASK))!=0);
17567}
17568
17569/* Checks if ch is a unicode character with assigned character type.*/
17570inline constexpr bool isdefined(char_t c)noexcept{
17571 const uint32_t props=GET_PROPS(c);
17572 return(GET_CATEGORY(props)!=0);
17573}
17574
17575/* Checks if the Unicode character is a base form character that can take a diacritic.*/
17576inline constexpr bool isbase(char_t c)noexcept{
17577 const uint32_t props=GET_PROPS(c);
17579}
17580
17581/* Checks if the Unicode character is a control character.*/
17582inline constexpr bool iscntrl(char_t c)noexcept{
17583 const uint32_t props=GET_PROPS(c);
17585}
17586
17587inline constexpr bool isISOControl(char_t c)noexcept{
17588 return (uint32_t)c<=0x9f && (c<=0x1f || c>=0x7f);
17589}
17590
17591/* Some control characters that are used as space. */
17592#define IS_THAT_CONTROL_SPACE(c) \
17593 (c<=0x9f && ((c>=TAB && c<=CR) || (c>=0x1c && c <=0x1f) || c==0x85))
17594
17595/* Checks if the Unicode character is a space character.*/
17596inline constexpr bool isspace(char_t c)noexcept{
17597 const uint32_t props=GET_PROPS(c);
17598 return((CAT_MASK(props)&U_GC_Z_MASK)!=0 || IS_THAT_CONTROL_SPACE(c));
17599}
17600
17601#undef IS_THAT_CONTROL_SPACE
17602
17603inline constexpr bool isblank(char_t c)noexcept{
17604 if((uint32_t)c<=0x9f){
17605 return c==9 || c==0x20; /* TAB or SPACE */
17606 }else{
17607 /* Zs */
17608 const uint32_t props=GET_PROPS(c);
17609 return(GET_CATEGORY(props)==U_SPACE_SEPARATOR);
17610 }
17611}
17612
17613/* Checks if the Unicode character is printable.*/
17614inline constexpr bool isprint(char_t c)noexcept{
17615 const uint32_t props=GET_PROPS(c);
17616 /* comparing ==0 returns false for the categories mentioned */
17617 return((CAT_MASK(props)&U_GC_C_MASK)==0);
17618}
17619
17620inline constexpr bool isgraph(char_t c)noexcept{
17621 const uint32_t props=GET_PROPS(c);
17622 /* comparing ==0 returns false for the categories mentioned */
17623 return((CAT_MASK(props)&
17625 ==0);
17626}
17627
17628inline constexpr bool ispunct(char_t c)noexcept{
17629 const uint32_t props=GET_PROPS(c);
17630 return((CAT_MASK(props)&U_GC_P_MASK)!=0);
17631}
17632
17633//file_end
17634
17635 #line 48 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
17636 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/marcos/_undefs.hpp"
17637//_defs.hpp
17638/*
17639未完成的elc解释器_share文件
17640由steve02081504与Alex0125设计、编写
17641转载时请在不对此文件做任何修改的同时注明出处
17642项目地址:https://github.com/ELC-lang/ELC
17643*/
17644/*
17645 ,??????????????????????????
17646 ????????????????????????????
17647 ?????????????????????????????+
17648 ?????+++++++++++++++++++++++++
17649 ?????+++++++++++++++++++++++++
17650 ??????++++++++++++++++++++++++
17651 ?????++
17652 ?????+++
17653 ??????+++IIIIIIIIIIIIIIIIII
17654 ?????+++++IIIIIIIIIIIIIIIIII
17655 ?????++++++++++++++++++++++++
17656 ??????+++++++++++++++++++++++:
17657 ?????++
17658 ?????+++
17659 ??????++
17660 ??????????????????????????????II
17661 ??????????????????????????????IIII
17662 ,?????????????????????????????IIIII+
17663 =???++++++++++++++++++++++++++III?
17664 ?++++++++++++++++++++++++++++I+
17665*/
17666#undef U_MASK
17667
17668#undef GET_CATEGORY
17669
17670#undef CAT_MASK
17671
17672#undef _UTRIE_INDEX_FROM_SUPP
17673
17674#undef _UTRIE_INDEX_RAW
17675
17676#undef _UTRIE_INDEX_FROM_CP
17677
17678#undef _UTRIE_GET
17679
17680#undef UTRIE_GET16
17681
17682#undef GET_PROPS
17683
17684//file_end
17685
17686 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
17687
17688 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
17689//_undefs.hpp
17690/*
17691未完成的elc解释器_share文件
17692由steve02081504与Alex0125设计、编写
17693转载时请在不对此文件做任何修改的同时注明出处
17694项目地址:https://github.com/ELC-lang/ELC
17695*/
17696/*
17697 ,??????????????????????????
17698 ????????????????????????????
17699 ?????????????????????????????+
17700 ?????+++++++++++++++++++++++++
17701 ?????+++++++++++++++++++++++++
17702 ??????++++++++++++++++++++++++
17703 ?????++
17704 ?????+++
17705 ??????+++IIIIIIIIIIIIIIIIII
17706 ?????+++++IIIIIIIIIIIIIIIIII
17707 ?????++++++++++++++++++++++++
17708 ??????+++++++++++++++++++++++:
17709 ?????++
17710 ?????+++
17711 ??????++
17712 ??????????????????????????????II
17713 ??????????????????????????????IIII
17714 ,?????????????????????????????IIIII+
17715 =???++++++++++++++++++++++++++III?
17716 ?++++++++++++++++++++++++++++I+
17717*/
17718
17719//defs at "_defs.hpp"
17720
17721#if defined(_MSC_VER)
17722 #pragma warning(pop)
17723#endif
17724//#undef suppress_msvc_warning
17725#undef disable_msvc_warning
17726#undef push_msvc_warning
17727#undef pop_msvc_warning
17728#undef push_and_disable_msvc_warning
17729#if defined(_MSC_VER)
17730 #pragma pack(pop)
17731#endif
17732#if defined(__GNUC__)
17733 #pragma GCC diagnostic pop
17734#endif
17735#if defined(_MSC_VER)
17736 #pragma pop_macro("new")
17737 #pragma pop_macro("delete")
17738 #pragma pop_macro("min")
17739 #pragma pop_macro("max")
17740 #pragma pop_macro("abs")
17741 #pragma pop_macro("export")
17742 #pragma pop_macro("rand")
17743 #pragma pop_macro("sqrt")
17744 #pragma pop_macro("type_info")
17745 #pragma pop_macro("elc")
17746#endif
17747
17748//
17749#if defined(ELC_VOID_NAME)
17750 #define void the_void
17751#endif
17752//
17753#if defined(ELC_PUBLIC_ALL)
17754 #undef protected
17755 #undef private
17756#endif
17757//
17758#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
17759 #define rand the_rand
17760#endif
17761
17762// #undef often_noexcept
17763#undef noexcept_as
17764#undef noexcept_as_auto
17765#undef constexpr_as
17766#undef constexpr_as_auto
17767
17768#undef using_method_from_base_t
17769#undef using_method_from_value
17770
17771#undef floop
17772#undef times
17773#undef debug_times
17774#undef enable_adl
17775
17776#undef re_declvalue
17777#undef re_decltype
17778
17779#undef declvalue
17780
17781#undef template_error
17782#undef template_error_of_type
17783#undef template_warning
17784
17785#undef type_info_of
17786#undef type_name_of
17787
17788#undef is_common_attribute
17789#undef is_special_attribute
17790
17791#undef has_attribute
17792#undef not_has_attribute
17793
17794#undef float_size_of
17795#undef bitnum_of
17796
17797#undef def_common_attribute_with_nothing
17798#undef def_special_attribute_with_nothing
17799
17800#undef common_attribute_t
17801#undef special_attribute_t
17802
17803#undef enable_if
17804#undef enabled_by_default
17805#undef disabled_by_default
17806#undef enable_if_not_ill_form
17807#undef enable_flag
17808
17809#undef was_an_ill_form
17810#undef was_an_ill_form_with_parameter
17811#undef was_not_an_ill_form
17812#undef was_not_an_ill_form_and_noexcept
17813#undef was_not_an_ill_form_with_parameter
17814
17815#undef recursive_λ
17816#undef get_recursive_λ_caller
17817#undef λ
17818#undef exλ
17819#undef λ_with_catch
17820#undef self_recursion
17821#undef λ_RLSRRS
17822#undef λ_inline
17823#undef λ_force_inline
17824
17825#undef MAGIC
17826
17827#undef nothing
17828
17829#undef elseif
17830#undef _big_than_
17831#undef _small_than_
17832
17833#if defined(_MSC_VER)
17834 #undef not
17835 #undef and
17836 #undef or
17837#endif
17838
17839#undef INTER_NAMESPACE
17840#undef BREAK_NAMESPACE
17841
17842#undef szie
17843#undef form
17844
17845#undef template_name
17846#undef type_name
17847
17848#undef not_in_debug
17849
17850#undef es
17851#undef ec
17852
17853#undef ELC_TEST_EVENTNAME
17854
17855#undef override_instance_struct
17856
17857#undef distinctive
17858
17859#undef force_inline
17860
17861#undef with_no_vtable
17862
17863#undef in_consteval
17864
17865#undef no_vtable_struct
17866#undef no_vtable_class
17867
17868//#undef get_elc_defs
17869
17870//file_end
17871
17872 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
17873 }
17874#endif
17875
17876//file_end
17877
17878 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
17879 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/decl_system_type.hpp"
17880//decl_system_type.hpp
17881/*
17882未完成的elc解释器_share文件
17883由steve02081504与Alex0125设计、编写
17884转载时请在不对此文件做任何修改的同时注明出处
17885项目地址:https://github.com/ELC-lang/ELC
17886*/
17887/*
17888 ,??????????????????????????
17889 ????????????????????????????
17890 ?????????????????????????????+
17891 ?????+++++++++++++++++++++++++
17892 ?????+++++++++++++++++++++++++
17893 ??????++++++++++++++++++++++++
17894 ?????++
17895 ?????+++
17896 ??????+++IIIIIIIIIIIIIIIIII
17897 ?????+++++IIIIIIIIIIIIIIIIII
17898 ?????++++++++++++++++++++++++
17899 ??????+++++++++++++++++++++++:
17900 ?????++
17901 ?????+++
17902 ??????++
17903 ??????????????????????????????II
17904 ??????????????????????????????IIII
17905 ,?????????????????????????????IIIII+
17906 =???++++++++++++++++++++++++++III?
17907 ?++++++++++++++++++++++++++++I+
17908*/
17909//copy&rewrite from steve02081504/steve.h
17910#define linux 2
17911#define windows 3
17912#define other 4
17913#if defined(__linux)||defined(__linux__)||defined(__gnu_linux__)
17914 #define SYSTEM_TYPE linux
17915#elif defined(_WIN32)||defined(__MINGW32__)||defined(__CYGWIN__)
17916 #define SYSTEM_TYPE windows
17917#else
17918 #define SYSTEM_TYPE other
17919#endif
17920#define ERROR_MSG_UNABLE_OS "Unable OS,edit this file on your own or contact ELC's producers."
17921
17922//file_end
17923
17924 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
17925 #if SYSTEM_TYPE == windows
17926 #define NOMINMAX
17927 #include <Windows.h>
17928 #include <debugapi.h>
17929 #endif
17932 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
17933//_defs.hpp
17934/*
17935未完成的elc解释器_share文件
17936由steve02081504与Alex0125设计、编写
17937转载时请在不对此文件做任何修改的同时注明出处
17938项目地址:https://github.com/ELC-lang/ELC
17939*/
17940/*
17941 ,??????????????????????????
17942 ????????????????????????????
17943 ?????????????????????????????+
17944 ?????+++++++++++++++++++++++++
17945 ?????+++++++++++++++++++++++++
17946 ??????++++++++++++++++++++++++
17947 ?????++
17948 ?????+++
17949 ??????+++IIIIIIIIIIIIIIIIII
17950 ?????+++++IIIIIIIIIIIIIIIIII
17951 ?????++++++++++++++++++++++++
17952 ??????+++++++++++++++++++++++:
17953 ?????++
17954 ?????+++
17955 ??????++
17956 ??????????????????????????????II
17957 ??????????????????????????????IIII
17958 ,?????????????????????????????IIIII+
17959 =???++++++++++++++++++++++++++III?
17960 ?++++++++++++++++++++++++++++I+
17961*/
17962
17963//undefs at "_undefs.hpp"
17964
17965#if defined(ELC_CODE_REALM)
17966 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
17967#endif
17968
17969//set ELC_WARNING_LEVEL default to 4(max)
17970#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
17971
17972#if defined(_MSC_VER)
17973 #pragma warning(push,ELC_WARNING_LEVEL)
17974 #pragma warning(disable:4099)//class与struct混用警告diss
17975 #pragma warning(disable:4584)//重复子类警告diss
17976 #pragma warning(disable:4250)//域控制继承警告diss
17977 #pragma warning(disable:26432)//不完全默认方法警告diss
17978 #pragma warning(disable:26435)//virtual override方法警告diss
17979 #pragma warning(disable:26481)//容器安利diss
17980 #pragma warning(disable:26446)//gsl::at安利diss
17981 #pragma warning(disable:26434)//方法覆盖警告diss
17982 #pragma warning(disable:26429)//gsl::not_null安利diss
17983 #pragma warning(disable:26471)//对void*进行static_cast安利diss
17984 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
17985 #pragma warning(disable:26473)//相同指针显式cast警告diss
17986 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
17987 #pragma warning(disable:26485)//数组作指针警告diss
17988 #pragma warning(disable:26490)//reinterpret_cast警告diss
17989 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
17990 #pragma warning(disable:26482)//非常数数组索引警告diss
17991 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
17992#endif
17993#if defined(__GNUC__)
17994 #pragma GCC diagnostic push
17995 #pragma GCC diagnostic warning "-Wall"//开启所有警告
17996 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
17997#endif
17998#if defined(_MSC_VER)
17999 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
18000 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
18001 #define push_msvc_warning() __pragma(warning(push))
18002 #define pop_msvc_warning() __pragma(warning(pop))
18003 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
18004#else
18005 //#define suppress_msvc_warning(...)
18006 #define disable_msvc_warning(...)
18007 #define push_msvc_warning()
18008 #define pop_msvc_warning()
18009 #define push_and_disable_msvc_warning(...)
18010#endif
18011#if defined(_MSC_VER)
18012 //push pack settings
18013 #pragma pack(push)
18014 #pragma pack()
18015#endif
18016#if defined(_MSC_VER)
18017 //push and undef common macros
18018 #pragma push_macro("new")
18019 #undef new
18020 #pragma push_macro("delete")
18021 #undef delete
18022 #pragma push_macro("min")
18023 #undef min
18024 #pragma push_macro("max")
18025 #undef max
18026 #pragma push_macro("abs")
18027 #undef abs
18028 #pragma push_macro("export")
18029 #undef export
18030 #pragma push_macro("rand")
18031 #undef rand
18032 #pragma push_macro("sqrt")
18033 #undef sqrt
18034 #pragma push_macro("type_info")
18035 #undef type_info
18036 #pragma push_macro("elc")
18037 #undef elc
18038#endif
18039//
18040#if defined(ELC_VOID_NAME)
18041 #undef void
18042#endif
18043//
18044#if defined(ELC_PUBLIC_ALL)
18045 #define protected public
18046 #define private public
18047#endif
18048//
18049#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
18050 #undef rand
18051#endif
18052
18053// #define often_noexcept
18054#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
18055#define noexcept_as_auto MAGIC//哦现在有了
18056#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
18057#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
18058
18059#define using_method_from_base_t(name,...) \
18060template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
18061auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
18062{\
18063 return base_t::name(forward<Args>(rest)...);\
18064}\
18065
18066#define using_method_from_value(name,value_name,...) \
18067template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
18068auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
18069{\
18070 return value_name.name(forward<Args>(rest)...);\
18071}\
18072
18073#define floop while(__builtin_is_my_dick_still_there())
18074#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
18075#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
18076#if defined(_MSC_VER) && _MSC_VER>=1935
18077 //@see https://developercommunity.visualstudio.com/t/10193638
18078 #define enable_adl(name) template<typename=void>void name()noexcept=delete
18079#else
18080 #define enable_adl(name) void name()noexcept=delete
18081#endif
18082
18083#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
18084#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
18085
18086#define declvalue(...) (::std::declval<__VA_ARGS__>())
18087
18089#define template_error(reason) static_assert(template_error_helper<T>,reason)
18091#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
18093#define template_warning(reason) template_warning_helper<T>(reason)
18094
18095//for type_info
18096#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
18097#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
18098
18099#define is_common_attribute(name) public attribute<T,name<T>>
18100#define is_special_attribute(name) public attribute<T,name>
18101
18102#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
18103#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
18104
18105//for float_size_t
18106#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
18107//bitnum_of
18108#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
18109
18110//for attribute
18111#define def_common_attribute_with_nothing(name) \
18112template<typename T>\
18113class name{}\
18114
18115#define def_special_attribute_with_nothing(name) \
18116class name{}\
18117
18118#define common_attribute_t template<class>class
18119#define special_attribute_t class
18120
18129#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
18131#define enabled_by_default class enable_state=void
18133#define disabled_by_default class enable_state= ::std::enable_if_t<false>
18135#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
18137#define enable_flag class enable_state
18138
18139#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
18140#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
18141#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
18142#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
18143#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
18144
18146#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
18148#define get_recursive_λ_caller(name,...) \
18149exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
18150 return name(name,Args...);\
18151}
18153#define λ []
18155#define exλ [&]
18157#define λ_with_catch(...) [__VA_ARGS__]
18159#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
18160//recursive_λ_self_referential_reserved_symbolname
18161#define λ_RLSRRS _my_jb_super_sb_name_
18162
18163#if defined(_MSC_VER) && !defined(__clang__)
18164 #define λ_inline [[msvc::forceinline]]
18165 #define λ_force_inline [[msvc::forceinline]]
18166#elif
18167 #define λ_inline [[gnu::always_inline]]
18168 #define λ_force_inline [[gnu::always_inline]]
18169#else
18170 #define λ_inline
18171 #define λ_force_inline
18172#endif
18173
18174#define MAGIC//ahh,ko no tenno da!
18175
18177#define nothing
18178
18180#define elseif else if
18182#define _big_than_ >
18184#define _small_than_ <
18185
18186#if defined(_MSC_VER)
18187 #define not !
18188 #define and &&
18189 #define or ||
18190#endif
18191
18193#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
18195#define BREAK_NAMESPACE }
18196
18198#define template_name template
18200#define type_name class
18201
18202#if defined(DEBUG) || defined(_DEBUG)
18203 #define not_in_debug 0
18204 #define in_debug 1
18205#else
18206 #define not_in_debug 1
18207 #define in_debug 0
18208#endif
18209
18210#define es U""
18211#define ec(ch) U ## ch
18212
18213#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
18214 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
18215#else
18216 #define ELC_TEST_EVENTNAME(name)
18217#endif
18218
18219#define override_instance_struct \
18220protected:\
18221 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
18222 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
18223 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
18224 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
18225 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
18226
18227#if defined(_MSC_VER) && !defined(__clang__)
18228 #define distinctive __declspec(dllexport)
18229#else
18230 #define distinctive
18231#endif
18232
18233#if defined(_MSC_VER) && !defined(__clang__)
18234 #define force_inline __forceinline
18235#elif defined(__GNUC__) || defined(__clang__)
18236 #define force_inline __attribute__((always_inline)) inline
18237#else
18238 #define force_inline inline
18239#endif
18240
18241#if defined(_MSC_VER) && !defined(__clang__)
18242 #define with_no_vtable __declspec(novtable)
18243#else
18244 #define with_no_vtable
18245#endif
18246
18247#define in_consteval (::std::is_constant_evaluated())
18248
18249#define no_vtable_struct struct with_no_vtable
18250#define no_vtable_class class with_no_vtable
18251
18252//#define get_elc_defs using namespace ::elc::defs
18253
18254//file_end
18255
18256 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
18257
18258 using namespace elc::defs;
18259
18261 #if SYSTEM_TYPE == windows
18262 HANDLE hConsole;
18263 //text_color
18264 WORD text_color;
18265 #elif SYSTEM_TYPE == linux
18266 //nothing
18267 #endif
18268 };
18269
18270 inline void Init_die_state(die_state&state)noexcept{
18271 #if SYSTEM_TYPE == windows
18272 state.hConsole=GetStdHandle(STD_ERROR_HANDLE);
18273 //chenge color to red
18274 CONSOLE_SCREEN_BUFFER_INFO csbi;
18275 GetConsoleScreenBufferInfo(state.hConsole,&csbi);
18276 state.text_color=csbi.wAttributes;
18277 SetConsoleTextAttribute(state.hConsole,FOREGROUND_RED);
18278 #elif SYSTEM_TYPE == linux
18279 //chenge color to red
18280 fputs("\033[31m",stderr);
18281 #endif
18282 }
18283
18284 inline void ConsoleLog(const die_state&state,string_view_t<char> str)noexcept{
18285 #if SYSTEM_TYPE == windows
18286 WriteConsoleA(state.hConsole,str.data(),(DWORD)str.size(),nullptr,nullptr);
18287 #elif SYSTEM_TYPE == linux
18288 fputs(str.data(),stderr);
18289 #endif
18290 }
18291 inline void ConsoleLog(const die_state&state,string_view_t<wchar_t> str)noexcept{
18292 #if SYSTEM_TYPE == windows
18293 WriteConsoleW(state.hConsole,str.data(),(DWORD)str.size(),nullptr,nullptr);
18294 #elif SYSTEM_TYPE == linux
18295 fputws(str.data(),stderr);
18296 #endif
18297 }
18298 inline void ConsoleLogEnd(const die_state&state)noexcept{
18299 #if SYSTEM_TYPE == windows
18300 FlushFileBuffers(state.hConsole);
18301 //chenge color back
18302 SetConsoleTextAttribute(state.hConsole,state.text_color);
18303 #elif SYSTEM_TYPE == linux
18304 fflush(stderr);
18305 //chenge color back
18306 fputs("\033[0m",stderr);
18307 #endif
18308 }
18309
18311 [[noreturn]]inline void die()noexcept{
18312 #if SYSTEM_TYPE == windows
18313 if(IsDebuggerPresent())
18314 __debugbreak();
18315 #endif
18316 #if defined(_WINMAIN_)
18317 ::MessageBoxW(NULL,L"\nelc died.",NULL,MB_ICONERROR);
18318 #endif
18319 die_state state;
18320 Init_die_state(state);
18321 ConsoleLog(state,"\nelc died.\n");
18322 ConsoleLogEnd(state);
18323 ::std::abort();
18324 }
18327 [[noreturn]]inline void die_with(string_view err_msg)noexcept{
18328 #if SYSTEM_TYPE == windows
18329 if(IsDebuggerPresent())
18330 __debugbreak();
18331 #endif
18332 if(err_msg){
18333 if constexpr(wchar_t_same_as_char16_t){
18334 push_and_disable_msvc_warning(26494);//未初始化警告diss
18335 wchar_t err_msg_in_wchar[2048];
18337 const auto size=char_set::utf32_to_utf16((char16_t*)err_msg_in_wchar,err_msg).processed_output().size();
18338 err_msg_in_wchar[size]=L'\0';
18339 #if defined(_WINMAIN_)
18340 ::MessageBoxW(NULL,err_msg_in_wchar,NULL,MB_ICONERROR);
18341 #endif
18342 die_state state;
18343 Init_die_state(state);
18344 ConsoleLog(state,L"\nelc died because:\n");
18345 ConsoleLog(state,err_msg_in_wchar);
18346 ConsoleLog(state,L"\n");
18347 ConsoleLogEnd(state);
18348 }
18349 elseif constexpr(wchar_t_same_as_char_t){
18350 const string_view_t<wchar_t> err_msg_in_wchar{(const wchar_t*)err_msg.data(),err_msg.size()};
18351 #if defined(_WINMAIN_)
18352 ::MessageBoxW(NULL,err_msg_in_wchar.data(),NULL,MB_ICONERROR);
18353 #endif
18354 die_state state;
18355 Init_die_state(state);
18356 ConsoleLog(state,L"\nelc died because:\n");
18357 ConsoleLog(state,err_msg_in_wchar);
18358 ConsoleLog(state,L"\n");
18359 ConsoleLogEnd(state);
18360 }
18361 else{
18362 ::std::mbstate_t stat{};
18363 push_and_disable_msvc_warning(26494);//未初始化警告diss
18364 char err_msg_in_char[2048];
18365 char* err_msg_write = err_msg_in_char;
18366 size_t s;
18368 for(auto c:err_msg){
18369 s = ::std::c32rtomb(err_msg_write, c, &stat);
18370 push_and_disable_msvc_warning(26475)//强转警告diss
18371 if(s == npos)
18372 die();
18374 err_msg_write += s;
18375 }
18376 *err_msg_write = '\0';
18377 #if defined(_WINMAIN_)
18378 ::MessageBoxA(NULL,err_msg_in_char,NULL,MB_ICONERROR);
18379 #endif
18380 die_state state;
18381 Init_die_state(state);
18382 ConsoleLog(state,"\nelc died because:\n");
18383 ConsoleLog(state,err_msg_in_char);
18384 ConsoleLog(state,"\n");
18385 ConsoleLogEnd(state);
18386 }
18387 }
18388 else
18389 die();
18390 ::std::abort();
18391 }
18392
18393 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
18394//_undefs.hpp
18395/*
18396未完成的elc解释器_share文件
18397由steve02081504与Alex0125设计、编写
18398转载时请在不对此文件做任何修改的同时注明出处
18399项目地址:https://github.com/ELC-lang/ELC
18400*/
18401/*
18402 ,??????????????????????????
18403 ????????????????????????????
18404 ?????????????????????????????+
18405 ?????+++++++++++++++++++++++++
18406 ?????+++++++++++++++++++++++++
18407 ??????++++++++++++++++++++++++
18408 ?????++
18409 ?????+++
18410 ??????+++IIIIIIIIIIIIIIIIII
18411 ?????+++++IIIIIIIIIIIIIIIIII
18412 ?????++++++++++++++++++++++++
18413 ??????+++++++++++++++++++++++:
18414 ?????++
18415 ?????+++
18416 ??????++
18417 ??????????????????????????????II
18418 ??????????????????????????????IIII
18419 ,?????????????????????????????IIIII+
18420 =???++++++++++++++++++++++++++III?
18421 ?++++++++++++++++++++++++++++I+
18422*/
18423
18424//defs at "_defs.hpp"
18425
18426#if defined(_MSC_VER)
18427 #pragma warning(pop)
18428#endif
18429//#undef suppress_msvc_warning
18430#undef disable_msvc_warning
18431#undef push_msvc_warning
18432#undef pop_msvc_warning
18433#undef push_and_disable_msvc_warning
18434#if defined(_MSC_VER)
18435 #pragma pack(pop)
18436#endif
18437#if defined(__GNUC__)
18438 #pragma GCC diagnostic pop
18439#endif
18440#if defined(_MSC_VER)
18441 #pragma pop_macro("new")
18442 #pragma pop_macro("delete")
18443 #pragma pop_macro("min")
18444 #pragma pop_macro("max")
18445 #pragma pop_macro("abs")
18446 #pragma pop_macro("export")
18447 #pragma pop_macro("rand")
18448 #pragma pop_macro("sqrt")
18449 #pragma pop_macro("type_info")
18450 #pragma pop_macro("elc")
18451#endif
18452
18453//
18454#if defined(ELC_VOID_NAME)
18455 #define void the_void
18456#endif
18457//
18458#if defined(ELC_PUBLIC_ALL)
18459 #undef protected
18460 #undef private
18461#endif
18462//
18463#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
18464 #define rand the_rand
18465#endif
18466
18467// #undef often_noexcept
18468#undef noexcept_as
18469#undef noexcept_as_auto
18470#undef constexpr_as
18471#undef constexpr_as_auto
18472
18473#undef using_method_from_base_t
18474#undef using_method_from_value
18475
18476#undef floop
18477#undef times
18478#undef debug_times
18479#undef enable_adl
18480
18481#undef re_declvalue
18482#undef re_decltype
18483
18484#undef declvalue
18485
18486#undef template_error
18487#undef template_error_of_type
18488#undef template_warning
18489
18490#undef type_info_of
18491#undef type_name_of
18492
18493#undef is_common_attribute
18494#undef is_special_attribute
18495
18496#undef has_attribute
18497#undef not_has_attribute
18498
18499#undef float_size_of
18500#undef bitnum_of
18501
18502#undef def_common_attribute_with_nothing
18503#undef def_special_attribute_with_nothing
18504
18505#undef common_attribute_t
18506#undef special_attribute_t
18507
18508#undef enable_if
18509#undef enabled_by_default
18510#undef disabled_by_default
18511#undef enable_if_not_ill_form
18512#undef enable_flag
18513
18514#undef was_an_ill_form
18515#undef was_an_ill_form_with_parameter
18516#undef was_not_an_ill_form
18517#undef was_not_an_ill_form_and_noexcept
18518#undef was_not_an_ill_form_with_parameter
18519
18520#undef recursive_λ
18521#undef get_recursive_λ_caller
18522#undef λ
18523#undef exλ
18524#undef λ_with_catch
18525#undef self_recursion
18526#undef λ_RLSRRS
18527#undef λ_inline
18528#undef λ_force_inline
18529
18530#undef MAGIC
18531
18532#undef nothing
18533
18534#undef elseif
18535#undef _big_than_
18536#undef _small_than_
18537
18538#if defined(_MSC_VER)
18539 #undef not
18540 #undef and
18541 #undef or
18542#endif
18543
18544#undef INTER_NAMESPACE
18545#undef BREAK_NAMESPACE
18546
18547#undef szie
18548#undef form
18549
18550#undef template_name
18551#undef type_name
18552
18553#undef not_in_debug
18554
18555#undef es
18556#undef ec
18557
18558#undef ELC_TEST_EVENTNAME
18559
18560#undef override_instance_struct
18561
18562#undef distinctive
18563
18564#undef force_inline
18565
18566#undef with_no_vtable
18567
18568#undef in_consteval
18569
18570#undef no_vtable_struct
18571#undef no_vtable_class
18572
18573//#undef get_elc_defs
18574
18575//file_end
18576
18577 #line 186 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
18578 }
18579 //
18580 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/undef_decl_system_type.hpp"
18581//undef_decl_system_type.hpp
18582/*
18583未完成的elc解释器_share文件
18584由steve02081504与Alex0125设计、编写
18585转载时请在不对此文件做任何修改的同时注明出处
18586项目地址:https://github.com/ELC-lang/ELC
18587*/
18588/*
18589 ,??????????????????????????
18590 ????????????????????????????
18591 ?????????????????????????????+
18592 ?????+++++++++++++++++++++++++
18593 ?????+++++++++++++++++++++++++
18594 ??????++++++++++++++++++++++++
18595 ?????++
18596 ?????+++
18597 ??????+++IIIIIIIIIIIIIIIIII
18598 ?????+++++IIIIIIIIIIIIIIIIII
18599 ?????++++++++++++++++++++++++
18600 ??????+++++++++++++++++++++++:
18601 ?????++
18602 ?????+++
18603 ??????++
18604 ??????????????????????????????II
18605 ??????????????????????????????IIII
18606 ,?????????????????????????????IIIII+
18607 =???++++++++++++++++++++++++++III?
18608 ?++++++++++++++++++++++++++++I+
18609*/
18610//copy&rewrite from steve02081504/evest.h
18611#undef linux
18612#undef windows
18613#undef other
18614#undef SYSTEM_TYPE
18615#undef ERROR_MSG_UNABLE_OS
18616
18617//file_end
18618
18619 #line 189 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/die.hpp"
18620
18621 namespace elc::defs{
18622 using elc::APIs::die::die;
18623 using elc::APIs::die::die_with;
18624 }
18625#endif
18626
18627//file_end
18628
18629#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
18630//using at function_t.name
18631#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/function_name.hpp"
18632//function_name.hpp
18633/*
18634未完成的elc解释器_share文件
18635由steve02081504与Alex0125设计、编写
18636转载时请在不对此文件做任何修改的同时注明出处
18637项目地址:https://github.com/ELC-lang/ELC
18638*/
18639/*
18640 ,??????????????????????????
18641 ????????????????????????????
18642 ?????????????????????????????+
18643 ?????+++++++++++++++++++++++++
18644 ?????+++++++++++++++++++++++++
18645 ??????++++++++++++++++++++++++
18646 ?????++
18647 ?????+++
18648 ??????+++IIIIIIIIIIIIIIIIII
18649 ?????+++++IIIIIIIIIIIIIIIIII
18650 ?????++++++++++++++++++++++++
18651 ??????+++++++++++++++++++++++:
18652 ?????++
18653 ?????+++
18654 ??????++
18655 ??????????????????????????????II
18656 ??????????????????????????????IIII
18657 ,?????????????????????????????IIIII+
18658 =???++++++++++++++++++++++++++III?
18659 ?++++++++++++++++++++++++++++I+
18660*/
18661/*
18662APIs说明
18663elc依赖的基础函数.
18664调整这些,实现快速移植,快速优化与行为自定义.
18665*/
18666#if !defined(ELC_APIS_function_name)
18667 #define ELC_APIS_function_name
18668 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
18669//base_defs
18670//at namespace ::
18671/*@
18672未完成的elc解释器include文件
18673由steve02081504与Alex0125设计、编写
18674转载时请在不对此文件做任何修改的同时注明出处
18675项目地址:https://github.com/ELC-lang/ELC
18676*/
18677/*
18678 ,??????????????????????????
18679 ????????????????????????????
18680 ?????????????????????????????+
18681 ?????+++++++++++++++++++++++++
18682 ?????+++++++++++++++++++++++++
18683 ??????++++++++++++++++++++++++
18684 ?????++
18685 ?????+++
18686 ??????+++IIIIIIIIIIIIIIIIII
18687 ?????+++++IIIIIIIIIIIIIIIIII
18688 ?????++++++++++++++++++++++++
18689 ??????+++++++++++++++++++++++:
18690 ?????++
18691 ?????+++
18692 ??????++
18693 ??????????????????????????????II
18694 ??????????????????????????????IIII
18695 ,?????????????????????????????IIIII+
18696 =???++++++++++++++++++++++++++III?
18697 ?++++++++++++++++++++++++++++I+
18698*/
18699#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
18700//pre_checks.hpp
18701/*
18702未完成的elc解释器_share文件
18703由steve02081504与Alex0125设计、编写
18704转载时请在不对此文件做任何修改的同时注明出处
18705项目地址:https://github.com/ELC-lang/ELC
18706*/
18707/*
18708 ,??????????????????????????
18709 ????????????????????????????
18710 ?????????????????????????????+
18711 ?????+++++++++++++++++++++++++
18712 ?????+++++++++++++++++++++++++
18713 ??????++++++++++++++++++++++++
18714 ?????++
18715 ?????+++
18716 ??????+++IIIIIIIIIIIIIIIIII
18717 ?????+++++IIIIIIIIIIIIIIIIII
18718 ?????++++++++++++++++++++++++
18719 ??????+++++++++++++++++++++++:
18720 ?????++
18721 ?????+++
18722 ??????++
18723 ??????????????????????????????II
18724 ??????????????????????????????IIII
18725 ,?????????????????????????????IIIII+
18726 =???++++++++++++++++++++++++++III?
18727 ?++++++++++++++++++++++++++++I+
18728*/
18729//__cplusplus needs 20+
18730#if !defined(__cplusplus)||__cplusplus<202002L
18731 //if msvc, check _MSVC_LANG
18732 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
18733 //ok
18734 #else
18735 #error "elc files needs c++20 or higher"
18736 #endif
18737#endif
18738
18739//check if the compiler is msvc
18740#if defined(_MSC_VER)
18741 //check if _CPPRTTI
18742 #if !defined(_CPPRTTI)
18743 #error "elc files needs rtti"
18744 #endif
18745 //check _MSC_VER at last 1932
18746 #if _MSC_VER<1932
18747 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
18748 #endif
18749#endif
18750
18751//file_end
18752
18753#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
18754#line 57 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
18755
18756//file_end
18757
18758 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/function_name.hpp"
18759 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/decl_system_type.hpp"
18760//decl_system_type.hpp
18761/*
18762未完成的elc解释器_share文件
18763由steve02081504与Alex0125设计、编写
18764转载时请在不对此文件做任何修改的同时注明出处
18765项目地址:https://github.com/ELC-lang/ELC
18766*/
18767/*
18768 ,??????????????????????????
18769 ????????????????????????????
18770 ?????????????????????????????+
18771 ?????+++++++++++++++++++++++++
18772 ?????+++++++++++++++++++++++++
18773 ??????++++++++++++++++++++++++
18774 ?????++
18775 ?????+++
18776 ??????+++IIIIIIIIIIIIIIIIII
18777 ?????+++++IIIIIIIIIIIIIIIIII
18778 ?????++++++++++++++++++++++++
18779 ??????+++++++++++++++++++++++:
18780 ?????++
18781 ?????+++
18782 ??????++
18783 ??????????????????????????????II
18784 ??????????????????????????????IIII
18785 ,?????????????????????????????IIIII+
18786 =???++++++++++++++++++++++++++III?
18787 ?++++++++++++++++++++++++++++I+
18788*/
18789//copy&rewrite from steve02081504/steve.h
18790#define linux 2
18791#define windows 3
18792#define other 4
18793#if defined(__linux)||defined(__linux__)||defined(__gnu_linux__)
18794 #define SYSTEM_TYPE linux
18795#elif defined(_WIN32)||defined(__MINGW32__)||defined(__CYGWIN__)
18796 #define SYSTEM_TYPE windows
18797#else
18798 #define SYSTEM_TYPE other
18799#endif
18800#define ERROR_MSG_UNABLE_OS "Unable OS,edit this file on your own or contact ELC's producers."
18801
18802//file_end
18803
18804 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/function_name.hpp"
18805 #if SYSTEM_TYPE == linux
18806 #include <dlfcn.h>
18807 #elif SYSTEM_TYPE == windows
18808 #define NOMINMAX
18809 #include <Windows.h>
18810 #include <dbghelp.h>
18811 #pragma comment(lib,"dbghelp.lib")
18812 #else
18813 #error ERROR_MSG_UNABLE_OS
18814 #endif
18815 #undef other
18817 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
18818//_defs.hpp
18819/*
18820未完成的elc解释器_share文件
18821由steve02081504与Alex0125设计、编写
18822转载时请在不对此文件做任何修改的同时注明出处
18823项目地址:https://github.com/ELC-lang/ELC
18824*/
18825/*
18826 ,??????????????????????????
18827 ????????????????????????????
18828 ?????????????????????????????+
18829 ?????+++++++++++++++++++++++++
18830 ?????+++++++++++++++++++++++++
18831 ??????++++++++++++++++++++++++
18832 ?????++
18833 ?????+++
18834 ??????+++IIIIIIIIIIIIIIIIII
18835 ?????+++++IIIIIIIIIIIIIIIIII
18836 ?????++++++++++++++++++++++++
18837 ??????+++++++++++++++++++++++:
18838 ?????++
18839 ?????+++
18840 ??????++
18841 ??????????????????????????????II
18842 ??????????????????????????????IIII
18843 ,?????????????????????????????IIIII+
18844 =???++++++++++++++++++++++++++III?
18845 ?++++++++++++++++++++++++++++I+
18846*/
18847
18848//undefs at "_undefs.hpp"
18849
18850#if defined(ELC_CODE_REALM)
18851 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
18852#endif
18853
18854//set ELC_WARNING_LEVEL default to 4(max)
18855#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
18856
18857#if defined(_MSC_VER)
18858 #pragma warning(push,ELC_WARNING_LEVEL)
18859 #pragma warning(disable:4099)//class与struct混用警告diss
18860 #pragma warning(disable:4584)//重复子类警告diss
18861 #pragma warning(disable:4250)//域控制继承警告diss
18862 #pragma warning(disable:26432)//不完全默认方法警告diss
18863 #pragma warning(disable:26435)//virtual override方法警告diss
18864 #pragma warning(disable:26481)//容器安利diss
18865 #pragma warning(disable:26446)//gsl::at安利diss
18866 #pragma warning(disable:26434)//方法覆盖警告diss
18867 #pragma warning(disable:26429)//gsl::not_null安利diss
18868 #pragma warning(disable:26471)//对void*进行static_cast安利diss
18869 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
18870 #pragma warning(disable:26473)//相同指针显式cast警告diss
18871 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
18872 #pragma warning(disable:26485)//数组作指针警告diss
18873 #pragma warning(disable:26490)//reinterpret_cast警告diss
18874 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
18875 #pragma warning(disable:26482)//非常数数组索引警告diss
18876 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
18877#endif
18878#if defined(__GNUC__)
18879 #pragma GCC diagnostic push
18880 #pragma GCC diagnostic warning "-Wall"//开启所有警告
18881 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
18882#endif
18883#if defined(_MSC_VER)
18884 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
18885 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
18886 #define push_msvc_warning() __pragma(warning(push))
18887 #define pop_msvc_warning() __pragma(warning(pop))
18888 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
18889#else
18890 //#define suppress_msvc_warning(...)
18891 #define disable_msvc_warning(...)
18892 #define push_msvc_warning()
18893 #define pop_msvc_warning()
18894 #define push_and_disable_msvc_warning(...)
18895#endif
18896#if defined(_MSC_VER)
18897 //push pack settings
18898 #pragma pack(push)
18899 #pragma pack()
18900#endif
18901#if defined(_MSC_VER)
18902 //push and undef common macros
18903 #pragma push_macro("new")
18904 #undef new
18905 #pragma push_macro("delete")
18906 #undef delete
18907 #pragma push_macro("min")
18908 #undef min
18909 #pragma push_macro("max")
18910 #undef max
18911 #pragma push_macro("abs")
18912 #undef abs
18913 #pragma push_macro("export")
18914 #undef export
18915 #pragma push_macro("rand")
18916 #undef rand
18917 #pragma push_macro("sqrt")
18918 #undef sqrt
18919 #pragma push_macro("type_info")
18920 #undef type_info
18921 #pragma push_macro("elc")
18922 #undef elc
18923#endif
18924//
18925#if defined(ELC_VOID_NAME)
18926 #undef void
18927#endif
18928//
18929#if defined(ELC_PUBLIC_ALL)
18930 #define protected public
18931 #define private public
18932#endif
18933//
18934#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
18935 #undef rand
18936#endif
18937
18938// #define often_noexcept
18939#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
18940#define noexcept_as_auto MAGIC//哦现在有了
18941#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
18942#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
18943
18944#define using_method_from_base_t(name,...) \
18945template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
18946auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
18947{\
18948 return base_t::name(forward<Args>(rest)...);\
18949}\
18950
18951#define using_method_from_value(name,value_name,...) \
18952template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
18953auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
18954{\
18955 return value_name.name(forward<Args>(rest)...);\
18956}\
18957
18958#define floop while(__builtin_is_my_dick_still_there())
18959#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
18960#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
18961#if defined(_MSC_VER) && _MSC_VER>=1935
18962 //@see https://developercommunity.visualstudio.com/t/10193638
18963 #define enable_adl(name) template<typename=void>void name()noexcept=delete
18964#else
18965 #define enable_adl(name) void name()noexcept=delete
18966#endif
18967
18968#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
18969#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
18970
18971#define declvalue(...) (::std::declval<__VA_ARGS__>())
18972
18974#define template_error(reason) static_assert(template_error_helper<T>,reason)
18976#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
18978#define template_warning(reason) template_warning_helper<T>(reason)
18979
18980//for type_info
18981#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
18982#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
18983
18984#define is_common_attribute(name) public attribute<T,name<T>>
18985#define is_special_attribute(name) public attribute<T,name>
18986
18987#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
18988#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
18989
18990//for float_size_t
18991#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
18992//bitnum_of
18993#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
18994
18995//for attribute
18996#define def_common_attribute_with_nothing(name) \
18997template<typename T>\
18998class name{}\
18999
19000#define def_special_attribute_with_nothing(name) \
19001class name{}\
19002
19003#define common_attribute_t template<class>class
19004#define special_attribute_t class
19005
19014#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
19016#define enabled_by_default class enable_state=void
19018#define disabled_by_default class enable_state= ::std::enable_if_t<false>
19020#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
19022#define enable_flag class enable_state
19023
19024#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
19025#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
19026#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
19027#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
19028#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
19029
19031#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
19033#define get_recursive_λ_caller(name,...) \
19034exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
19035 return name(name,Args...);\
19036}
19038#define λ []
19040#define exλ [&]
19042#define λ_with_catch(...) [__VA_ARGS__]
19044#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
19045//recursive_λ_self_referential_reserved_symbolname
19046#define λ_RLSRRS _my_jb_super_sb_name_
19047
19048#if defined(_MSC_VER) && !defined(__clang__)
19049 #define λ_inline [[msvc::forceinline]]
19050 #define λ_force_inline [[msvc::forceinline]]
19051#elif
19052 #define λ_inline [[gnu::always_inline]]
19053 #define λ_force_inline [[gnu::always_inline]]
19054#else
19055 #define λ_inline
19056 #define λ_force_inline
19057#endif
19058
19059#define MAGIC//ahh,ko no tenno da!
19060
19062#define nothing
19063
19065#define elseif else if
19067#define _big_than_ >
19069#define _small_than_ <
19070
19071#if defined(_MSC_VER)
19072 #define not !
19073 #define and &&
19074 #define or ||
19075#endif
19076
19078#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
19080#define BREAK_NAMESPACE }
19081
19083#define template_name template
19085#define type_name class
19086
19087#if defined(DEBUG) || defined(_DEBUG)
19088 #define not_in_debug 0
19089 #define in_debug 1
19090#else
19091 #define not_in_debug 1
19092 #define in_debug 0
19093#endif
19094
19095#define es U""
19096#define ec(ch) U ## ch
19097
19098#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
19099 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
19100#else
19101 #define ELC_TEST_EVENTNAME(name)
19102#endif
19103
19104#define override_instance_struct \
19105protected:\
19106 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
19107 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
19108 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
19109 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
19110 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
19111
19112#if defined(_MSC_VER) && !defined(__clang__)
19113 #define distinctive __declspec(dllexport)
19114#else
19115 #define distinctive
19116#endif
19117
19118#if defined(_MSC_VER) && !defined(__clang__)
19119 #define force_inline __forceinline
19120#elif defined(__GNUC__) || defined(__clang__)
19121 #define force_inline __attribute__((always_inline)) inline
19122#else
19123 #define force_inline inline
19124#endif
19125
19126#if defined(_MSC_VER) && !defined(__clang__)
19127 #define with_no_vtable __declspec(novtable)
19128#else
19129 #define with_no_vtable
19130#endif
19131
19132#define in_consteval (::std::is_constant_evaluated())
19133
19134#define no_vtable_struct struct with_no_vtable
19135#define no_vtable_class class with_no_vtable
19136
19137//#define get_elc_defs using namespace ::elc::defs
19138
19139//file_end
19140
19141 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/function_name.hpp"
19142
19143 using namespace ::elc::defs;//get def
19144
19145 #if SYSTEM_TYPE == linux
19146 struct function_name_t:demangle_name_t{
19147 using base_t=demangle_name_t;
19148 using base_t::base_t;
19149 };
19150 #elif SYSTEM_TYPE == windows
19151 //windows需要额外复制一份
19152 push_and_disable_msvc_warning(26408);//malloc/free警告diss
19153 struct function_name_t:string_view_t<char>{
19154 using base_t=string_view_t<char>;
19155 string_view_t<char> copy_name(string_view_t<char>name)noexcept{
19156 auto tmp=(char*)::std::malloc(name.size()+1);
19157 if(tmp) {
19158 memcpy(tmp, name.data(), name.size());
19159 tmp[name.size()] = 0;
19160 return string_view_t<char>{tmp, name.size()};
19161 }
19162 else
19163 return base_t{nullptr,0};
19164 }
19165 string_view_t<char> demangle_name(string_view_t<char>name)noexcept{
19166 push_and_disable_msvc_warning(26494);//未初始化警告diss
19167 char tmp[1024];
19169 if(name.starts_with("@ILT+")){
19170 const auto lit_end_pos=name.find('(');
19171 if(lit_end_pos==base_t::npos)
19172 return copy_name(name);
19173 name=name.substr(lit_end_pos+1);
19174 name=name.substr(size_t{0},name.size()-1);
19175 memcpy(tmp,name.data(),name.size());
19176 tmp[name.size()]=0;
19177 name=string_view_t<char>{tmp,name.size()};
19178 }
19179 const auto len=UnDecorateSymbolName(name.data(),tmp,1024,UNDNAME_COMPLETE);
19180 if(len)
19181 return copy_name(string_view_t<char>{tmp,len});
19182 else
19183 return copy_name(name);
19184 }
19185 function_name_t(const char*str,ULONG len)noexcept:base_t(demangle_name(base_t{str,len})){}
19186 function_name_t(const function_name_t&other)noexcept:base_t(copy_name(other)){}
19187 function_name_t(function_name_t&&other)noexcept:base_t(nullptr,0){
19188 swap(other,*this);
19189 }
19190 ~function_name_t()noexcept{
19191 ::std::free((void*)base_t::data());
19192 }
19193 function_name_t&operator=(const function_name_t&other)noexcept{
19194 function_name_t tmp(other);
19195 swap(tmp,*this);
19196 return *this;
19197 }
19198 function_name_t&operator=(function_name_t&&other)noexcept{
19199 swap(other,*this);
19200 return *this;
19201 }
19202 };
19204 //一个额外的全局对象用于SymInitialize和SymCleanup
19205 struct symbol_init_t{
19206 bool _inited;
19207 symbol_init_t()noexcept{
19208 SymSetOptions(SYMOPT_DEFERRED_LOADS);
19209 _inited=SymInitialize(GetCurrentProcess(), nullptr, true);
19210 }
19211 ~symbol_init_t()noexcept{
19212 if(_inited)
19213 SymCleanup(GetCurrentProcess());
19214 }
19215 };
19216 inline extern symbol_init_t symbol_init{};
19217 #endif
19218 [[nodiscard]]inline function_name_t get_function_name(void*ptr)noexcept{
19219 #if SYSTEM_TYPE==windows
19220 //SymFromAddr (dbghelp.h)
19221 struct symbol_info_t:SYMBOL_INFO{
19222 char name_addtional_space[MAX_SYM_NAME];
19223 };
19224 symbol_info_t symbol;
19225 symbol.SizeOfStruct=sizeof(SYMBOL_INFO);
19226 symbol.MaxNameLen=MAX_SYM_NAME;
19227 DWORD64 displacement;
19228 if(SymFromAddr(GetCurrentProcess(),(DWORD64)ptr,&displacement,&symbol))
19229 return function_name_t(symbol.Name,symbol.NameLen);
19230 else
19231 return function_name_t("unknown",7);
19232 #elif SYSTEM_TYPE==linux
19233 //dladdr (dlfcn.h)
19234 Dl_info info;
19235 if(dladdr(ptr,&info))
19236 return function_name_t(info.dli_sname);
19237 else
19238 return function_name_t("unknown");
19239 #endif
19240 }
19241
19242 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
19243//_undefs.hpp
19244/*
19245未完成的elc解释器_share文件
19246由steve02081504与Alex0125设计、编写
19247转载时请在不对此文件做任何修改的同时注明出处
19248项目地址:https://github.com/ELC-lang/ELC
19249*/
19250/*
19251 ,??????????????????????????
19252 ????????????????????????????
19253 ?????????????????????????????+
19254 ?????+++++++++++++++++++++++++
19255 ?????+++++++++++++++++++++++++
19256 ??????++++++++++++++++++++++++
19257 ?????++
19258 ?????+++
19259 ??????+++IIIIIIIIIIIIIIIIII
19260 ?????+++++IIIIIIIIIIIIIIIIII
19261 ?????++++++++++++++++++++++++
19262 ??????+++++++++++++++++++++++:
19263 ?????++
19264 ?????+++
19265 ??????++
19266 ??????????????????????????????II
19267 ??????????????????????????????IIII
19268 ,?????????????????????????????IIIII+
19269 =???++++++++++++++++++++++++++III?
19270 ?++++++++++++++++++++++++++++I+
19271*/
19272
19273//defs at "_defs.hpp"
19274
19275#if defined(_MSC_VER)
19276 #pragma warning(pop)
19277#endif
19278//#undef suppress_msvc_warning
19279#undef disable_msvc_warning
19280#undef push_msvc_warning
19281#undef pop_msvc_warning
19282#undef push_and_disable_msvc_warning
19283#if defined(_MSC_VER)
19284 #pragma pack(pop)
19285#endif
19286#if defined(__GNUC__)
19287 #pragma GCC diagnostic pop
19288#endif
19289#if defined(_MSC_VER)
19290 #pragma pop_macro("new")
19291 #pragma pop_macro("delete")
19292 #pragma pop_macro("min")
19293 #pragma pop_macro("max")
19294 #pragma pop_macro("abs")
19295 #pragma pop_macro("export")
19296 #pragma pop_macro("rand")
19297 #pragma pop_macro("sqrt")
19298 #pragma pop_macro("type_info")
19299 #pragma pop_macro("elc")
19300#endif
19301
19302//
19303#if defined(ELC_VOID_NAME)
19304 #define void the_void
19305#endif
19306//
19307#if defined(ELC_PUBLIC_ALL)
19308 #undef protected
19309 #undef private
19310#endif
19311//
19312#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
19313 #define rand the_rand
19314#endif
19315
19316// #undef often_noexcept
19317#undef noexcept_as
19318#undef noexcept_as_auto
19319#undef constexpr_as
19320#undef constexpr_as_auto
19321
19322#undef using_method_from_base_t
19323#undef using_method_from_value
19324
19325#undef floop
19326#undef times
19327#undef debug_times
19328#undef enable_adl
19329
19330#undef re_declvalue
19331#undef re_decltype
19332
19333#undef declvalue
19334
19335#undef template_error
19336#undef template_error_of_type
19337#undef template_warning
19338
19339#undef type_info_of
19340#undef type_name_of
19341
19342#undef is_common_attribute
19343#undef is_special_attribute
19344
19345#undef has_attribute
19346#undef not_has_attribute
19347
19348#undef float_size_of
19349#undef bitnum_of
19350
19351#undef def_common_attribute_with_nothing
19352#undef def_special_attribute_with_nothing
19353
19354#undef common_attribute_t
19355#undef special_attribute_t
19356
19357#undef enable_if
19358#undef enabled_by_default
19359#undef disabled_by_default
19360#undef enable_if_not_ill_form
19361#undef enable_flag
19362
19363#undef was_an_ill_form
19364#undef was_an_ill_form_with_parameter
19365#undef was_not_an_ill_form
19366#undef was_not_an_ill_form_and_noexcept
19367#undef was_not_an_ill_form_with_parameter
19368
19369#undef recursive_λ
19370#undef get_recursive_λ_caller
19371#undef λ
19372#undef exλ
19373#undef λ_with_catch
19374#undef self_recursion
19375#undef λ_RLSRRS
19376#undef λ_inline
19377#undef λ_force_inline
19378
19379#undef MAGIC
19380
19381#undef nothing
19382
19383#undef elseif
19384#undef _big_than_
19385#undef _small_than_
19386
19387#if defined(_MSC_VER)
19388 #undef not
19389 #undef and
19390 #undef or
19391#endif
19392
19393#undef INTER_NAMESPACE
19394#undef BREAK_NAMESPACE
19395
19396#undef szie
19397#undef form
19398
19399#undef template_name
19400#undef type_name
19401
19402#undef not_in_debug
19403
19404#undef es
19405#undef ec
19406
19407#undef ELC_TEST_EVENTNAME
19408
19409#undef override_instance_struct
19410
19411#undef distinctive
19412
19413#undef force_inline
19414
19415#undef with_no_vtable
19416
19417#undef in_consteval
19418
19419#undef no_vtable_struct
19420#undef no_vtable_class
19421
19422//#undef get_elc_defs
19423
19424//file_end
19425
19426 #line 152 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/function_name.hpp"
19427 }
19428 //
19429 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/undef_decl_system_type.hpp"
19430//undef_decl_system_type.hpp
19431/*
19432未完成的elc解释器_share文件
19433由steve02081504与Alex0125设计、编写
19434转载时请在不对此文件做任何修改的同时注明出处
19435项目地址:https://github.com/ELC-lang/ELC
19436*/
19437/*
19438 ,??????????????????????????
19439 ????????????????????????????
19440 ?????????????????????????????+
19441 ?????+++++++++++++++++++++++++
19442 ?????+++++++++++++++++++++++++
19443 ??????++++++++++++++++++++++++
19444 ?????++
19445 ?????+++
19446 ??????+++IIIIIIIIIIIIIIIIII
19447 ?????+++++IIIIIIIIIIIIIIIIII
19448 ?????++++++++++++++++++++++++
19449 ??????+++++++++++++++++++++++:
19450 ?????++
19451 ?????+++
19452 ??????++
19453 ??????????????????????????????II
19454 ??????????????????????????????IIII
19455 ,?????????????????????????????IIIII+
19456 =???++++++++++++++++++++++++++III?
19457 ?++++++++++++++++++++++++++++I+
19458*/
19459//copy&rewrite from steve02081504/evest.h
19460#undef linux
19461#undef windows
19462#undef other
19463#undef SYSTEM_TYPE
19464#undef ERROR_MSG_UNABLE_OS
19465
19466//file_end
19467
19468 #line 155 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/function_name.hpp"
19469 namespace elc::defs{
19470 using namespace elc::APIs::function_name;
19471 }
19472#endif
19473
19474//file_end
19475
19476#line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
19477//include locale:自然语言相关的字符串
19478//strings
19479#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
19480//using.hpp
19481/*
19482未完成的elc解释器_share文件
19483由steve02081504与Alex0125设计、编写
19484转载时请在不对此文件做任何修改的同时注明出处
19485项目地址:https://github.com/ELC-lang/ELC
19486*/
19487/*
19488 ,??????????????????????????
19489 ????????????????????????????
19490 ?????????????????????????????+
19491 ?????+++++++++++++++++++++++++
19492 ?????+++++++++++++++++++++++++
19493 ??????++++++++++++++++++++++++
19494 ?????++
19495 ?????+++
19496 ??????+++IIIIIIIIIIIIIIIIII
19497 ?????+++++IIIIIIIIIIIIIIIIII
19498 ?????++++++++++++++++++++++++
19499 ??????+++++++++++++++++++++++:
19500 ?????++
19501 ?????+++
19502 ??????++
19503 ??????????????????????????????II
19504 ??????????????????????????????IIII
19505 ,?????????????????????????????IIIII+
19506 =???++++++++++++++++++++++++++III?
19507 ?++++++++++++++++++++++++++++I+
19508*/
19509/*
19510locale说明
19511elc使用的字符串.
19512调整这些,实现快速本地化.
19513*/
19514#if !defined(ELC_LOCALE)
19515 #define ELC_LOCALE
19516 #include <locale>
19517 //
19518 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
19519//base_defs
19520//at namespace ::
19521/*@
19522未完成的elc解释器include文件
19523由steve02081504与Alex0125设计、编写
19524转载时请在不对此文件做任何修改的同时注明出处
19525项目地址:https://github.com/ELC-lang/ELC
19526*/
19527/*
19528 ,??????????????????????????
19529 ????????????????????????????
19530 ?????????????????????????????+
19531 ?????+++++++++++++++++++++++++
19532 ?????+++++++++++++++++++++++++
19533 ??????++++++++++++++++++++++++
19534 ?????++
19535 ?????+++
19536 ??????+++IIIIIIIIIIIIIIIIII
19537 ?????+++++IIIIIIIIIIIIIIIIII
19538 ?????++++++++++++++++++++++++
19539 ??????+++++++++++++++++++++++:
19540 ?????++
19541 ?????+++
19542 ??????++
19543 ??????????????????????????????II
19544 ??????????????????????????????IIII
19545 ,?????????????????????????????IIIII+
19546 =???++++++++++++++++++++++++++III?
19547 ?++++++++++++++++++++++++++++I+
19548*/
19549#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
19550//pre_checks.hpp
19551/*
19552未完成的elc解释器_share文件
19553由steve02081504与Alex0125设计、编写
19554转载时请在不对此文件做任何修改的同时注明出处
19555项目地址:https://github.com/ELC-lang/ELC
19556*/
19557/*
19558 ,??????????????????????????
19559 ????????????????????????????
19560 ?????????????????????????????+
19561 ?????+++++++++++++++++++++++++
19562 ?????+++++++++++++++++++++++++
19563 ??????++++++++++++++++++++++++
19564 ?????++
19565 ?????+++
19566 ??????+++IIIIIIIIIIIIIIIIII
19567 ?????+++++IIIIIIIIIIIIIIIIII
19568 ?????++++++++++++++++++++++++
19569 ??????+++++++++++++++++++++++:
19570 ?????++
19571 ?????+++
19572 ??????++
19573 ??????????????????????????????II
19574 ??????????????????????????????IIII
19575 ,?????????????????????????????IIIII+
19576 =???++++++++++++++++++++++++++III?
19577 ?++++++++++++++++++++++++++++I+
19578*/
19579//__cplusplus needs 20+
19580#if !defined(__cplusplus)||__cplusplus<202002L
19581 //if msvc, check _MSVC_LANG
19582 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
19583 //ok
19584 #else
19585 #error "elc files needs c++20 or higher"
19586 #endif
19587#endif
19588
19589//check if the compiler is msvc
19590#if defined(_MSC_VER)
19591 //check if _CPPRTTI
19592 #if !defined(_CPPRTTI)
19593 #error "elc files needs rtti"
19594 #endif
19595 //check _MSC_VER at last 1932
19596 #if _MSC_VER<1932
19597 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
19598 #endif
19599#endif
19600
19601//file_end
19602
19603#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
19604#line 57 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
19605
19606//file_end
19607
19608 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
19609 //
19610 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
19611//_defs.hpp
19612/*
19613未完成的elc解释器_share文件
19614由steve02081504与Alex0125设计、编写
19615转载时请在不对此文件做任何修改的同时注明出处
19616项目地址:https://github.com/ELC-lang/ELC
19617*/
19618/*
19619 ,??????????????????????????
19620 ????????????????????????????
19621 ?????????????????????????????+
19622 ?????+++++++++++++++++++++++++
19623 ?????+++++++++++++++++++++++++
19624 ??????++++++++++++++++++++++++
19625 ?????++
19626 ?????+++
19627 ??????+++IIIIIIIIIIIIIIIIII
19628 ?????+++++IIIIIIIIIIIIIIIIII
19629 ?????++++++++++++++++++++++++
19630 ??????+++++++++++++++++++++++:
19631 ?????++
19632 ?????+++
19633 ??????++
19634 ??????????????????????????????II
19635 ??????????????????????????????IIII
19636 ,?????????????????????????????IIIII+
19637 =???++++++++++++++++++++++++++III?
19638 ?++++++++++++++++++++++++++++I+
19639*/
19640
19641//undefs at "_undefs.hpp"
19642
19643#if defined(ELC_CODE_REALM)
19644 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
19645#endif
19646
19647//set ELC_WARNING_LEVEL default to 4(max)
19648#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
19649
19650#if defined(_MSC_VER)
19651 #pragma warning(push,ELC_WARNING_LEVEL)
19652 #pragma warning(disable:4099)//class与struct混用警告diss
19653 #pragma warning(disable:4584)//重复子类警告diss
19654 #pragma warning(disable:4250)//域控制继承警告diss
19655 #pragma warning(disable:26432)//不完全默认方法警告diss
19656 #pragma warning(disable:26435)//virtual override方法警告diss
19657 #pragma warning(disable:26481)//容器安利diss
19658 #pragma warning(disable:26446)//gsl::at安利diss
19659 #pragma warning(disable:26434)//方法覆盖警告diss
19660 #pragma warning(disable:26429)//gsl::not_null安利diss
19661 #pragma warning(disable:26471)//对void*进行static_cast安利diss
19662 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
19663 #pragma warning(disable:26473)//相同指针显式cast警告diss
19664 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
19665 #pragma warning(disable:26485)//数组作指针警告diss
19666 #pragma warning(disable:26490)//reinterpret_cast警告diss
19667 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
19668 #pragma warning(disable:26482)//非常数数组索引警告diss
19669 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
19670#endif
19671#if defined(__GNUC__)
19672 #pragma GCC diagnostic push
19673 #pragma GCC diagnostic warning "-Wall"//开启所有警告
19674 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
19675#endif
19676#if defined(_MSC_VER)
19677 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
19678 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
19679 #define push_msvc_warning() __pragma(warning(push))
19680 #define pop_msvc_warning() __pragma(warning(pop))
19681 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
19682#else
19683 //#define suppress_msvc_warning(...)
19684 #define disable_msvc_warning(...)
19685 #define push_msvc_warning()
19686 #define pop_msvc_warning()
19687 #define push_and_disable_msvc_warning(...)
19688#endif
19689#if defined(_MSC_VER)
19690 //push pack settings
19691 #pragma pack(push)
19692 #pragma pack()
19693#endif
19694#if defined(_MSC_VER)
19695 //push and undef common macros
19696 #pragma push_macro("new")
19697 #undef new
19698 #pragma push_macro("delete")
19699 #undef delete
19700 #pragma push_macro("min")
19701 #undef min
19702 #pragma push_macro("max")
19703 #undef max
19704 #pragma push_macro("abs")
19705 #undef abs
19706 #pragma push_macro("export")
19707 #undef export
19708 #pragma push_macro("rand")
19709 #undef rand
19710 #pragma push_macro("sqrt")
19711 #undef sqrt
19712 #pragma push_macro("type_info")
19713 #undef type_info
19714 #pragma push_macro("elc")
19715 #undef elc
19716#endif
19717//
19718#if defined(ELC_VOID_NAME)
19719 #undef void
19720#endif
19721//
19722#if defined(ELC_PUBLIC_ALL)
19723 #define protected public
19724 #define private public
19725#endif
19726//
19727#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
19728 #undef rand
19729#endif
19730
19731// #define often_noexcept
19732#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
19733#define noexcept_as_auto MAGIC//哦现在有了
19734#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
19735#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
19736
19737#define using_method_from_base_t(name,...) \
19738template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
19739auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
19740{\
19741 return base_t::name(forward<Args>(rest)...);\
19742}\
19743
19744#define using_method_from_value(name,value_name,...) \
19745template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
19746auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
19747{\
19748 return value_name.name(forward<Args>(rest)...);\
19749}\
19750
19751#define floop while(__builtin_is_my_dick_still_there())
19752#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
19753#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
19754#if defined(_MSC_VER) && _MSC_VER>=1935
19755 //@see https://developercommunity.visualstudio.com/t/10193638
19756 #define enable_adl(name) template<typename=void>void name()noexcept=delete
19757#else
19758 #define enable_adl(name) void name()noexcept=delete
19759#endif
19760
19761#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
19762#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
19763
19764#define declvalue(...) (::std::declval<__VA_ARGS__>())
19765
19767#define template_error(reason) static_assert(template_error_helper<T>,reason)
19769#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
19771#define template_warning(reason) template_warning_helper<T>(reason)
19772
19773//for type_info
19774#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
19775#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
19776
19777#define is_common_attribute(name) public attribute<T,name<T>>
19778#define is_special_attribute(name) public attribute<T,name>
19779
19780#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
19781#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
19782
19783//for float_size_t
19784#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
19785//bitnum_of
19786#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
19787
19788//for attribute
19789#define def_common_attribute_with_nothing(name) \
19790template<typename T>\
19791class name{}\
19792
19793#define def_special_attribute_with_nothing(name) \
19794class name{}\
19795
19796#define common_attribute_t template<class>class
19797#define special_attribute_t class
19798
19807#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
19809#define enabled_by_default class enable_state=void
19811#define disabled_by_default class enable_state= ::std::enable_if_t<false>
19813#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
19815#define enable_flag class enable_state
19816
19817#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
19818#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
19819#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
19820#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
19821#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
19822
19824#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
19826#define get_recursive_λ_caller(name,...) \
19827exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
19828 return name(name,Args...);\
19829}
19831#define λ []
19833#define exλ [&]
19835#define λ_with_catch(...) [__VA_ARGS__]
19837#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
19838//recursive_λ_self_referential_reserved_symbolname
19839#define λ_RLSRRS _my_jb_super_sb_name_
19840
19841#if defined(_MSC_VER) && !defined(__clang__)
19842 #define λ_inline [[msvc::forceinline]]
19843 #define λ_force_inline [[msvc::forceinline]]
19844#elif
19845 #define λ_inline [[gnu::always_inline]]
19846 #define λ_force_inline [[gnu::always_inline]]
19847#else
19848 #define λ_inline
19849 #define λ_force_inline
19850#endif
19851
19852#define MAGIC//ahh,ko no tenno da!
19853
19855#define nothing
19856
19858#define elseif else if
19860#define _big_than_ >
19862#define _small_than_ <
19863
19864#if defined(_MSC_VER)
19865 #define not !
19866 #define and &&
19867 #define or ||
19868#endif
19869
19871#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
19873#define BREAK_NAMESPACE }
19874
19876#define template_name template
19878#define type_name class
19879
19880#if defined(DEBUG) || defined(_DEBUG)
19881 #define not_in_debug 0
19882 #define in_debug 1
19883#else
19884 #define not_in_debug 1
19885 #define in_debug 0
19886#endif
19887
19888#define es U""
19889#define ec(ch) U ## ch
19890
19891#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
19892 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
19893#else
19894 #define ELC_TEST_EVENTNAME(name)
19895#endif
19896
19897#define override_instance_struct \
19898protected:\
19899 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
19900 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
19901 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
19902 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
19903 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
19904
19905#if defined(_MSC_VER) && !defined(__clang__)
19906 #define distinctive __declspec(dllexport)
19907#else
19908 #define distinctive
19909#endif
19910
19911#if defined(_MSC_VER) && !defined(__clang__)
19912 #define force_inline __forceinline
19913#elif defined(__GNUC__) || defined(__clang__)
19914 #define force_inline __attribute__((always_inline)) inline
19915#else
19916 #define force_inline inline
19917#endif
19918
19919#if defined(_MSC_VER) && !defined(__clang__)
19920 #define with_no_vtable __declspec(novtable)
19921#else
19922 #define with_no_vtable
19923#endif
19924
19925#define in_consteval (::std::is_constant_evaluated())
19926
19927#define no_vtable_struct struct with_no_vtable
19928#define no_vtable_class class with_no_vtable
19929
19930//#define get_elc_defs using namespace ::elc::defs
19931
19932//file_end
19933
19934 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
19935 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/zh_cn.hpp"
19936//zh_cn.hpp
19937/*
19938未完成的elc解释器_share文件
19939由steve02081504与Alex0125设计、编写
19940转载时请在不对此文件做任何修改的同时注明出处
19941项目地址:https://github.com/ELC-lang/ELC
19942*/
19943/*
19944 ,??????????????????????????
19945 ????????????????????????????
19946 ?????????????????????????????+
19947 ?????+++++++++++++++++++++++++
19948 ?????+++++++++++++++++++++++++
19949 ??????++++++++++++++++++++++++
19950 ?????++
19951 ?????+++
19952 ??????+++IIIIIIIIIIIIIIIIII
19953 ?????+++++IIIIIIIIIIIIIIIIII
19954 ?????++++++++++++++++++++++++
19955 ??????+++++++++++++++++++++++:
19956 ?????++
19957 ?????+++
19958 ??????++
19959 ??????????????????????????????II
19960 ??????????????????????????????IIII
19961 ,?????????????????????????????IIIII+
19962 =???++++++++++++++++++++++++++III?
19963 ?++++++++++++++++++++++++++++I+
19964*/
19965/*
19966locale说明
19967elc使用的字符串.
19968调整这些,实现快速本地化.
19969*/
19971
19972}
19974 inline namespace gc{
19975 inline constexpr auto gc_fail=es"gc失败"_constexpr_str;
19976 inline constexpr auto empty_gc_method=es"gc方法为空时gc被调用"_constexpr_str;
19977 }
19978 inline namespace code_convert{
19979 inline constexpr auto setlocale_error=es"setlocale出错"_constexpr_str;
19980 inline constexpr auto code_convert_error=es"编码转换出错"_constexpr_str;
19981 }
19982 inline namespace lib_load{
19983 inline constexpr auto null_lib=es"访问null处的lib对象"_constexpr_str;
19984 }
19985 inline namespace exception{
19986 inline constexpr auto unknow_error=es"未知错误"_constexpr_str;
19987 inline constexpr auto core_runtime_internal_helper_leak=es"未知错误"_constexpr_str;
19988 }
19989 inline namespace base_read{
19990 inline constexpr auto ending_of_expr_beyond_expectations=es"表达式的结尾超出预期"_constexpr_str;
19991 inline constexpr auto expr_incomplete=es"表达式未完成"_constexpr_str;
19992 inline constexpr auto symbol_is_undefined=es"此符号未定义"_constexpr_str;
19993 inline constexpr auto expr_too_outrageous=es"表达式过于离谱"_constexpr_str;
19994 }
19995 inline namespace package_symbol_loader{
19996 inline constexpr auto load_failed=es"无法加载的package_symbol_loader"_constexpr_str;
19997 inline constexpr auto load_interface_failed=es"package_symbol_loader缺失load_interface"_constexpr_str;
19998 }
19999 inline namespace streams{
20000 inline constexpr auto stream_read_error=es"流读取错误"_constexpr_str;
20001 inline constexpr auto stream_write_error=es"流写入错误"_constexpr_str;
20002 }
20003 inline namespace die{
20004 //TODO
20005 }
20006}
20007
20008//file_end
20009
20010 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
20011 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
20012//_undefs.hpp
20013/*
20014未完成的elc解释器_share文件
20015由steve02081504与Alex0125设计、编写
20016转载时请在不对此文件做任何修改的同时注明出处
20017项目地址:https://github.com/ELC-lang/ELC
20018*/
20019/*
20020 ,??????????????????????????
20021 ????????????????????????????
20022 ?????????????????????????????+
20023 ?????+++++++++++++++++++++++++
20024 ?????+++++++++++++++++++++++++
20025 ??????++++++++++++++++++++++++
20026 ?????++
20027 ?????+++
20028 ??????+++IIIIIIIIIIIIIIIIII
20029 ?????+++++IIIIIIIIIIIIIIIIII
20030 ?????++++++++++++++++++++++++
20031 ??????+++++++++++++++++++++++:
20032 ?????++
20033 ?????+++
20034 ??????++
20035 ??????????????????????????????II
20036 ??????????????????????????????IIII
20037 ,?????????????????????????????IIIII+
20038 =???++++++++++++++++++++++++++III?
20039 ?++++++++++++++++++++++++++++I+
20040*/
20041
20042//defs at "_defs.hpp"
20043
20044#if defined(_MSC_VER)
20045 #pragma warning(pop)
20046#endif
20047//#undef suppress_msvc_warning
20048#undef disable_msvc_warning
20049#undef push_msvc_warning
20050#undef pop_msvc_warning
20051#undef push_and_disable_msvc_warning
20052#if defined(_MSC_VER)
20053 #pragma pack(pop)
20054#endif
20055#if defined(__GNUC__)
20056 #pragma GCC diagnostic pop
20057#endif
20058#if defined(_MSC_VER)
20059 #pragma pop_macro("new")
20060 #pragma pop_macro("delete")
20061 #pragma pop_macro("min")
20062 #pragma pop_macro("max")
20063 #pragma pop_macro("abs")
20064 #pragma pop_macro("export")
20065 #pragma pop_macro("rand")
20066 #pragma pop_macro("sqrt")
20067 #pragma pop_macro("type_info")
20068 #pragma pop_macro("elc")
20069#endif
20070
20071//
20072#if defined(ELC_VOID_NAME)
20073 #define void the_void
20074#endif
20075//
20076#if defined(ELC_PUBLIC_ALL)
20077 #undef protected
20078 #undef private
20079#endif
20080//
20081#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
20082 #define rand the_rand
20083#endif
20084
20085// #undef often_noexcept
20086#undef noexcept_as
20087#undef noexcept_as_auto
20088#undef constexpr_as
20089#undef constexpr_as_auto
20090
20091#undef using_method_from_base_t
20092#undef using_method_from_value
20093
20094#undef floop
20095#undef times
20096#undef debug_times
20097#undef enable_adl
20098
20099#undef re_declvalue
20100#undef re_decltype
20101
20102#undef declvalue
20103
20104#undef template_error
20105#undef template_error_of_type
20106#undef template_warning
20107
20108#undef type_info_of
20109#undef type_name_of
20110
20111#undef is_common_attribute
20112#undef is_special_attribute
20113
20114#undef has_attribute
20115#undef not_has_attribute
20116
20117#undef float_size_of
20118#undef bitnum_of
20119
20120#undef def_common_attribute_with_nothing
20121#undef def_special_attribute_with_nothing
20122
20123#undef common_attribute_t
20124#undef special_attribute_t
20125
20126#undef enable_if
20127#undef enabled_by_default
20128#undef disabled_by_default
20129#undef enable_if_not_ill_form
20130#undef enable_flag
20131
20132#undef was_an_ill_form
20133#undef was_an_ill_form_with_parameter
20134#undef was_not_an_ill_form
20135#undef was_not_an_ill_form_and_noexcept
20136#undef was_not_an_ill_form_with_parameter
20137
20138#undef recursive_λ
20139#undef get_recursive_λ_caller
20140#undef λ
20141#undef exλ
20142#undef λ_with_catch
20143#undef self_recursion
20144#undef λ_RLSRRS
20145#undef λ_inline
20146#undef λ_force_inline
20147
20148#undef MAGIC
20149
20150#undef nothing
20151
20152#undef elseif
20153#undef _big_than_
20154#undef _small_than_
20155
20156#if defined(_MSC_VER)
20157 #undef not
20158 #undef and
20159 #undef or
20160#endif
20161
20162#undef INTER_NAMESPACE
20163#undef BREAK_NAMESPACE
20164
20165#undef szie
20166#undef form
20167
20168#undef template_name
20169#undef type_name
20170
20171#undef not_in_debug
20172
20173#undef es
20174#undef ec
20175
20176#undef ELC_TEST_EVENTNAME
20177
20178#undef override_instance_struct
20179
20180#undef distinctive
20181
20182#undef force_inline
20183
20184#undef with_no_vtable
20185
20186#undef in_consteval
20187
20188#undef no_vtable_struct
20189#undef no_vtable_class
20190
20191//#undef get_elc_defs
20192
20193//file_end
20194
20195 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
20196 //
20197#endif
20198
20199//file_end
20200
20201#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
20202
20203namespace elc::defs{ //在elc::defs中定义内容
20204 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
20205//_defs.hpp
20206/*
20207未完成的elc解释器basic文件
20208由steve02081504与Alex0125设计、编写
20209转载时请在不对此文件做任何修改的同时注明出处
20210项目地址:https://github.com/ELC-lang/ELC
20211*/
20212/*
20213 ,??????????????????????????
20214 ????????????????????????????
20215 ?????????????????????????????+
20216 ?????+++++++++++++++++++++++++
20217 ?????+++++++++++++++++++++++++
20218 ??????++++++++++++++++++++++++
20219 ?????++
20220 ?????+++
20221 ??????+++IIIIIIIIIIIIIIIIII
20222 ?????+++++IIIIIIIIIIIIIIIIII
20223 ?????++++++++++++++++++++++++
20224 ??????+++++++++++++++++++++++:
20225 ?????++
20226 ?????+++
20227 ??????++
20228 ??????????????????????????????II
20229 ??????????????????????????????IIII
20230 ,?????????????????????????????IIIII+
20231 =???++++++++++++++++++++++++++III?
20232 ?++++++++++++++++++++++++++++I+
20233*/
20234#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
20235//_defs.hpp
20236/*
20237未完成的elc解释器_share文件
20238由steve02081504与Alex0125设计、编写
20239转载时请在不对此文件做任何修改的同时注明出处
20240项目地址:https://github.com/ELC-lang/ELC
20241*/
20242/*
20243 ,??????????????????????????
20244 ????????????????????????????
20245 ?????????????????????????????+
20246 ?????+++++++++++++++++++++++++
20247 ?????+++++++++++++++++++++++++
20248 ??????++++++++++++++++++++++++
20249 ?????++
20250 ?????+++
20251 ??????+++IIIIIIIIIIIIIIIIII
20252 ?????+++++IIIIIIIIIIIIIIIIII
20253 ?????++++++++++++++++++++++++
20254 ??????+++++++++++++++++++++++:
20255 ?????++
20256 ?????+++
20257 ??????++
20258 ??????????????????????????????II
20259 ??????????????????????????????IIII
20260 ,?????????????????????????????IIIII+
20261 =???++++++++++++++++++++++++++III?
20262 ?++++++++++++++++++++++++++++I+
20263*/
20264
20265//undefs at "_undefs.hpp"
20266
20267#if defined(ELC_CODE_REALM)
20268 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
20269#endif
20270
20271//set ELC_WARNING_LEVEL default to 4(max)
20272#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
20273
20274#if defined(_MSC_VER)
20275 #pragma warning(push,ELC_WARNING_LEVEL)
20276 #pragma warning(disable:4099)//class与struct混用警告diss
20277 #pragma warning(disable:4584)//重复子类警告diss
20278 #pragma warning(disable:4250)//域控制继承警告diss
20279 #pragma warning(disable:26432)//不完全默认方法警告diss
20280 #pragma warning(disable:26435)//virtual override方法警告diss
20281 #pragma warning(disable:26481)//容器安利diss
20282 #pragma warning(disable:26446)//gsl::at安利diss
20283 #pragma warning(disable:26434)//方法覆盖警告diss
20284 #pragma warning(disable:26429)//gsl::not_null安利diss
20285 #pragma warning(disable:26471)//对void*进行static_cast安利diss
20286 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
20287 #pragma warning(disable:26473)//相同指针显式cast警告diss
20288 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
20289 #pragma warning(disable:26485)//数组作指针警告diss
20290 #pragma warning(disable:26490)//reinterpret_cast警告diss
20291 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
20292 #pragma warning(disable:26482)//非常数数组索引警告diss
20293 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
20294#endif
20295#if defined(__GNUC__)
20296 #pragma GCC diagnostic push
20297 #pragma GCC diagnostic warning "-Wall"//开启所有警告
20298 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
20299#endif
20300#if defined(_MSC_VER)
20301 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
20302 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
20303 #define push_msvc_warning() __pragma(warning(push))
20304 #define pop_msvc_warning() __pragma(warning(pop))
20305 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
20306#else
20307 //#define suppress_msvc_warning(...)
20308 #define disable_msvc_warning(...)
20309 #define push_msvc_warning()
20310 #define pop_msvc_warning()
20311 #define push_and_disable_msvc_warning(...)
20312#endif
20313#if defined(_MSC_VER)
20314 //push pack settings
20315 #pragma pack(push)
20316 #pragma pack()
20317#endif
20318#if defined(_MSC_VER)
20319 //push and undef common macros
20320 #pragma push_macro("new")
20321 #undef new
20322 #pragma push_macro("delete")
20323 #undef delete
20324 #pragma push_macro("min")
20325 #undef min
20326 #pragma push_macro("max")
20327 #undef max
20328 #pragma push_macro("abs")
20329 #undef abs
20330 #pragma push_macro("export")
20331 #undef export
20332 #pragma push_macro("rand")
20333 #undef rand
20334 #pragma push_macro("sqrt")
20335 #undef sqrt
20336 #pragma push_macro("type_info")
20337 #undef type_info
20338 #pragma push_macro("elc")
20339 #undef elc
20340#endif
20341//
20342#if defined(ELC_VOID_NAME)
20343 #undef void
20344#endif
20345//
20346#if defined(ELC_PUBLIC_ALL)
20347 #define protected public
20348 #define private public
20349#endif
20350//
20351#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
20352 #undef rand
20353#endif
20354
20355// #define often_noexcept
20356#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
20357#define noexcept_as_auto MAGIC//哦现在有了
20358#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
20359#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
20360
20361#define using_method_from_base_t(name,...) \
20362template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
20363auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
20364{\
20365 return base_t::name(forward<Args>(rest)...);\
20366}\
20367
20368#define using_method_from_value(name,value_name,...) \
20369template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
20370auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
20371{\
20372 return value_name.name(forward<Args>(rest)...);\
20373}\
20374
20375#define floop while(__builtin_is_my_dick_still_there())
20376#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
20377#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
20378#if defined(_MSC_VER) && _MSC_VER>=1935
20379 //@see https://developercommunity.visualstudio.com/t/10193638
20380 #define enable_adl(name) template<typename=void>void name()noexcept=delete
20381#else
20382 #define enable_adl(name) void name()noexcept=delete
20383#endif
20384
20385#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
20386#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
20387
20388#define declvalue(...) (::std::declval<__VA_ARGS__>())
20389
20391#define template_error(reason) static_assert(template_error_helper<T>,reason)
20393#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
20395#define template_warning(reason) template_warning_helper<T>(reason)
20396
20397//for type_info
20398#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
20399#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
20400
20401#define is_common_attribute(name) public attribute<T,name<T>>
20402#define is_special_attribute(name) public attribute<T,name>
20403
20404#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
20405#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
20406
20407//for float_size_t
20408#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
20409//bitnum_of
20410#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
20411
20412//for attribute
20413#define def_common_attribute_with_nothing(name) \
20414template<typename T>\
20415class name{}\
20416
20417#define def_special_attribute_with_nothing(name) \
20418class name{}\
20419
20420#define common_attribute_t template<class>class
20421#define special_attribute_t class
20422
20431#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
20433#define enabled_by_default class enable_state=void
20435#define disabled_by_default class enable_state= ::std::enable_if_t<false>
20437#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
20439#define enable_flag class enable_state
20440
20441#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
20442#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
20443#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
20444#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
20445#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
20446
20448#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
20450#define get_recursive_λ_caller(name,...) \
20451exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
20452 return name(name,Args...);\
20453}
20455#define λ []
20457#define exλ [&]
20459#define λ_with_catch(...) [__VA_ARGS__]
20461#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
20462//recursive_λ_self_referential_reserved_symbolname
20463#define λ_RLSRRS _my_jb_super_sb_name_
20464
20465#if defined(_MSC_VER) && !defined(__clang__)
20466 #define λ_inline [[msvc::forceinline]]
20467 #define λ_force_inline [[msvc::forceinline]]
20468#elif
20469 #define λ_inline [[gnu::always_inline]]
20470 #define λ_force_inline [[gnu::always_inline]]
20471#else
20472 #define λ_inline
20473 #define λ_force_inline
20474#endif
20475
20476#define MAGIC//ahh,ko no tenno da!
20477
20479#define nothing
20480
20482#define elseif else if
20484#define _big_than_ >
20486#define _small_than_ <
20487
20488#if defined(_MSC_VER)
20489 #define not !
20490 #define and &&
20491 #define or ||
20492#endif
20493
20495#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
20497#define BREAK_NAMESPACE }
20498
20500#define template_name template
20502#define type_name class
20503
20504#if defined(DEBUG) || defined(_DEBUG)
20505 #define not_in_debug 0
20506 #define in_debug 1
20507#else
20508 #define not_in_debug 1
20509 #define in_debug 0
20510#endif
20511
20512#define es U""
20513#define ec(ch) U ## ch
20514
20515#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
20516 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
20517#else
20518 #define ELC_TEST_EVENTNAME(name)
20519#endif
20520
20521#define override_instance_struct \
20522protected:\
20523 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
20524 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
20525 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
20526 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
20527 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
20528
20529#if defined(_MSC_VER) && !defined(__clang__)
20530 #define distinctive __declspec(dllexport)
20531#else
20532 #define distinctive
20533#endif
20534
20535#if defined(_MSC_VER) && !defined(__clang__)
20536 #define force_inline __forceinline
20537#elif defined(__GNUC__) || defined(__clang__)
20538 #define force_inline __attribute__((always_inline)) inline
20539#else
20540 #define force_inline inline
20541#endif
20542
20543#if defined(_MSC_VER) && !defined(__clang__)
20544 #define with_no_vtable __declspec(novtable)
20545#else
20546 #define with_no_vtable
20547#endif
20548
20549#define in_consteval (::std::is_constant_evaluated())
20550
20551#define no_vtable_struct struct with_no_vtable
20552#define no_vtable_class class with_no_vtable
20553
20554//#define get_elc_defs using namespace ::elc::defs
20555
20556//file_end
20557
20558#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
20559
20560//file_end
20561
20562 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
20563
20564 namespace memory{
20565 //依赖list
20566 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
20567//_body.hpp
20568//at namespace elc::defs::memory
20569/*
20570未完成的elc解释器base文件
20571由steve02081504与Alex0125设计、编写
20572转载时请在不对此文件做任何修改的同时注明出处
20573项目地址:https://github.com/ELC-lang/ELC
20574*/
20575/*
20576 ,??????????????????????????
20577 ????????????????????????????
20578 ?????????????????????????????+
20579 ?????+++++++++++++++++++++++++
20580 ?????+++++++++++++++++++++++++
20581 ??????++++++++++++++++++++++++
20582 ?????++
20583 ?????+++
20584 ??????+++IIIIIIIIIIIIIIIIII
20585 ?????+++++IIIIIIIIIIIIIIIIII
20586 ?????++++++++++++++++++++++++
20587 ??????+++++++++++++++++++++++:
20588 ?????++
20589 ?????+++
20590 ??????++
20591 ??????????????????????????????II
20592 ??????????????????????????????IIII
20593 ,?????????????????????????????IIIII+
20594 =???++++++++++++++++++++++++++III?
20595 ?++++++++++++++++++++++++++++I+
20596*/
20597#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/_body.hpp"
20598//_body.hpp
20599//at namespace elc::defs::memory
20600/*
20601未完成的elc解释器base文件
20602由steve02081504与Alex0125设计、编写
20603转载时请在不对此文件做任何修改的同时注明出处
20604项目地址:https://github.com/ELC-lang/ELC
20605*/
20606/*
20607 ,??????????????????????????
20608 ????????????????????????????
20609 ?????????????????????????????+
20610 ?????+++++++++++++++++++++++++
20611 ?????+++++++++++++++++++++++++
20612 ??????++++++++++++++++++++++++
20613 ?????++
20614 ?????+++
20615 ??????+++IIIIIIIIIIIIIIIIII
20616 ?????+++++IIIIIIIIIIIIIIIIII
20617 ?????++++++++++++++++++++++++
20618 ??????+++++++++++++++++++++++:
20619 ?????++
20620 ?????+++
20621 ??????++
20622 ??????????????????????????????II
20623 ??????????????????????????????IIII
20624 ,?????????????????????????????IIIII+
20625 =???++++++++++++++++++++++++++III?
20626 ?++++++++++++++++++++++++++++I+
20627*/
20628#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/defs.hpp"
20629//defs.hpp
20630//at namespace elc::defs::memory
20631/*
20632未完成的elc解释器base文件
20633由steve02081504与Alex0125设计、编写
20634转载时请在不对此文件做任何修改的同时注明出处
20635项目地址:https://github.com/ELC-lang/ELC
20636*/
20637/*
20638 ,??????????????????????????
20639 ????????????????????????????
20640 ?????????????????????????????+
20641 ?????+++++++++++++++++++++++++
20642 ?????+++++++++++++++++++++++++
20643 ??????++++++++++++++++++++++++
20644 ?????++
20645 ?????+++
20646 ??????+++IIIIIIIIIIIIIIIIII
20647 ?????+++++IIIIIIIIIIIIIIIIII
20648 ?????++++++++++++++++++++++++
20649 ??????+++++++++++++++++++++++:
20650 ?????++
20651 ?????+++
20652 ??????++
20653 ??????????????????????????????II
20654 ??????????????????????????????IIII
20655 ,?????????????????????????????IIIII+
20656 =???++++++++++++++++++++++++++III?
20657 ?++++++++++++++++++++++++++++I+
20658*/
20660namespace gc_n{
20662 void gc_for_alloc()noexcept;
20663}
20665namespace alloc_n{
20666 using ::elc::defs::memory::gc_n::gc_for_alloc;
20667
20668 //允许自定义对象的alloc/free/realloc/get_size_of_alloc方法:为pool留的后门(大概)
20669 //这里是缺省时的默认方法定义
20670 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/default_method/defs.hpp"
20671//defs.hpp
20672//at namespace elc::defs::memory::alloc_n
20673/*
20674未完成的elc解释器base文件
20675由steve02081504与Alex0125设计、编写
20676转载时请在不对此文件做任何修改的同时注明出处
20677项目地址:https://github.com/ELC-lang/ELC
20678*/
20679/*
20680 ,??????????????????????????
20681 ????????????????????????????
20682 ?????????????????????????????+
20683 ?????+++++++++++++++++++++++++
20684 ?????+++++++++++++++++++++++++
20685 ??????++++++++++++++++++++++++
20686 ?????++
20687 ?????+++
20688 ??????+++IIIIIIIIIIIIIIIIII
20689 ?????+++++IIIIIIIIIIIIIIIIII
20690 ?????++++++++++++++++++++++++
20691 ??????+++++++++++++++++++++++:
20692 ?????++
20693 ?????+++
20694 ??????++
20695 ??????????????????????????????II
20696 ??????????????????????????????IIII
20697 ,?????????????????????????????IIIII+
20698 =???++++++++++++++++++++++++++III?
20699 ?++++++++++++++++++++++++++++I+
20700*/
20701namespace default_method{
20702 //BLOCK:for debug
20703 #if defined(_MSC_VER)
20704 #if defined(ELC_TEST_CHECK_MEMORY_LACK)
20705 #pragma detect_mismatch("ELC_TEST_CHECK_MEMORY_LACK","true")
20706 #else
20707 #pragma detect_mismatch("ELC_TEST_CHECK_MEMORY_LACK","false")
20708 #endif
20709 #endif
20710
20720 [[nodiscard]]inline byte*base_realloc(byte*ptr,size_t nsize,size_t align)noexcept{
20721 byte*p=::elc::APIs::alloc::realloc(ptr,nsize,align);
20722 #if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
20723 if(nsize==0)
20724 stest_uneventlog(ptr);
20725 if(p){
20726 ELC_TEST_EVENTNAME("base_realloc调用");
20727 if(p!=ptr)
20728 stest_uneventlog(ptr);
20729 stest_eventlog(p);
20730 }
20731 #endif
20732 return p;
20733 }
20742 [[nodiscard]]inline byte*base_aligned_alloc(size_t align,size_t size)noexcept{
20743 byte*p=::elc::APIs::alloc::aligned_alloc(align,size);
20744 #if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
20745 if(p){
20746 ELC_TEST_EVENTNAME("base_aligned_alloc调用");
20747 stest_eventlog(p);
20748 }
20749 #endif
20750 return p;
20751 }
20758 inline void base_free(byte*p,size_t align)noexcept{
20759 //传入需释放的数据块起始点与大小(字节)
20760 #if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
20761 auto tmp=stest_geteventlistfromlog(p);
20762 if(!tmp){
20763 stest_putsf(L"释放了已释放或未分配指针%p,当前的事件记录如下:",p);
20764 stest_printeventlist(stderr,stest_geteventlist());
20765 stest_wait();
20766 return;
20767 }else{
20768 stest_deleteevent(tmp);
20769 stest_uneventlog(p);
20770 }
20771 #endif
20772 ::elc::APIs::alloc::free(p,align);
20773 }
20782 inline size_t base_get_size_of_alloc(const byte*arg, size_t align)noexcept{
20783 //arg保证不与null_ptr相等
20784 const auto tmp= ::elc::APIs::alloc::get_size_of_alloc(arg,align);
20785 return tmp;
20786 }
20787 //BLOCK_END
20788
20789 template<typename T>
20790 inline void*alloc_method(type_info_t<T>)noexcept{
20791 //return空指针被允许,会引起gc_for_alloc
20792 return ::std::assume_aligned<alignof(T)>(base_aligned_alloc(alignof(T),sizeof(T)));
20793 }
20794 template<typename T>
20795 inline void*alloc_method(type_info_t<T>,size_t size)noexcept{
20796 //return空指针被允许,会引起gc_for_alloc
20797 //size被保证不为0
20798 if constexpr(type_info<T>.has_attribute(never_in_array))
20799 template_error("You cannot perform array operations on never_in_array type.");
20800 return ::std::assume_aligned<alignof(T)>(base_aligned_alloc(alignof(T),sizeof(T)*size));
20801 }
20802 template<typename T>
20803 inline size_t get_size_of_alloc_method(const T*arg)noexcept{
20804 //arg保证不与null_ptr相等
20805 return base_get_size_of_alloc(cast_to_data(arg),alignof(T))/sizeof(T);
20806 }
20807 template<typename T>
20808 inline void free_method(T*arg)noexcept{
20809 base_free(cast_to_data(arg),alignof(T));
20810 }
20811 template<typename T>
20812 inline void*realloc_method(T*ptr,size_t new_size)noexcept{
20813 //return空指针被允许,会引起gc_for_alloc,但ptr值必须保持有效以保证gc_for_alloc后再次realloc有效
20814 //new_size被保证不为0
20815 //align维持不变
20816 //但只允许在扩大数据块时可选的移动数据块
20817 if constexpr(type_info<T>.has_attribute(never_in_array))
20818 template_error("You cannot perform array operations on never_in_array type.");
20819 return reinterpret_cast<T*>(base_realloc(cast_to_data(ptr),sizeof(T)*new_size,alignof(T)));
20820 }
20821}
20822
20823//file_end
20824
20825 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/defs.hpp"
20826
20827 enable_adl(the_alloc_method);
20828 template<typename T>
20829 inline void*alloc_method(type_info_t<T>)noexcept{
20830 //return空指针被允许,会引起gc_for_alloc
20831 if constexpr(was_not_an_ill_form(the_alloc_method(type_info<T>)))
20832 return the_alloc_method(type_info<T>);
20833 else
20834 return default_method::alloc_method(type_info<T>);
20835 }
20836 template<typename T>
20837 inline void*alloc_method(type_info_t<T>,size_t size)noexcept{
20838 //return空指针被允许,会引起gc_for_alloc
20839 //size被保证不为0
20840 if constexpr(was_not_an_ill_form(the_alloc_method(type_info<T>,size)))
20841 return the_alloc_method(type_info<T>,size);
20842 else
20843 return default_method::alloc_method(type_info<T>,size);
20844 }
20845 enable_adl(the_get_size_of_alloc_method);
20846 template<typename T>
20847 inline size_t get_size_of_alloc_method(const T*arg)noexcept{
20848 //arg保证不与null_ptr相等
20850 return the_get_size_of_alloc_method(arg);
20851 else
20852 return default_method::get_size_of_alloc_method(arg);
20853 }
20854 enable_adl(the_free_method);
20855 template<typename T>
20856 inline void free_method(T*arg)noexcept{
20857 if constexpr(was_not_an_ill_form(the_free_method(arg)))
20858 the_free_method(arg);
20859 else
20860 default_method::free_method(arg);
20861 }
20862 enable_adl(the_realloc_method);
20863 template<typename T>
20864 inline void*realloc_method(T*ptr,size_t new_size)noexcept{
20865 //return空指针被允许,会引起gc_for_alloc,但ptr值必须保持有效以保证gc_for_alloc后再次realloc有效
20866 //new_size被保证不为0
20867 //align维持不变
20868 //但只允许在扩大数据块时可选的移动数据块
20869 if constexpr(was_not_an_ill_form(the_realloc_method(ptr,new_size)))
20870 return the_realloc_method(ptr,new_size);
20871 else
20872 return default_method::realloc_method(ptr,new_size);
20873 }
20874
20878
20881 template<class T>
20884 [[nodiscard]]static T*base_call()noexcept{
20885 void*tmp;
20886 while(!assign(tmp,alloc_method(type_info<T>)))gc_for_alloc();
20887 return reinterpret_cast<T*>(tmp);
20888 }
20889 [[nodiscard]]static T*base_call(size_t size)noexcept{
20891 if constexpr(type_info<T>.has_attribute(never_in_array))
20892 template_error("You can\'t alloc an array for never_in_array type.");
20893 if(size){//null_ptr不一定等价于nullptr,请勿删除本行
20894 void*tmp;
20895 while(!assign(tmp,alloc_method(type_info<T>,size)))gc_for_alloc();
20896 return reinterpret_cast<T*>(tmp);
20897 }else return null_ptr;
20898 }
20899 [[nodiscard]]/*static*/force_inline T*operator()()const noexcept{return base_call();}
20900 [[nodiscard]]/*static*/force_inline T*operator()(size_t size)const noexcept{return base_call(size);}
20902 size_t _size;
20903 [[nodiscard]]force_inline T*operator()()const noexcept{return base_call(_size);}
20904 };
20905 [[nodiscard]]force_inline constexpr alloc_array_t operator[](size_t a)const noexcept{return{a};}
20906 };
20910 template<class T>
20911 constexpr alloc_t<T>alloc{};
20912
20915 constexpr struct free_t{
20917 template<class T>
20918 static void base_call(T*p)noexcept{
20920 if(p!=null_ptr)//null_ptr不一定等价于nullptr,请勿删除本行
20921 free_method(p);
20922 }
20923 template<class T>
20924 /*static*/force_inline void operator()(T*p)const noexcept{base_call(p);}
20925 }free{};
20926
20929 constexpr struct realloc_t{
20931 template<class T>
20932 static void base_call(T*&ptr,size_t nsize)noexcept{
20934 if constexpr(type_info<T>.has_attribute(never_in_array))
20935 template_error("You cannot perform array operations on never_in_array type.");
20936 //template_warning("For never_in_array type,realloc will free ptr when new_size=0 else do nothing.");
20937 if(nsize){//null_ptr不一定等价于nullptr,请勿删除本行
20938 if constexpr(type_info<T>.not_has_attribute(never_in_array))
20939 if(ptr!=null_ptr){//null_ptr不一定等价于nullptr,请勿删除本行
20940 void*tmp;
20941 while(!assign(tmp,realloc_method(ptr,nsize)))gc_for_alloc();
20942 ptr=reinterpret_cast<T*>(tmp);
20943 }else
20944 ptr=alloc<T>(nsize);
20945 }else{
20946 free(ptr);
20947 ptr=null_ptr;
20948 }
20949 }
20950 template<class T>
20951 /*static*/force_inline void operator()(T*&ptr,size_t nsize)const noexcept{
20952 base_call(ptr,nsize);
20953 }
20955 size_t _size;
20956 template<class T>
20957 [[nodiscard]]force_inline T*operator()(T*&ptr)const noexcept{return base_call(ptr,_size);}
20958 };
20959 [[nodiscard]]force_inline constexpr realloc_array_t operator[](size_t a)const noexcept{return{a};}
20960 }realloc{};
20961
20965 constexpr struct get_size_of_alloc_t{
20966 template<typename T>
20967 static constexpr bool able=true;
20968 template<typename T>
20969 static constexpr bool nothrow=noexcept(get_size_of_alloc_method(declvalue(const T*)));
20970
20971 template<typename T> requires able<T>
20972 static size_t base_call(const T*arg)noexcept(nothrow<T>){
20974 if(arg==null_ptr)
20975 return 0;
20976 return get_size_of_alloc_method(arg);
20977 }
20978
20979 template<typename T> requires able<T>
20980 force_inline size_t operator()(const T*arg)const noexcept(nothrow<T>){
20981 return base_call(arg);
20982 }
20983 }get_size_of_alloc{};
20984
20987 constexpr struct copy_alloc_t{
20988 template<typename T>
20989 static constexpr bool able=true;
20990 template<typename T>
20991 static constexpr bool nothrow=get_size_of_alloc.nothrow<T>;
20992
20993 template<typename T> requires able<T>
20994 static T*base_call(const T*arg)noexcept(nothrow<T>){
20996 return alloc<T>(get_size_of_alloc(arg));
20997 }
20998
20999 template<typename T> requires able<T>
21000 force_inline T*operator()(const T*arg)const noexcept(nothrow<T>){
21001 return base_call(arg);
21002 }
21003 }copy_alloc{};
21004}
21005
21006//file_end
21007
21008#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/_body.hpp"
21009#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/_export.hpp"
21010//_export.hpp
21011//at namespace elc::defs::memory
21012/*
21013未完成的elc解释器base文件
21014由steve02081504与Alex0125设计、编写
21015转载时请在不对此文件做任何修改的同时注明出处
21016项目地址:https://github.com/ELC-lang/ELC
21017*/
21018/*
21019 ,??????????????????????????
21020 ????????????????????????????
21021 ?????????????????????????????+
21022 ?????+++++++++++++++++++++++++
21023 ?????+++++++++++++++++++++++++
21024 ??????++++++++++++++++++++++++
21025 ?????++
21026 ?????+++
21027 ??????+++IIIIIIIIIIIIIIIIII
21028 ?????+++++IIIIIIIIIIIIIIIIII
21029 ?????++++++++++++++++++++++++
21030 ??????+++++++++++++++++++++++:
21031 ?????++
21032 ?????+++
21033 ??????++
21034 ??????????????????????????????II
21035 ??????????????????????????????IIII
21036 ,?????????????????????????????IIIII+
21037 =???++++++++++++++++++++++++++III?
21038 ?++++++++++++++++++++++++++++I+
21039*/
21040#define export using alloc_n::
21041export alloc;
21042export free;
21043export realloc;
21044export get_size_of_alloc;
21045export copy_alloc;
21046#undef export
21047
21048//file_end
21049
21050#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/_body.hpp"
21051#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
21052 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/_test.hpp"
21053//_test.hpp
21054//at namespace elc::defs::memory
21055/*
21056未完成的elc解释器base文件
21057由steve02081504与Alex0125设计、编写
21058转载时请在不对此文件做任何修改的同时注明出处
21059项目地址:https://github.com/ELC-lang/ELC
21060*/
21061/*
21062 ,??????????????????????????
21063 ????????????????????????????
21064 ?????????????????????????????+
21065 ?????+++++++++++++++++++++++++
21066 ?????+++++++++++++++++++++++++
21067 ??????++++++++++++++++++++++++
21068 ?????++
21069 ?????+++
21070 ??????+++IIIIIIIIIIIIIIIIII
21071 ?????+++++IIIIIIIIIIIIIIIIII
21072 ?????++++++++++++++++++++++++
21073 ??????+++++++++++++++++++++++:
21074 ?????++
21075 ?????+++
21076 ??????++
21077 ??????????????????????????????II
21078 ??????????????????????????????IIII
21079 ,?????????????????????????????IIIII+
21080 =???++++++++++++++++++++++++++III?
21081 ?++++++++++++++++++++++++++++I+
21082*/
21086inline void check_memory_lack()noexcept{
21087 stest_mapeventlogwith(λ(const void*p,steventlist*a)noexcept{
21088 stest_putsf(L"内存泄露于%p,分配自:",p);
21089 stest_printeventlist(stdout,stest_copyeventlist(a));
21090 //alloc_n::base_free(remove_const(p));
21091 //stest_puts(L"已释放");
21092 stest_wait();
21093 });
21094}
21095#if defined(ELC_TEST_ON)
21096 namespace alloc_n{
21097 //BLOCK:for debug
21098 inline void test(){
21099 ELC_TEST_EVENTNAME("alloc部分测试");
21100 rand_seed.set_by_time();
21101 for(int i=rand<int>()%100+40;i--;){
21102 int*p=alloc<int>(50);
21103 p[0]=72;
21104 stest_accert(get_size_of_alloc(p)==50);
21105 p[49]=rand<int>();
21106 p[19]=666;
21107 realloc(p,20);
21108 stest_accert(get_size_of_alloc(p)==20);
21109 stest_accert(p[19]==666);
21110 stest_accert(p[0]==72);
21111 free(p);
21112 }
21113 check_memory_lack();
21114 }
21115 inline void test_log_out(){
21116 }
21117 inline void test_end(){
21118 }
21119 //BLOCK_END
21120 }
21121#endif
21122
21123//file_end
21124
21125 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/alloc/_body.hpp"
21126#endif
21127
21128//file_end
21129
21130#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
21131#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/_body.hpp"
21132//_body.hpp
21133//at namespace elc::defs::memory
21134/*
21135未完成的elc解释器base文件
21136由steve02081504与Alex0125设计、编写
21137转载时请在不对此文件做任何修改的同时注明出处
21138项目地址:https://github.com/ELC-lang/ELC
21139*/
21140/*
21141 ,??????????????????????????
21142 ????????????????????????????
21143 ?????????????????????????????+
21144 ?????+++++++++++++++++++++++++
21145 ?????+++++++++++++++++++++++++
21146 ??????++++++++++++++++++++++++
21147 ?????++
21148 ?????+++
21149 ??????+++IIIIIIIIIIIIIIIIII
21150 ?????+++++IIIIIIIIIIIIIIIIII
21151 ?????++++++++++++++++++++++++
21152 ??????+++++++++++++++++++++++:
21153 ?????++
21154 ?????+++
21155 ??????++
21156 ??????????????????????????????II
21157 ??????????????????????????????IIII
21158 ,?????????????????????????????IIIII+
21159 =???++++++++++++++++++++++++++III?
21160 ?++++++++++++++++++++++++++++I+
21161*/
21162#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/defs.hpp"
21163//defs.hpp
21164//at namespace elc::defs::memory
21165/*
21166未完成的elc解释器base文件
21167由steve02081504与Alex0125设计、编写
21168转载时请在不对此文件做任何修改的同时注明出处
21169项目地址:https://github.com/ELC-lang/ELC
21170*/
21171/*
21172 ,??????????????????????????
21173 ????????????????????????????
21174 ?????????????????????????????+
21175 ?????+++++++++++++++++++++++++
21176 ?????+++++++++++++++++++++++++
21177 ??????++++++++++++++++++++++++
21178 ?????++
21179 ?????+++
21180 ??????+++IIIIIIIIIIIIIIIIII
21181 ?????+++++IIIIIIIIIIIIIIIIII
21182 ?????++++++++++++++++++++++++
21183 ??????+++++++++++++++++++++++:
21184 ?????++
21185 ?????+++
21186 ??????++
21187 ??????????????????????????????II
21188 ??????????????????????????????IIII
21189 ,?????????????????????????????IIIII+
21190 =???++++++++++++++++++++++++++III?
21191 ?++++++++++++++++++++++++++++I+
21192*/
21193namespace abstract_base_n{
21194 /*
21195 ELC的虚基类模块,适用于unget
21196 处理虚基类到实例类的偏移与模板实例化差异
21197 原理:
21198 虚函数间接调用以从base_t&转为T&
21199 运行时计算偏移以从T*转换base_t*
21200 用法:is_common_attribute␁
21201 */
21204}
21205namespace get_n{
21208 //struct build_by_get_only{};已定义于 "../../base_defs/special_attribute.hpp"
21209
21216 template<typename T>
21217 void alloc_size_cut(T*&arg,size_t to_size)noexcept{
21218 realloc(arg,to_size);
21219 }
21226 template<typename T>
21227 void alloc_size_grow(T*&arg,size_t to_size)noexcept(move.trivial<T> or move.nothrow<T>){
21228 if constexpr(move.trivial<T>)
21229 realloc(arg,to_size);
21230 else{
21231 T*tmp=alloc<T>(to_size);
21232 const auto from_size=get_size_of_alloc(arg);
21233 if constexpr(!move.nothrow<T>){
21234 template_warning("the move of T was not noexcept,this may cause memory lack.");
21235 try{
21236 move[from_size](note::from(arg),note::to(tmp));
21237 }catch(...){
21238 free(tmp);
21239 throw;
21240 }
21241 }else{
21242 move[from_size](note::from(arg),note::to(tmp));
21243 }
21244 free(arg);
21245 arg=tmp;
21246 }
21247 }
21255 template<typename T>
21256 void alloc_size_grow_with_insert_uninitialized_data(T*&arg,size_t insert_pos,size_t insert_size)noexcept(move.trivial<T> or move.nothrow<T>){
21257 const auto from_size=get_size_of_alloc(arg);
21258 const auto to_size=from_size+insert_size;
21259 const auto size_before_insert=insert_pos;
21260 #if in_debug || defined(ELC_CHECK_MEMORYS_ERROR)
21261 if(from_size<insert_pos)
21262 __debugbreak();//?
21263 #endif
21264 const auto size_after_insert=from_size-insert_pos;
21265 if constexpr(move.trivial<T>){
21266 realloc(arg,to_size);
21267 memmove(arg+size_before_insert+insert_size,arg+size_before_insert,size_after_insert*sizeof(T));
21268 }
21269 else{
21270 T*tmp=alloc<T>(to_size);
21271 if constexpr(!move.nothrow<T>){
21272 template_warning("the move of T was not noexcept,this may cause memory lack.");
21273 try{
21274 move[size_before_insert](note::from(arg),note::to(tmp));
21275 move[size_after_insert](note::from(arg+insert_pos),note::to(tmp+insert_pos+insert_size));
21276 }catch(...){
21277 free(tmp);
21278 throw;
21279 }
21280 }else{
21281 move[size_before_insert](note::from(arg),note::to(tmp));
21282 move[size_after_insert](note::from(arg+insert_pos),note::to(tmp+insert_pos+insert_size));
21283 }
21284 free(arg);
21285 arg=tmp;
21286 }
21287 }
21299 template<typename T>
21300 force_inline auto alloc_size_grow_with_insert_uninitialized_data(T*&arg,size_t to_size,size_t insert_pos,size_t insert_size)noexcept(move.trivial<T> or move.nothrow<T>){
21301 const auto from_size=get_size_of_alloc(arg);
21302 const auto size_before_insert=insert_pos;
21303 #if in_debug || defined(ELC_CHECK_MEMORYS_ERROR)
21304 if(from_size<insert_pos)
21305 __debugbreak();//?
21306 #endif
21307 const auto size_after_insert=from_size-insert_pos;
21308 if constexpr(move.trivial<T>){
21309 realloc(arg,to_size);
21310 memmove(arg+size_before_insert+insert_size,arg+size_before_insert,size_after_insert*sizeof(T));
21311 }
21312 else{
21313 T*tmp=alloc<T>(to_size);
21314 if constexpr(!move.nothrow<T>){
21315 template_warning("the move of T was not noexcept,this may cause memory lack.");
21316 try{
21317 move[size_before_insert](note::from(arg),note::to(tmp));
21318 move[size_after_insert](note::from(arg+insert_pos),note::to(tmp+insert_pos+insert_size));
21319 }catch(...){
21320 free(tmp);
21321 throw;
21322 }
21323 }else{
21324 move[size_before_insert](note::from(arg),note::to(tmp));
21325 move[size_after_insert](note::from(arg+insert_pos),note::to(tmp+insert_pos+insert_size));
21326 }
21327 free(arg);
21328 arg=tmp;
21329 }
21330 struct result_t{
21331 size_t from_size;
21332 size_t to_size;
21333 size_t size_before_insert;
21334 size_t size_after_insert;
21335 size_t insert_pos;
21336 size_t insert_size;
21337 size_t end_grow_size()const noexcept{return to_size-from_size-insert_size;}
21338 T* origin_data_ptr(T*arg)const noexcept{return arg;}
21339 T* insert_data_ptr(T*arg)const noexcept{return arg+insert_pos;}
21340 T* end_growth_data_ptr(T*arg)const noexcept{return arg+to_size-end_grow_size();}
21341 } result{
21342 from_size,
21343 to_size,
21344 size_before_insert,
21345 size_after_insert,
21346 insert_pos,
21347 insert_size
21348 };
21349 return result;
21350 }
21363 template<typename T>
21364 force_inline auto part_used_block_alloc_size_grow_with_insert_uninitialized_data(T*&arg,size_t to_size,size_t insert_pos,size_t insert_size,size_t used_size)noexcept(move.trivial<T> or move.nothrow<T>){
21365 const auto from_size=get_size_of_alloc(arg);
21366 const auto size_before_insert=insert_pos;
21367 const auto size_after_insert=used_size-insert_pos;
21368 const auto unused_size_before_insert=from_size-used_size;
21369 const auto unused_size_after_insert=to_size-insert_size-used_size;
21370 if constexpr(move.trivial<T>){
21371 realloc(arg,to_size);
21372 //先移动插入末尾的元素
21373 memmove(arg+size_before_insert+insert_size,arg+insert_pos,size_after_insert*sizeof(T));
21374 //插入前的元素没有移动
21375 }
21376 else{
21377 T*tmp=alloc<T>(to_size);
21378 if constexpr(!move.nothrow<T>){
21379 template_warning("the move of T was not noexcept,this may cause memory lack.");
21380 try{
21381 move[size_after_insert](note::from(arg+insert_pos),note::to(tmp+insert_pos+insert_size));
21382 //这里我们需要移动插入前的元素因为这是新的空间
21383 move[size_before_insert](note::from(arg),note::to(tmp));
21384 }catch(...){
21385 free(tmp);
21386 throw;
21387 }
21388 }else{
21389 move[size_after_insert](note::from(arg+insert_pos),note::to(tmp+insert_pos+insert_size));
21390 //这里我们需要移动插入前的元素因为这是新的空间
21391 move[size_before_insert](note::from(arg),note::to(tmp));
21392 }
21393 free(arg);
21394 arg=tmp;
21395 }
21396 struct result_t{
21397 size_t from_size;
21398 size_t to_size;
21399 size_t unused_size_before_insert;
21400 size_t unused_size_after_insert;
21401 size_t used_size;
21402 size_t size_before_insert;
21403 size_t size_after_insert;
21404 size_t insert_pos;
21405 size_t insert_size;
21406 size_t end_grow_size()const noexcept{return to_size-from_size-insert_size;}
21407 T* origin_data_ptr(T*arg)const noexcept{return arg;}
21408 T* insert_data_ptr(T*arg)const noexcept{return arg+insert_pos;}
21409 T* end_growth_data_ptr(T*arg)const noexcept{return arg+to_size-used_size;}
21410 } result{
21411 from_size,
21412 to_size,
21413 unused_size_before_insert,
21414 unused_size_after_insert,
21415 used_size,
21416 size_before_insert,
21417 size_after_insert,
21418 insert_pos,
21419 insert_size
21420 };
21421 return result;
21422 }
21429 template<typename T>
21430 void forward_alloc_size_cut(T*&arg,size_t to_size)noexcept(move.trivial<T> or move.nothrow<T>){
21431 const auto from_size=get_size_of_alloc(arg);
21432 #if in_debug || defined(ELC_CHECK_MEMORYS_ERROR)
21433 if(to_size>from_size)
21434 __debugbreak();//?
21435 #endif
21436 const auto cut_size=from_size-to_size;
21437 if constexpr(move.trivial<T>){
21438 ::std::memmove(arg,add_const(arg+cut_size),to_size*sizeof(T));
21439 realloc(arg,to_size);
21440 }
21441 else{
21442 T*tmp=alloc<T>(to_size);
21443 if constexpr(!move.nothrow<T>){
21444 template_warning("the move of T was not noexcept,this may cause memory lack.");
21445 try{
21446 move[to_size](note::from(arg+cut_size),note::to(tmp));
21447 }catch(...){
21448 free(tmp);
21449 throw;
21450 }
21451 }else{
21452 move[to_size](note::from(arg+cut_size),note::to(tmp));
21453 }
21454 free(arg);
21455 arg=tmp;
21456 }
21457 }
21464 template<typename T>
21465 void forward_alloc_size_grow(T*&arg,size_t to_size)noexcept(move.trivial<T> or move.nothrow<T>){
21466 const auto from_size=get_size_of_alloc(arg);
21467 #if in_debug || defined(ELC_CHECK_MEMORYS_ERROR)
21468 if(to_size<from_size)
21469 __debugbreak();//?
21470 #endif
21471 const auto grow_size=to_size-from_size;
21472 if constexpr(move.trivial<T>){
21473 realloc(arg,to_size);
21474 ::std::memmove(arg+grow_size,add_const(arg),from_size*sizeof(T));
21475 }
21476 else{
21477 T*tmp=alloc<T>(to_size);
21478 if constexpr(!move.nothrow<T>){
21479 template_warning("the move of T was not noexcept,this may cause memory lack.");
21480 try{
21481 move[from_size](note::from(arg),note::to(tmp+grow_size));
21482 }catch(...){
21483 free(tmp);
21484 throw;
21485 }
21486 }else{
21487 move[from_size](note::from(arg),note::to(tmp+grow_size));
21488 }
21489 free(arg);
21490 arg=tmp;
21491 }
21492 }
21504 template<typename T>
21505 force_inline auto forward_alloc_size_grow_with_insert_uninitialized_data(T*&arg,size_t to_size,size_t insert_pos,size_t insert_size)noexcept(move.trivial<T> or move.nothrow<T>){
21506 const auto from_size=get_size_of_alloc(arg);
21507 const auto grow_size=to_size-from_size;
21508 #if in_debug || defined(ELC_CHECK_MEMORYS_ERROR)
21509 if(grow_size<insert_size)
21510 __debugbreak();//?
21511 #endif
21512 const auto before_grow_size=grow_size-insert_size;
21513 const auto size_before_insert=insert_pos;
21514 const auto size_after_insert=from_size-insert_pos;
21515 if constexpr(move.trivial<T>){
21516 realloc(arg,to_size);
21517 const auto origin_data_ptr=arg+before_grow_size;
21518 ::std::memmove(origin_data_ptr+size_before_insert+insert_size,arg+size_before_insert,size_after_insert*sizeof(T));
21519 ::std::memmove(origin_data_ptr,arg,size_before_insert*sizeof(T));
21520 }
21521 else{
21522 T*tmp=alloc<T>(to_size);
21523 if constexpr(!move.nothrow<T>){
21524 template_warning("the move of T was not noexcept,this may cause memory lack.");
21525 try{
21526 const auto origin_data_ptr=tmp+before_grow_size;
21527 move[size_before_insert](note::from(arg),note::to(origin_data_ptr));
21528 move[size_after_insert](note::from(arg+size_before_insert),note::to(origin_data_ptr+size_before_insert+insert_size));
21529 }catch(...){
21530 free(tmp);
21531 throw;
21532 }
21533 }else{
21534 const auto origin_data_ptr=tmp+before_grow_size;
21535 move[size_before_insert](note::from(arg),note::to(origin_data_ptr));
21536 move[size_after_insert](note::from(arg+size_before_insert),note::to(origin_data_ptr+size_before_insert+insert_size));
21537 }
21538 free(arg);
21539 arg=tmp;
21540 }
21541 struct result_t{
21542 size_t from_size;
21543 size_t to_size;
21544 size_t before_grow_size;
21545 size_t size_before_insert;
21546 size_t size_after_insert;
21547 size_t insert_pos;
21548 size_t insert_size;
21549 T* origin_data_ptr(T*arg)const noexcept{return arg+before_grow_size;}
21550 T* insert_data_ptr(T*arg)const noexcept{return origin_data_ptr(arg)+insert_pos;}
21551 } result{
21552 from_size,
21553 to_size,
21554 before_grow_size,
21555 size_before_insert,
21556 size_after_insert,
21557 insert_pos,
21558 insert_size
21559 };
21560 return result;
21561 }
21574 template<typename T>
21575 force_inline auto part_used_block_forward_alloc_size_grow_with_insert_uninitialized_data(T*&arg,size_t to_size,size_t insert_pos,size_t insert_size,size_t used_size)noexcept(move.trivial<T> or move.nothrow<T>){
21576 const auto from_size=get_size_of_alloc(arg);//原有数据块大小
21577 const auto grow_size=to_size-from_size;//扩大的大小
21578 const auto used_size_after_insert=used_size+insert_size;//插入后的已使用大小
21579 const auto unused_size_after_insert=to_size-used_size_after_insert;//插入后的未使用大小
21580 const auto unused_size_before_insert=from_size-used_size;//插入前的未使用大小
21581
21582 const auto after_insert_size=from_size-insert_pos;//插入位置之后的数据块的大小
21583 const auto before_insert_size=insert_pos-unused_size_before_insert;//插入位置之前的数据块的大小
21584 insert_pos-=unused_size_before_insert;//插入位置
21585 if constexpr(move.trivial<T>){
21586 realloc(arg,to_size);
21587 const auto new_data_ptr=arg+unused_size_after_insert;
21588 const auto origin_data_ptr=arg+unused_size_before_insert;
21589 //先移动插入末尾的元素
21590 ::std::memmove(new_data_ptr+insert_pos+insert_size,origin_data_ptr+insert_pos,after_insert_size*sizeof(T));
21591 //再移动插入前的元素
21592 ::std::memmove(new_data_ptr,origin_data_ptr,before_insert_size*sizeof(T));
21593 }
21594 else{
21595 T*tmp=alloc<T>(to_size);
21596 const auto new_data_ptr=tmp+unused_size_after_insert;
21597 const auto origin_data_ptr=arg+unused_size_before_insert;
21598 if constexpr(!move.nothrow<T>){
21599 template_warning("the move of T was not noexcept,this may cause memory lack.");
21600 try{
21601 move[after_insert_size](note::from(origin_data_ptr+insert_pos),note::to(new_data_ptr+insert_pos+insert_size));
21602 move[before_insert_size](note::from(origin_data_ptr),note::to(new_data_ptr));
21603 }catch(...){
21604 free(tmp);
21605 throw;
21606 }
21607 }else{
21608 move[after_insert_size](note::from(origin_data_ptr+insert_pos),note::to(new_data_ptr+insert_pos+insert_size));
21609 move[before_insert_size](note::from(origin_data_ptr),note::to(new_data_ptr));
21610 }
21611 free(arg);
21612 arg=tmp;
21613 }
21614 struct result_t{
21615 size_t from_size;
21616 size_t to_size;
21617 size_t unused_size_before_insert;
21618 size_t unused_size_after_insert;
21619 size_t used_size_after_insert;
21620 size_t before_insert_size;
21621 size_t after_insert_size;
21622 size_t used_size;
21623 size_t grow_size;
21624 size_t insert_pos;
21625 size_t insert_size;
21626 T* new_data_ptr(T*arg)const noexcept{return arg+unused_size_after_insert;}
21627 T* origin_data_ptr(T*arg)const noexcept{return arg+unused_size_before_insert;}
21628 size_t before_grow_size()const noexcept{return grow_size+used_size-insert_size;}
21629 T* insert_data_ptr(T*arg)const noexcept{return arg+unused_size_after_insert+insert_pos;}
21630 } result{
21631 from_size,
21632 to_size,
21633 unused_size_before_insert,
21634 unused_size_after_insert,
21635 used_size_after_insert,
21636 before_insert_size,
21637 after_insert_size,
21638 used_size,
21639 grow_size,
21640 insert_pos,
21641 insert_size
21642 };
21643 return result;
21644 }
21645
21646 struct base_get_t{};
21647 template<typename T>
21650 template<class...Args>
21651 static constexpr bool able=construct<T>.able<Args...>&&destruct.able<T>;
21652 template<class...Args>
21653 static constexpr bool nothrow=construct<T>.nothrow<Args...>;
21654
21662 template<class...Args> requires able<Args...>
21663 [[nodiscard]]T* operator()(Args&&...rest)const noexcept(nothrow<Args...>){
21665 return construct<T>[alloc<T>()](forward<Args>(rest)...);
21666 }
21667
21672 size_t _size;
21680 template<class...Args> requires able<Args...>
21681 [[nodiscard]]T* operator()(Args&&...rest)const noexcept(nothrow<Args...>){
21683 if constexpr(type_info<T>.has_attribute(never_in_array))
21684 template_error("You can\'t get an array for never_in_array type.");
21685 return construct<T>[alloc<T>(_size)][_size](forward<Args>(rest)...);
21686 }
21687 };
21688 [[nodiscard]]constexpr array_get_t operator[](size_t size)const noexcept{return{size};}
21689
21690 static constexpr struct as_array_t{
21691 template<typename U>
21692 static constexpr bool able=copy_construct.able<T>&&destruct.able<T>&&is_array_like_for<T,U>;
21693 template<typename U>
21694 static constexpr bool nothrow=copy_construct.nothrow<T>;
21695
21696 [[nodiscard]]T* operator()(array_like_view_t<const T>a)const noexcept(nothrow<void>){
21698 if constexpr(type_info<T>.has_attribute(never_in_array))
21699 template_error("You can\'t get an array for never_in_array type.");
21700 const auto size=a.size();
21701 auto aret=alloc<T>[size]();
21702 copy_construct[size](note::from(a.begin()),note::to(aret));
21703 return aret;
21704 }
21705 }as_array{};
21706
21707 static constexpr struct apply_end_t{
21708 template<typename U>
21709 static constexpr bool able=copy_construct.able<T>&&move.able<T>&&is_array_like_for<T,U>;
21710 template<typename U>
21711 static constexpr bool nothrow=copy_construct.nothrow<T>&&move.nothrow<T>;
21712
21713 T* operator()(note::to_t<T*&> to,array_like_view_t<const T>a)const noexcept(nothrow<void>){
21715 auto&ptr=to.value;
21716 auto from_size=get_size_of_alloc(ptr);
21717 auto a_size=a.size();
21718 alloc_size_grow(ptr,from_size+a_size);
21719 copy_construct[a_size](note::from(a.begin()),note::to(ptr+from_size));
21720 return ptr;
21721 }
21722 T* operator()(note::to_t<T*&> to,const T&a)const noexcept(nothrow<void>){
21724 auto&ptr=to.value;
21725 auto from_size=get_size_of_alloc(ptr);
21726 alloc_size_grow(ptr,from_size+1);
21727 copy_construct(note::from(&a),note::to(ptr+from_size));
21728 return ptr;
21729 }
21730 T* operator()(note::to_t<T*&> to,T&&a)const noexcept(nothrow<void>){
21732 auto&ptr=to.value;
21733 auto from_size=get_size_of_alloc(ptr);
21734 alloc_size_grow(ptr,from_size+1);
21735 move_construct(note::from(&a),note::to(ptr+from_size));
21736 return ptr;
21737 }
21738 }apply_end{};
21739
21740 static constexpr struct remove_t{
21741 template<typename U>
21742 static constexpr bool able=destruct.able<T>&&move.able<T>&&is_array_like_for<T,U>;
21743 template<typename U>
21744 static constexpr bool nothrow=destruct.nothrow<T>&&move.nothrow<T>;
21745
21746 bool operator()(array_like_view_t<const T>a,note::from_t<T*>from)const noexcept(nothrow<void>){
21748 auto ptr=from.value;
21749 auto from_size=get_size_of_alloc(ptr);
21750 T*ptr_to_a=in_range(a,{ptr,note::size(from_size)});
21751 auto a_size=a.size();
21752 if(!ptr_to_a)
21753 return false;
21754
21755 destruct[a_size](ptr_to_a);
21756 move[(ptr+from_size)-(ptr_to_a+a_size)](note::from(ptr_to_a+a_size),note::to(ptr_to_a));
21757 alloc_size_cut(ptr,from_size-a_size);
21758 return true;
21759 }
21760 }remove{};
21761 };
21762 template<typename T>
21763 constexpr get_t<T>get{};
21764
21765
21766 constexpr struct unget_t{
21767 template<typename T>
21768 static constexpr bool able=destruct.able<T>;
21769 template<typename T>
21770 static constexpr bool nothrow=destruct.nothrow<T>;
21771
21772 template<typename T> requires able<T>
21773 void operator()(T*a)const noexcept(nothrow<T>){
21775 if(a!=null_ptr){
21776 if constexpr(::std::is_polymorphic_v<T> && !::std::is_final_v<T>)
21777 if constexpr(type_info<T>.has_attribute(abstract_base)){
21778 #if defined(_MSC_VER)
21779 [[gsl::suppress(f.6)]]
21780 #endif
21781 attribute_ptr_cast<abstract_base>(a)->abstract_method_unget_this();
21782 return;
21783 }
21784 elseif constexpr(type_info<T>.not_has_attribute(instance_struct))
21785 template_warning("T is polymorphic, but there is no elc::abstract_base attribute to provide information to elc's memory system, which could lead to incorrect unget handling.");
21786 if constexpr(!destruct.nothrow<T>)
21787 template_warning("the destructer of T was not noexcept,this may cause memory lack.");
21788 if constexpr(type_info<T>.has_attribute(never_in_array))
21789 destruct(a);
21790 else
21791 destruct[get_size_of_alloc(a)](a);
21792 free(a);
21793 }
21794 }
21795 /*适用于unget(this,not destruct);*/
21796 template<typename T> requires able<T>
21797 void operator()(T*a,decltype(destruct)::not_t)const noexcept(nothrow<T>){
21799 free(a);
21800 }
21801 }unget{};
21802
21803 constexpr struct get_resize_t{
21804 template<typename T>
21805 static constexpr bool able=construct<T>.able<>&&destruct.able<T>&&move.able<T>;
21806 template<typename T>
21807 static constexpr bool nothrow=type_info<T>.not_has_attribute(abstract_base)&&construct<T>.nothrow<>&&destruct.nothrow<T>&&move.nothrow<T>;
21808
21809 template<typename T> requires able<T>
21810 static void base_call(T*&arg,const size_t to_size)noexcept(nothrow<T>){
21811 if constexpr(type_info<T>.has_attribute(never_in_array)){
21812 template_warning("For never_in_array type,get_resize will unget ptr when new_size=0 else do nothing.");
21813 if(to_size)
21814 return;
21815 unget(arg);
21816 arg=null_ptr;
21817 }elseif constexpr(type_info<T>.has_attribute(abstract_base)){
21818 arg=attribute_ptr_cast<abstract_base>(arg)->abstract_method_get_resize_this(to_size);
21819 }else{
21820 const size_t from_size=get_size_of_alloc(arg);
21821 if(from_size==to_size)
21822 return;
21823 elseif(from_size > to_size){
21824 destruct[from_size-to_size](arg+to_size);
21825 alloc_size_cut(arg,to_size);
21826 }elseif(from_size){
21827 alloc_size_grow(arg,to_size);
21828 construct<T>[arg+from_size][to_size-from_size]();
21829 }else
21830 arg=get<T>[to_size]();
21831 }
21832 }
21833
21834 template<typename T> requires able<T>
21835 inline void operator()(T*&arg,size_t to_size)const noexcept(nothrow<T>){
21837 base_call(arg,to_size);
21838 }
21839 template<typename T> requires able<T>
21840 [[nodiscard]]inline T* operator()(T*&&arg,size_t to_size)const noexcept(nothrow<T>){
21842 base_call(arg,to_size);
21843 return arg;
21844 }
21845
21846 static constexpr struct insert_t{
21847 template<typename T>
21848 static constexpr bool able=get_resize_t::able<T>;
21849 template<typename T>
21850 static constexpr bool nothrow=get_resize_t::nothrow<T>;
21851 template<typename T> requires(able<T> && construct<T>.able<>)
21852 void operator()(T*&arg,size_t insert_pos,size_t insert_size)const noexcept(nothrow<T>){
21853 if(insert_size){
21855 alloc_size_grow_with_insert_uninitialized_data(arg,insert_pos,insert_size);
21856 construct<T>[arg+insert_pos][insert_size]();
21857 }
21858 }
21859 template<typename T> requires(able<T> && copy_construct.able<T>)
21860 void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T&initer)const noexcept(nothrow<T>){
21861 if(insert_size){
21863 alloc_size_grow_with_insert_uninitialized_data(arg,insert_pos,insert_size);
21864 copy_construct[insert_size](arg+insert_pos,initer);
21865 }
21866 }
21867 template<typename T> requires(able<T> && copy_construct.able<T>)
21868 void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data)const noexcept(nothrow<T>){
21869 if(insert_size){
21871 alloc_size_grow_with_insert_uninitialized_data(arg,insert_pos,insert_size);
21872 copy_construct[insert_size](note::from(insert_data),note::to(arg+insert_pos));
21873 }
21874 }
21875 }insert{};
21876 static constexpr struct insert_resize_t{
21877 template<typename T>
21878 static constexpr bool able=get_resize_t::able<T>;
21879 template<typename T>
21880 static constexpr bool nothrow=get_resize_t::nothrow<T>;
21881 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
21882 void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size)const noexcept(nothrow<T>){
21884 const auto info=alloc_size_grow_with_insert_uninitialized_data(arg,to_size,insert_pos,insert_size);
21885 copy_construct[insert_size](note::from(insert_data),note::to(info.insert_data_ptr(arg)));
21886 construct<T>[info.end_growth_data_ptr(arg)][info.end_grow_size()]();
21887 }
21888 static constexpr struct with_used_size_t{
21889 template<typename T>
21890 static constexpr bool able=get_resize_t::able<T>;
21891 template<typename T>
21892 static constexpr bool nothrow=get_resize_t::nothrow<T>;
21893 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
21894 static void base_call(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size,size_t used_size)noexcept(nothrow<T>){
21896 const auto info=part_used_block_alloc_size_grow_with_insert_uninitialized_data(arg,to_size,insert_pos,insert_size,used_size);
21897 copy_construct[insert_size](note::from(insert_data),note::to(info.insert_data_ptr(arg)));
21898 construct<T>[info.end_growth_data_ptr(arg)][info.end_grow_size()]();
21899 }
21900 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
21901 force_inline void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size,size_t used_size)const noexcept(nothrow<T>){
21902 base_call(arg,insert_pos,insert_size,insert_data,to_size,used_size);
21903 }
21906 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
21907 force_inline void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size)const noexcept(nothrow<T>){
21908 base_call(arg,insert_pos,insert_size,insert_data,to_size,_used_size);
21909 }
21910 };
21911 [[nodiscard]]constexpr used_size_index_result_t operator[](size_t used_size)const noexcept{return{used_size};}
21912 }with_used_size{};
21913 }insert_with_resize{};
21914 }get_resize{};
21915
21916 constexpr struct get_forward_resize_t{
21917 template<typename T>
21918 static constexpr bool able=construct<T>.able<>&&destruct.able<T>&&move.able<T>;
21919 template<typename T>
21920 static constexpr bool nothrow=type_info<T>.not_has_attribute(abstract_base)&&construct<T>.nothrow<>&&destruct.nothrow<T>&&move.nothrow<T>;
21921
21922 template<typename T> requires able<T>
21923 static void base_call(T*&arg,const size_t to_size)noexcept(nothrow<T>){
21925 if constexpr(type_info<T>.has_attribute(never_in_array)){
21926 template_warning("For never_in_array type,get_forward_resize will unget ptr when new_size=0 else do nothing.");
21927 if(to_size)
21928 return;
21929 unget(arg);
21930 arg=null_ptr;
21931 }elseif constexpr(type_info<T>.has_attribute(abstract_base)){
21932 arg=attribute_ptr_cast<abstract_base>(arg)->abstract_method_get_forward_resize_this(to_size);
21933 }else{
21934 const size_t from_size=get_size_of_alloc(arg);
21935 if(from_size==to_size)
21936 return;
21937 elseif(from_size > to_size){
21938 destruct[from_size-to_size](arg);
21939 forward_alloc_size_cut(arg,to_size);
21940 }elseif(from_size){
21941 forward_alloc_size_grow(arg,to_size);
21942 construct<T>[arg][to_size-from_size]();
21943 }else
21944 arg=get<T>[to_size]();
21945 }
21946 }
21947
21948 template<typename T> requires able<T>
21949 inline void operator()(T*&arg,size_t to_size)const noexcept(nothrow<T>){
21950 base_call(arg,to_size);
21951 }
21952 template<typename T> requires able<T>
21953 [[nodiscard]]inline T* operator()(T*&&arg,size_t to_size)const noexcept(nothrow<T>){
21954 base_call(arg,to_size);
21955 return arg;
21956 }
21957
21958 static constexpr struct insert_t{
21959 template<typename T>
21960 static constexpr bool able=get_resize_t::able<T>;
21961 template<typename T>
21962 static constexpr bool nothrow=get_resize_t::nothrow<T>;
21963 template<typename T> requires(able<T> && construct<T>.able<>)
21964 void operator()(T*&arg,size_t insert_pos,size_t insert_size)const noexcept(nothrow<T>){
21966 get_resize.insert(arg,insert_pos,insert_size);
21967 }
21968 template<typename T> requires(able<T> && copy_construct.able<T>)
21969 void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data)const noexcept(nothrow<T>){
21971 get_resize.insert(arg,insert_pos,insert_size,insert_data);
21972 }
21973 }insert{};
21974 static constexpr struct insert_resize_t{
21975 template<typename T>
21976 static constexpr bool able=get_resize_t::able<T>;
21977 template<typename T>
21978 static constexpr bool nothrow=get_resize_t::nothrow<T>;
21979 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
21980 void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size)const noexcept(nothrow<T>){
21981 if(insert_size){
21983 const auto info=forward_alloc_size_grow_with_insert_uninitialized_data(arg,to_size,insert_pos,insert_size);
21984 copy_construct[insert_size](note::from(insert_data),note::to(info.insert_data_ptr(arg)));
21985 construct<T>[arg][info.before_grow_size]();
21986 }
21987 }
21988 static constexpr struct with_used_size_t{
21989 template<typename T>
21990 static constexpr bool able=get_resize_t::able<T>;
21991 template<typename T>
21992 static constexpr bool nothrow=get_resize_t::nothrow<T>;
21993 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
21994 static void base_call(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size,size_t used_size)noexcept(nothrow<T>){
21995 if(insert_size){
21997 const auto info=part_used_block_forward_alloc_size_grow_with_insert_uninitialized_data(arg,to_size,insert_pos,insert_size,used_size);
21998 copy_construct[insert_size](note::from(insert_data),note::to(info.insert_data_ptr(arg)));
21999 construct<T>[arg][info.before_grow_size()]();
22000 }
22001 }
22002 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
22003 force_inline void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size,size_t used_size)const noexcept(nothrow<T>){
22004 base_call(arg,insert_pos,insert_size,insert_data,to_size,used_size);
22005 }
22008 template<typename T> requires(able<T> && construct<T>.able<> && copy_construct.able<T>)
22009 force_inline void operator()(T*&arg,size_t insert_pos,size_t insert_size,const T*insert_data,size_t to_size)const noexcept(nothrow<T>){
22010 base_call(arg,insert_pos,insert_size,insert_data,to_size,_used_size);
22011 }
22012 };
22013 [[nodiscard]]constexpr used_size_index_result_t operator[](size_t used_size)const noexcept{return{used_size};}
22014 }with_used_size{};
22015 }insert_with_resize{};
22016 }get_forward_resize{};
22017
22018 constexpr struct get_size_of_get_t{
22019 template<typename T>
22020 static constexpr bool able=true;
22021 template<typename T>
22022 static constexpr bool nothrow=noexcept(get_size_of_alloc(declvalue(const T*)));
22023
22024 template<typename T> requires able<T>
22025 [[nodiscard]]inline static size_t base_call(const T*arg)noexcept(nothrow<T>){
22027 return get_size_of_alloc(arg);
22028 }
22029
22030 template<typename T> requires able<T>
22031 [[nodiscard]]inline size_t operator()(const T*arg)const noexcept(nothrow<T>){
22032 return base_call(arg);
22033 }
22034 }get_size_of_get{};
22035
22036 constexpr struct copy_get_t{
22037 template<typename T>
22038 static constexpr bool able=copy_construct.able<T> || type_info<T>.has_attribute(abstract_base);
22039 template<typename T>
22040 static constexpr bool nothrow=copy_construct.nothrow<T>;
22041
22042 template<typename T> requires able<T>
22043 [[nodiscard]]inline static T*base_call(const T*arg)noexcept(nothrow<T>){
22045 if constexpr(type_info<T>.has_attribute(abstract_base))
22046 return remove_const(attribute_ptr_cast<abstract_base>(arg))->abstract_method_copy_get_this();
22047 else
22048 return copy_construct(note::from(arg),note::to(copy_alloc(arg)),get_size_of_get(arg));
22049 }
22050
22051 template<typename T> requires able<T>
22052 [[nodiscard]]inline T*operator()(const T*arg)const noexcept(nothrow<T>){
22053 return base_call(arg);
22054 }
22055 }copy_get{};
22056}
22057
22058//file_end
22059
22060#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/_body.hpp"
22061#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/_export.hpp"
22062//_export.hpp
22063//at namespace elc::defs::memory
22064/*
22065未完成的elc解释器base文件
22066由steve02081504与Alex0125设计、编写
22067转载时请在不对此文件做任何修改的同时注明出处
22068项目地址:https://github.com/ELC-lang/ELC
22069*/
22070/*
22071 ,??????????????????????????
22072 ????????????????????????????
22073 ?????????????????????????????+
22074 ?????+++++++++++++++++++++++++
22075 ?????+++++++++++++++++++++++++
22076 ??????++++++++++++++++++++++++
22077 ?????++
22078 ?????+++
22079 ??????+++IIIIIIIIIIIIIIIIII
22080 ?????+++++IIIIIIIIIIIIIIIIII
22081 ?????++++++++++++++++++++++++
22082 ??????+++++++++++++++++++++++:
22083 ?????++
22084 ?????+++
22085 ??????++
22086 ??????????????????????????????II
22087 ??????????????????????????????IIII
22088 ,?????????????????????????????IIIII+
22089 =???++++++++++++++++++++++++++III?
22090 ?++++++++++++++++++++++++++++I+
22091*/
22092#define export using get_n::
22093export get;
22094export get_resize;
22095export get_forward_resize;
22096export unget;
22097export get_size_of_get;
22098export copy_get;
22099//export build_by_get_only;
22100#undef export
22101
22102//file_end
22103
22104#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/_body.hpp"
22105#if defined(ELC_TEST_ON)
22106 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/_test.hpp"
22107//_test.hpp
22108//at namespace elc::defs::memory
22109/*
22110未完成的elc解释器base文件
22111由steve02081504与Alex0125设计、编写
22112转载时请在不对此文件做任何修改的同时注明出处
22113项目地址:https://github.com/ELC-lang/ELC
22114*/
22115/*
22116 ,??????????????????????????
22117 ????????????????????????????
22118 ?????????????????????????????+
22119 ?????+++++++++++++++++++++++++
22120 ?????+++++++++++++++++++++++++
22121 ??????++++++++++++++++++++++++
22122 ?????++
22123 ?????+++
22124 ??????+++IIIIIIIIIIIIIIIIII
22125 ?????+++++IIIIIIIIIIIIIIIIII
22126 ?????++++++++++++++++++++++++
22127 ??????+++++++++++++++++++++++:
22128 ?????++
22129 ?????+++
22130 ??????++
22131 ??????????????????????????????II
22132 ??????????????????????????????IIII
22133 ,?????????????????????????????IIIII+
22134 =???++++++++++++++++++++++++++III?
22135 ?++++++++++++++++++++++++++++I+
22136*/
22137namespace get_n{
22138 //BLOCK:for debug
22139 inline void test(){
22140 ELC_TEST_EVENTNAME("get部分测试");
22141 {
22142 ste::tester::setzero();
22143 tester*p=get<tester>[50]();
22144 stest_accert(tester::getbuildtime()==50);
22145 get_resize(p,60);
22146 //destroytime:50(+50) cause move(move_construct&destruct).
22147 stest_accert(tester::getdestroytime()==50);
22148 stest_accert(tester::getbuildtime()==60);
22149 int i=0;
22150 do
22151 p[i]();//写入测试
22152 while(++i!=60);
22153 stest_accert(tester::getcalltime()==60);
22154 unget(p);
22155 //destroytime:110(+60) cause destruct.
22156 stest_accert(tester::getdestroytime()==110);
22157 }
22158 check_memory_lack();
22159 }
22160 inline void test_log_out(){
22161 }
22162 inline void test_end(){
22163 }
22164 //BLOCK_END
22165}
22166
22167//file_end
22168
22169 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/get/_body.hpp"
22170#endif
22171
22172//file_end
22173
22174#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
22175#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_body.hpp"
22176//_body.hpp
22177//at namespace elc::defs::memory
22178/*
22179未完成的elc解释器base文件
22180由steve02081504与Alex0125设计、编写
22181转载时请在不对此文件做任何修改的同时注明出处
22182项目地址:https://github.com/ELC-lang/ELC
22183*/
22184/*
22185 ,??????????????????????????
22186 ????????????????????????????
22187 ?????????????????????????????+
22188 ?????+++++++++++++++++++++++++
22189 ?????+++++++++++++++++++++++++
22190 ??????++++++++++++++++++++++++
22191 ?????++
22192 ?????+++
22193 ??????+++IIIIIIIIIIIIIIIIII
22194 ?????+++++IIIIIIIIIIIIIIIIII
22195 ?????++++++++++++++++++++++++
22196 ??????+++++++++++++++++++++++:
22197 ?????++
22198 ?????+++
22199 ??????++
22200 ??????????????????????????????II
22201 ??????????????????????????????IIII
22202 ,?????????????????????????????IIIII+
22203 =???++++++++++++++++++++++++++III?
22204 ?++++++++++++++++++++++++++++I+
22205*/
22206//UF
22207namespace abstract_base_n{
22208 /*
22209 ELC的虚基类模块,适用于unget
22210 处理虚基类到实例类的偏移与模板实例化差异
22211 原理:
22212 虚函数间接调用以从base_t&转为T&
22213 运行时计算偏移以从T*转换base_t*
22214 用法:is_common_attribute
22215 */
22216 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/pointer_off_set.hpp"
22217//pointer_off_set.hpp
22218//at namespace elc::defs::memory::abstract_base_n
22219/*
22220未完成的elc解释器base文件
22221由steve02081504与Alex0125设计、编写
22222转载时请在不对此文件做任何修改的同时注明出处
22223项目地址:https://github.com/ELC-lang/ELC
22224*/
22225/*
22226 ,??????????????????????????
22227 ????????????????????????????
22228 ?????????????????????????????+
22229 ?????+++++++++++++++++++++++++
22230 ?????+++++++++++++++++++++++++
22231 ??????++++++++++++++++++++++++
22232 ?????++
22233 ?????+++
22234 ??????+++IIIIIIIIIIIIIIIIII
22235 ?????+++++IIIIIIIIIIIIIIIIII
22236 ?????++++++++++++++++++++++++
22237 ??????+++++++++++++++++++++++:
22238 ?????++
22239 ?????+++
22240 ??????++
22241 ??????????????????????????????II
22242 ??????????????????????????????IIII
22243 ,?????????????????????????????IIIII+
22244 =???++++++++++++++++++++++++++III?
22245 ?++++++++++++++++++++++++++++I+
22246*/
22247inline thread_local pointer base_ptr;
22248inline thread_local ptrdiff_t off_set;
22249distinctive inline void is_base_ptr(void*a)noexcept{base_ptr=a;}
22250distinctive inline void is_instance_ptr(void*a)noexcept{off_set=get_off_set(note::from(a),note::to(base_ptr));}
22251distinctive inline void*get_ptr_after_off_set(void*a)noexcept{return apply_off_set(a,off_set);}
22252
22253//file_end
22254
22255 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_body.hpp"
22256 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/abstract_base_vtable.hpp"
22257//abstract_base_vtable.hpp
22258//at namespace elc::defs::memory::abstract_base_n
22259/*
22260未完成的elc解释器base文件
22261由steve02081504与Alex0125设计、编写
22262转载时请在不对此文件做任何修改的同时注明出处
22263项目地址:https://github.com/ELC-lang/ELC
22264*/
22265/*
22266 ,??????????????????????????
22267 ????????????????????????????
22268 ?????????????????????????????+
22269 ?????+++++++++++++++++++++++++
22270 ?????+++++++++++++++++++++++++
22271 ??????++++++++++++++++++++++++
22272 ?????++
22273 ?????+++
22274 ??????+++IIIIIIIIIIIIIIIIII
22275 ?????+++++IIIIIIIIIIIIIIIIII
22276 ?????++++++++++++++++++++++++
22277 ??????+++++++++++++++++++++++:
22278 ?????++
22279 ?????+++
22280 ??????++
22281 ??????????????????????????????II
22282 ??????????????????????????????IIII
22283 ,?????????????????????????????IIIII+
22284 =???++++++++++++++++++++++++++III?
22285 ?++++++++++++++++++++++++++++I+
22286*/
22288protected:
22290 virtual void* _abstract_method_get_resize_this(size_t size)=0;
22291 virtual void* _abstract_method_get_forward_resize_this(size_t size)=0;
22292
22295
22296 friend class get_n::unget_t;
22297 friend class get_n::get_resize_t;
22298 friend class get_n::get_size_of_get_t;
22299 friend class get_n::copy_get_t;
22300};
22301
22302//file_end
22303
22304 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_body.hpp"
22305 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/abstract_base.hpp"
22306//abstract_base.hpp
22307//at namespace elc::defs::memory::abstract_base_n
22308/*
22309未完成的elc解释器base文件
22310由steve02081504与Alex0125设计、编写
22311转载时请在不对此文件做任何修改的同时注明出处
22312项目地址:https://github.com/ELC-lang/ELC
22313*/
22314/*
22315 ,??????????????????????????
22316 ????????????????????????????
22317 ?????????????????????????????+
22318 ?????+++++++++++++++++++++++++
22319 ?????+++++++++++++++++++++++++
22320 ??????++++++++++++++++++++++++
22321 ?????++
22322 ?????+++
22323 ??????+++IIIIIIIIIIIIIIIIII
22324 ?????+++++IIIIIIIIIIIIIIIIII
22325 ?????++++++++++++++++++++++++
22326 ??????+++++++++++++++++++++++:
22327 ?????++
22328 ?????+++
22329 ??????++
22330 ??????????????????????????????II
22331 ??????????????????????????????IIII
22332 ,?????????????????????????????IIIII+
22333 =???++++++++++++++++++++++++++III?
22334 ?++++++++++++++++++++++++++++I+
22335*/
22336template<class T>
22338 T* abstract_method_copy_get_this(){
22339 is_base_ptr(this);
22340 return reinterpret_cast<T*>(get_ptr_after_off_set(this->_abstract_method_copy_get_this()));
22341 }
22342 T* abstract_method_get_resize_this(size_t size){
22343 is_base_ptr(this);
22344 return reinterpret_cast<T*>(get_ptr_after_off_set(this->_abstract_method_get_resize_this(size)));
22345 }
22346 T* abstract_method_get_forward_resize_this(size_t size){
22347 is_base_ptr(this);
22348 return reinterpret_cast<T*>(get_ptr_after_off_set(this->_abstract_method_get_forward_resize_this(size)));
22349 }
22350
22351 friend class get_n::unget_t;
22354 friend class get_n::copy_get_t;
22355};
22356
22357//file_end
22358
22359 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_body.hpp"
22360 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/instance_struct.hpp"
22361//instance_struct.hpp
22362//at namespace elc::defs::memory::abstract_base_n
22363/*
22364未完成的elc解释器base文件
22365由steve02081504与Alex0125设计、编写
22366转载时请在不对此文件做任何修改的同时注明出处
22367项目地址:https://github.com/ELC-lang/ELC
22368*/
22369/*
22370 ,??????????????????????????
22371 ????????????????????????????
22372 ?????????????????????????????+
22373 ?????+++++++++++++++++++++++++
22374 ?????+++++++++++++++++++++++++
22375 ??????++++++++++++++++++++++++
22376 ?????++
22377 ?????+++
22378 ??????+++IIIIIIIIIIIIIIIIII
22379 ?????+++++IIIIIIIIIIIIIIIIII
22380 ?????++++++++++++++++++++++++
22381 ??????+++++++++++++++++++++++:
22382 ?????++
22383 ?????+++
22384 ??????++
22385 ??????????????????????????????II
22386 ??????????????????????????????IIII
22387 ,?????????????????????????????IIIII+
22388 =???++++++++++++++++++++++++++III?
22389 ?++++++++++++++++++++++++++++I+
22390*/
22391push_and_disable_msvc_warning(26436);//无虚析构函数警告diss
22392template<class T>
22393class instance_struct:is_common_attribute(instance_struct),virtual public abstract_base_vtable{
22394protected:
22395 virtual void abstract_method_unget_this()noexcept_as(unget(get_handle(this)))override{unget(get_handle(this));}
22396 virtual void* _abstract_method_copy_get_this()noexcept(copy_get.able<T>?copy_get.nothrow<T>:1)override{
22397 if constexpr(copy_get.able<T>){
22398 is_instance_ptr(this);
22399 return copy_get(get_handle(this));
22400 }
22401 else{
22402 return get_handle(this);
22403 }
22404 }
22405 virtual void* _abstract_method_get_resize_this(size_t size)noexcept(get_resize.able<T>?get_resize.nothrow<T>:1)override{
22406 if constexpr(get_resize.able<T>){
22407 is_instance_ptr(this);
22408 return get_resize(get_handle(this),size);
22409 }
22410 else{
22411 return get_handle(this);
22412 }
22413 }
22414 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept(get_forward_resize.able<T>?get_forward_resize.nothrow<T>:1)override{
22415 if constexpr(get_forward_resize.able<T>){
22416 is_instance_ptr(this);
22417 return get_forward_resize(get_handle(this),size);
22418 }
22419 else{
22420 return get_handle(this);
22421 }
22422 }
22423 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return get_size_of_get(get_handle(this));}
22424};
22426
22427//file_end
22428
22429 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_body.hpp"
22430}
22431#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_export.hpp"
22432//_export.hpp
22433//at namespace elc::defs::memory
22434/*
22435未完成的elc解释器base文件
22436由steve02081504与Alex0125设计、编写
22437转载时请在不对此文件做任何修改的同时注明出处
22438项目地址:https://github.com/ELC-lang/ELC
22439*/
22440/*
22441 ,??????????????????????????
22442 ????????????????????????????
22443 ?????????????????????????????+
22444 ?????+++++++++++++++++++++++++
22445 ?????+++++++++++++++++++++++++
22446 ??????++++++++++++++++++++++++
22447 ?????++
22448 ?????+++
22449 ??????+++IIIIIIIIIIIIIIIIII
22450 ?????+++++IIIIIIIIIIIIIIIIII
22451 ?????++++++++++++++++++++++++
22452 ??????+++++++++++++++++++++++:
22453 ?????++
22454 ?????+++
22455 ??????++
22456 ??????????????????????????????II
22457 ??????????????????????????????IIII
22458 ,?????????????????????????????IIIII+
22459 =???++++++++++++++++++++++++++III?
22460 ?++++++++++++++++++++++++++++I+
22461*/
22462#define export using abstract_base_n::
22463export abstract_base;
22464export instance_struct;
22465#undef export
22466
22467//file_end
22468
22469#line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/abstract_base/_body.hpp"
22470
22471//file_end
22472
22473#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
22474
22475//#include "pool/_body.hpp"//依赖list
22476
22477#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/_body.hpp"
22478//_body.hpp
22479//at namespace elc::defs::memory
22480/*
22481未完成的elc解释器base文件
22482由steve02081504与Alex0125设计、编写
22483转载时请在不对此文件做任何修改的同时注明出处
22484项目地址:https://github.com/ELC-lang/ELC
22485*/
22486/*
22487 ,??????????????????????????
22488 ????????????????????????????
22489 ?????????????????????????????+
22490 ?????+++++++++++++++++++++++++
22491 ?????+++++++++++++++++++++++++
22492 ??????++++++++++++++++++++++++
22493 ?????++
22494 ?????+++
22495 ??????+++IIIIIIIIIIIIIIIIII
22496 ?????+++++IIIIIIIIIIIIIIIIII
22497 ?????++++++++++++++++++++++++
22498 ??????+++++++++++++++++++++++:
22499 ?????++
22500 ?????+++
22501 ??????++
22502 ??????????????????????????????II
22503 ??????????????????????????????IIII
22504 ,?????????????????????????????IIIII+
22505 =???++++++++++++++++++++++++++III?
22506 ?++++++++++++++++++++++++++++I+
22507*/
22508#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/defs.hpp"
22509//defs.hpp
22510//at namespace elc::defs::memory
22511/*
22512未完成的elc解释器base文件
22513由steve02081504与Alex0125设计、编写
22514转载时请在不对此文件做任何修改的同时注明出处
22515项目地址:https://github.com/ELC-lang/ELC
22516*/
22517/*
22518 ,??????????????????????????
22519 ????????????????????????????
22520 ?????????????????????????????+
22521 ?????+++++++++++++++++++++++++
22522 ?????+++++++++++++++++++++++++
22523 ??????++++++++++++++++++++++++
22524 ?????++
22525 ?????+++
22526 ??????+++IIIIIIIIIIIIIIIIII
22527 ?????+++++IIIIIIIIIIIIIIIIII
22528 ?????++++++++++++++++++++++++
22529 ??????+++++++++++++++++++++++:
22530 ?????++
22531 ?????+++
22532 ??????++
22533 ??????????????????????????????II
22534 ??????????????????????????????IIII
22535 ,?????????????????????????????IIIII+
22536 =???++++++++++++++++++++++++++III?
22537 ?++++++++++++++++++++++++++++I+
22538*/
22539namespace others_n{
22540 template<typename T>
22541 struct replace_able;
22542}
22544namespace ptr_n{
22545 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/_body.hpp"
22546//_body.hpp
22547//at namespace elc::defs::memory::ptr_n
22548/*
22549未完成的elc解释器base文件
22550由steve02081504与Alex0125设计、编写
22551转载时请在不对此文件做任何修改的同时注明出处
22552项目地址:https://github.com/ELC-lang/ELC
22553*/
22554/*
22555 ,??????????????????????????
22556 ????????????????????????????
22557 ?????????????????????????????+
22558 ?????+++++++++++++++++++++++++
22559 ?????+++++++++++++++++++++++++
22560 ??????++++++++++++++++++++++++
22561 ?????++
22562 ?????+++
22563 ??????+++IIIIIIIIIIIIIIIIII
22564 ?????+++++IIIIIIIIIIIIIIIIII
22565 ?????++++++++++++++++++++++++
22566 ??????+++++++++++++++++++++++:
22567 ?????++
22568 ?????+++
22569 ??????++
22570 ??????????????????????????????II
22571 ??????????????????????????????IIII
22572 ,?????????????????????????????IIIII+
22573 =???++++++++++++++++++++++++++III?
22574 ?++++++++++++++++++++++++++++I+
22575*/
22576#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/ref_t.hpp"
22577//ref_t.hpp
22578//at namespace elc::defs::memory::ptr_n
22579/*
22580未完成的elc解释器base文件
22581由steve02081504与Alex0125设计、编写
22582转载时请在不对此文件做任何修改的同时注明出处
22583项目地址:https://github.com/ELC-lang/ELC
22584*/
22585/*
22586 ,??????????????????????????
22587 ????????????????????????????
22588 ?????????????????????????????+
22589 ?????+++++++++++++++++++++++++
22590 ?????+++++++++++++++++++++++++
22591 ??????++++++++++++++++++++++++
22592 ?????++
22593 ?????+++
22594 ??????+++IIIIIIIIIIIIIIIIII
22595 ?????+++++IIIIIIIIIIIIIIIIII
22596 ?????++++++++++++++++++++++++
22597 ??????+++++++++++++++++++++++:
22598 ?????++
22599 ?????+++
22600 ??????++
22601 ??????????????????????????????II
22602 ??????????????????????????????IIII
22603 ,?????????????????????????????IIIII+
22604 =???++++++++++++++++++++++++++III?
22605 ?++++++++++++++++++++++++++++I+
22606*/
22607typedef size_t link_num_t;
22609 mutable link_num_t _ref_num=0;
22610public:
22611 constexpr ref_t()noexcept=default;
22612 constexpr explicit ref_t(never_ref_num_zero_t)noexcept:_ref_num(1){}
22613 inline constexpr void add_ref()const noexcept{_ref_num++;}
22614protected:
22615 [[nodiscard]]inline constexpr bool cut_ref()const noexcept{return!--_ref_num;}
22616public:
22617 inline constexpr void init_never_ref_num_zero()noexcept{add_ref();}
22618 [[nodiscard]]link_num_t link_num()const noexcept{return _ref_num;}
22619};
22620
22621//file_end
22622
22623#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/_body.hpp"
22624#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/ref_base.hpp"
22625//ref_base.hpp
22626//at namespace elc::defs::memory::ptr_n
22627/*
22628未完成的elc解释器base文件
22629由steve02081504与Alex0125设计、编写
22630转载时请在不对此文件做任何修改的同时注明出处
22631项目地址:https://github.com/ELC-lang/ELC
22632*/
22633/*
22634 ,??????????????????????????
22635 ????????????????????????????
22636 ?????????????????????????????+
22637 ?????+++++++++++++++++++++++++
22638 ?????+++++++++++++++++++++++++
22639 ??????++++++++++++++++++++++++
22640 ?????++
22641 ?????+++
22642 ??????+++IIIIIIIIIIIIIIIIII
22643 ?????+++++IIIIIIIIIIIIIIIIII
22644 ?????++++++++++++++++++++++++
22645 ??????+++++++++++++++++++++++:
22646 ?????++
22647 ?????+++
22648 ??????++
22649 ??????????????????????????????II
22650 ??????????????????????????????IIII
22651 ,?????????????????????????????IIIII+
22652 =???++++++++++++++++++++++++++III?
22653 ?++++++++++++++++++++++++++++I+
22654*/
22655enable_adl(the_waiting_for_destroy);
22656template<typename T>
22657void waiting_for_destroy(T*a)noexcept{
22659 return the_waiting_for_destroy(a);
22660 else
22661 template_error("this function should not be instantiated,please overload the function the_waiting_for_destroy in the namespace where this type is defined.");
22662}
22663enable_adl(the_destroy_and_free);
22664template<typename T>
22665void destroy_and_free(T*a)noexcept{
22667 return the_destroy_and_free(a);
22668 elseif constexpr(type_info<T>.has_attribute(build_by_get_only)&&type_info<T>.has_attribute(never_in_array))
22669 unget(a);
22670 else
22671 template_error("please overload the function the_destroy_and_free in the namespace where this type is defined.");
22672}
22673//
22674common_attribute_t ref_able;
22675common_attribute_t weak_ref_able;
22676
22677template<typename T>
22678constexpr bool was_ref_able=type_info<T>.has_attribute(ref_able);
22679template<typename T>
22680constexpr bool was_weak_ref_able=type_info<T>.has_attribute(weak_ref_able);
22681
22682template<typename T>
22683[[nodiscard]]link_num_t get_ref_num(const T*a)noexcept{
22684 if constexpr(!was_ref_able<T>)
22685 template_error("hey.");
22686 return attribute_ptr_cast<const ref_able>(a)->link_num();
22687}
22688template<typename T>
22689[[nodiscard]]link_num_t get_weak_ref_num(const T*a)noexcept{
22690 if constexpr(!was_weak_ref_able<T>)
22691 template_error("hey.");
22692 return attribute_ptr_cast<const weak_ref_able>(a)->link_num();
22693}
22694
22695//file_end
22696
22697#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/_body.hpp"
22698#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/ref_able.hpp"
22699//ref_able.hpp
22700//at namespace elc::defs::memory::ptr_n
22701/*
22702未完成的elc解释器base文件
22703由steve02081504与Alex0125设计、编写
22704转载时请在不对此文件做任何修改的同时注明出处
22705项目地址:https://github.com/ELC-lang/ELC
22706*/
22707/*
22708 ,??????????????????????????
22709 ????????????????????????????
22710 ?????????????????????????????+
22711 ?????+++++++++++++++++++++++++
22712 ?????+++++++++++++++++++++++++
22713 ??????++++++++++++++++++++++++
22714 ?????++
22715 ?????+++
22716 ??????+++IIIIIIIIIIIIIIIIII
22717 ?????+++++IIIIIIIIIIIIIIIIII
22718 ?????++++++++++++++++++++++++
22719 ??????+++++++++++++++++++++++:
22720 ?????++
22721 ?????+++
22722 ??????++
22723 ??????????????????????????????II
22724 ??????????????????????????????IIII
22725 ,?????????????????????????????IIIII+
22726 =???++++++++++++++++++++++++++III?
22727 ?++++++++++++++++++++++++++++I+
22728*/
22729template<typename T>
22731private:
22732 typedef ref_t base_t;
22733public:
22734 using base_t::base_t;
22735 inline void cut_ref()const noexcept{
22736 T*this_T=remove_const(get_handle(this));
22737 if(base_t::cut_ref())
22738 if constexpr(was_weak_ref_able<T>)
22739 if(get_weak_ref_num(this_T)!=0)
22740 waiting_for_destroy(this_T);
22741 else
22742 destroy_and_free(this_T);
22743 else
22744 destroy_and_free(this_T);
22745 }
22746};
22747
22748//file_end
22749
22750#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/_body.hpp"
22751#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/weak_ref_able.hpp"
22752//weak_ref_able.hpp
22753//at namespace elc::defs::memory::ptr_n
22754/*
22755未完成的elc解释器base文件
22756由steve02081504与Alex0125设计、编写
22757转载时请在不对此文件做任何修改的同时注明出处
22758项目地址:https://github.com/ELC-lang/ELC
22759*/
22760/*
22761 ,??????????????????????????
22762 ????????????????????????????
22763 ?????????????????????????????+
22764 ?????+++++++++++++++++++++++++
22765 ?????+++++++++++++++++++++++++
22766 ??????++++++++++++++++++++++++
22767 ?????++
22768 ?????+++
22769 ??????+++IIIIIIIIIIIIIIIIII
22770 ?????+++++IIIIIIIIIIIIIIIIII
22771 ?????++++++++++++++++++++++++
22772 ??????+++++++++++++++++++++++:
22773 ?????++
22774 ?????+++
22775 ??????++
22776 ??????????????????????????????II
22777 ??????????????????????????????IIII
22778 ,?????????????????????????????IIIII+
22779 =???++++++++++++++++++++++++++III?
22780 ?++++++++++++++++++++++++++++I+
22781*/
22782template<typename T>
22784private:
22785 typedef ref_t base_t;
22786public:
22787 inline void cut_ref()const noexcept{
22788 if constexpr(!was_ref_able<T>)
22789 template_error("base on ref_able before base on weak_ref_able,please.");
22790 T*this_T=remove_const(get_handle(this));
22791 if(base_t::cut_ref())
22792 if(get_ref_num(this_T)==0)
22793 destroy_and_free(this_T);
22794 }
22795};
22796
22797//file_end
22798
22799#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ref/_body.hpp"
22800
22801//file_end
22802
22803 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/defs.hpp"
22804 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/_body.hpp"
22805//_body.hpp
22806//at namespace elc::defs::memory::ptr_n
22807/*
22808未完成的elc解释器base文件
22809由steve02081504与Alex0125设计、编写
22810转载时请在不对此文件做任何修改的同时注明出处
22811项目地址:https://github.com/ELC-lang/ELC
22812*/
22813/*
22814 ,??????????????????????????
22815 ????????????????????????????
22816 ?????????????????????????????+
22817 ?????+++++++++++++++++++++++++
22818 ?????+++++++++++++++++++++++++
22819 ??????++++++++++++++++++++++++
22820 ?????++
22821 ?????+++
22822 ??????+++IIIIIIIIIIIIIIIIII
22823 ?????+++++IIIIIIIIIIIIIIIIII
22824 ?????++++++++++++++++++++++++
22825 ??????+++++++++++++++++++++++:
22826 ?????++
22827 ?????+++
22828 ??????++
22829 ??????????????????????????????II
22830 ??????????????????????????????IIII
22831 ,?????????????????????????????IIIII+
22832 =???++++++++++++++++++++++++++III?
22833 ?++++++++++++++++++++++++++++I+
22834*/
22835#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/base_ptr_t.hpp"
22836//base_ptr_t.hpp
22837//at namespace elc::defs::memory::ptr_n
22838/*
22839未完成的elc解释器base文件
22840由steve02081504与Alex0125设计、编写
22841转载时请在不对此文件做任何修改的同时注明出处
22842项目地址:https://github.com/ELC-lang/ELC
22843*/
22844/*
22845 ,??????????????????????????
22846 ????????????????????????????
22847 ?????????????????????????????+
22848 ?????+++++++++++++++++++++++++
22849 ?????+++++++++++++++++++++++++
22850 ??????++++++++++++++++++++++++
22851 ?????++
22852 ?????+++
22853 ??????+++IIIIIIIIIIIIIIIIII
22854 ?????+++++IIIIIIIIIIIIIIIIII
22855 ?????++++++++++++++++++++++++
22856 ??????+++++++++++++++++++++++:
22857 ?????++
22858 ?????+++
22859 ??????++
22860 ??????????????????????????????II
22861 ??????????????????????????????IIII
22862 ,?????????????????????????????IIIII+
22863 =???++++++++++++++++++++++++++III?
22864 ?++++++++++++++++++++++++++++I+
22865*/
22866//copy from old ELC & adepted.
22867template<class T>
22869protected:
22870 mutable T*_to;
22871 explicit same_ptr_p_t(T*a)noexcept:_to(a){}
22872public:
22873 same_ptr_p_t(const same_ptr_p_t&)noexcept=default;
22874 [[nodiscard]]T*get()const noexcept{return _to;}
22875};
22876template<class T,typename ref_type>
22878 using same_ptr_p_t<T>::_to;
22879 explicit same_ref_p_t(T*a)noexcept:same_ptr_p_t<T>(a){}
22880 explicit same_ref_p_t(const same_ptr_p_t<T>&a)noexcept:same_ptr_p_t<T>(a){}
22881
22882 void swap_with(same_ref_p_t&a)noexcept{swap(_to,a._to);}
22883
22884 static constexpr bool cut_nothrow=noexcept(declvalue(ref_type).cut_ref());
22885protected:
22886 static void cut_ref(T*a)noexcept(cut_nothrow){attribute_ptr_cast<ref_type>(a)->cut_ref();}
22887 static void add_ref(T*a)noexcept{attribute_ptr_cast<ref_type>(a)->add_ref();}
22888
22889 void cut_ref()const noexcept_as(cut_ref(nullptr)){cut_ref(_to);}
22890 void add_ref()const noexcept{add_ref(_to);}
22891};
22892
22893template<class T,typename ref_type>
22895 a.swap_with(b);
22896}
22897
22898template<class T,typename ref_type,bool do_replace_check>
22899struct ptr_t:same_ref_p_t<T,ref_type>{
22901
22905 using base_t::cut_nothrow;
22906 using same_ref::add_ref;
22907 using same_ref::cut_ref;
22908 using same_ref::swap_with;
22909 using same_ptr::_to;
22910
22911 explicit ptr_t(T*a,special_init_t)noexcept:same_ref(a){}
22912 constexpr ptr_t(T*a)noexcept:same_ref(a){add_ref();}
22913 ptr_t(const same_ptr&a)noexcept:same_ref(a){
22914 if constexpr(type_info<T>.has_attribute(weak_ref_able) && type_info<ref_type> == type_info<ref_able<remove_cv<T>>>)
22915 if(get_ref_num(_to))
22916 add_ref();
22917 else
22918 add_ref(_to=null_ptr);
22919 else
22920 add_ref();
22921 }
22922 ptr_t(const same_ref&a)noexcept:same_ref(a){add_ref();}
22923 ptr_t(const ptr_t&a)noexcept:ptr_t((same_ptr&)a){}
22924 ptr_t(const ptr_t<remove_cv<T>,ref_type,do_replace_check>&a)noexcept requires(type_info<remove_cv<T>>!=type_info<T>):ptr_t(a.get()){}
22925 ptr_t(ptr_t&&a)noexcept:ptr_t((same_ptr&)a){
22926 //为什么不默认构造后swap_with?
22927 /*
22928 直接构造:
22929 对目标进行addref
22930 移动对象析构(单次cutref)
22931 总耗费4
22932 默认构造后swap_with:
22933 对nullptr进行addref
22934 交换ptr值
22935 移动对象析构(单次cutref)
22936 总耗费6
22937
22938 总结:多此一举
22939 */
22940 }
22941 constexpr ptr_t(nullptr_t=nullptr)noexcept:ptr_t(null_ptr){}
22942 constexpr ptr_t(null_ptr_t)noexcept:ptr_t((T*)(null_ptr)){}
22943 ~ptr_t()noexcept(cut_nothrow){cut_ref();}
22944
22945 static constexpr bool reset_nothrow=cut_nothrow;
22946 void reset(T*a)const noexcept(reset_nothrow){auto tmp=_to;add_ref(_to=a);cut_ref(tmp);}
22947 void reset(nullptr_t=nullptr)const noexcept(reset_nothrow){reset(null_ptr);}
22948public:
22949 static constexpr bool replace_check_nothrow=(type_info<T>.not_has_attribute(replace_able))||reset_nothrow;
22950 inline void replace_check()const noexcept(replace_check_nothrow){
22951 if constexpr(do_replace_check&&type_info<remove_cvref<T>>.has_attribute(replace_able))
22952 if(attribute_ptr_cast<replace_able>(_to)->replaced())
22953 reset(attribute_ptr_cast<replace_able>(_to)->get_ptr());
22954 }
22955 inline void do_replace(T*p)noexcept(replace_check_nothrow&&reset_nothrow){
22956 if constexpr(type_info<remove_cvref<T>>.has_attribute(replace_able)){
22957 attribute_ptr_cast<replace_able>(_to)->be_replace_as(p);
22958 reset(p);
22959 }
22960 }
22961 template<typename ref_type_,bool do_replace_check_>
22962 inline void do_replace(const ptr_t<T,ref_type_,do_replace_check_>&p)noexcept(replace_check_nothrow&&reset_nothrow){
22963 do_replace(p.get());
22964 }
22965 static constexpr bool get_nothrow=replace_check_nothrow;
22966 [[nodiscard]]T*get()const noexcept(get_nothrow){
22967 replace_check();
22968 return base_t::get();
22969 }
22970 [[nodiscard]]bool unique()const noexcept{return attribute_ptr_cast<ref_able>(get())->link_num()==1;}
22971 [[nodiscard]]constexpr
22973 unstable_hash_t,hash_t> hash()const noexcept_as(elc::defs::hash(get())){//注意:当T可replace时,同一ptr的hash可能变动
22974 using elc::defs::hash;
22975 return hash(get());
22976 }
22977
22978 [[nodiscard]]inline auto operator==(const T*a)const noexcept_as(pointer_equal(add_const(declvalue(const this_t&).get()),a)){
22979 return pointer_equal(add_const(get()),a);
22980 }
22981 [[nodiscard]]inline auto operator==(nullptr_t)const noexcept_as(operator==(null_ptr)){
22982 return operator==(null_ptr);
22983 }
22984 [[nodiscard]]inline auto operator==(null_ptr_t)const noexcept_as(operator==((T*)null_ptr)){
22985 return operator==((T*)null_ptr);
22986 }
22987 template<typename ref_type_,bool do_replace_check_>
22988 [[nodiscard]]inline auto operator==(const ptr_t<T,ref_type_,do_replace_check_>&b)const
22990 declvalue(const this_t&).get(),
22991 b.get())
22992 ){
22993 return pointer_equal(get(),b.get());
22994 }
22995 template<typename ref_type_,bool do_replace_check_> requires(type_info<remove_cv<T>>!=type_info<T>)
22996 [[nodiscard]]inline auto operator==(const ptr_t<const T,ref_type_,do_replace_check_>&b)const
22998 declvalue(const this_t&).get(),
22999 b.get())
23000 ){
23001 return pointer_equal(get(),b.get());
23002 }
23003 template<typename ref_type_,bool do_replace_check_> requires(type_info<remove_cv<T>>!=type_info<T>)
23004 [[nodiscard]]inline auto operator==(const ptr_t<remove_cv<T>,ref_type_,do_replace_check_>&b)const
23006 declvalue(const this_t&).get(),
23007 add_const(b.get()))
23008 ){
23009 return pointer_equal(get(),add_const(b.get()));
23010 }
23011};
23012
23013template<typename T_,typename T,typename ref_type,bool do_replace_check,enable_if(type_info<T_>.base_on<T>)>
23014[[nodiscard]]inline auto operator==(const T_*a,ptr_t<T,ref_type,do_replace_check>&b)noexcept_as(b.operator==(static_cast<const T*>(a))){
23015 return b.operator==(static_cast<const T*>(a));
23016}
23017
23018template<typename T,typename T_> requires(equal.able<T,T_>)
23019[[nodiscard]]inline auto operator!=(T&&a,T_&&b)noexcept_as(!(a==b)){
23020 return !(a==b);
23021}
23022
23023template<class T,typename ref_type,bool do_replace_check>
23024struct base_ptr_t:ptr_t<T,ref_type,do_replace_check>{
23025 static_assert(type_info<T>.base_on<ref_type>);
23028 using typename base_t::same_ref;
23029 using typename base_t::same_ptr;
23030 using base_t::reset;
23031 using base_t::get;
23032 using same_ref::swap_with;
23033 using same_ptr::_to;
23034
23035 using base_t::get_nothrow;
23036 using base_t::reset_nothrow;
23037
23039
23041 base_ptr_t(base_ptr_t&&a)noexcept:base_t(move(a)){}
23042
23043 [[nodiscard]]T*operator->()const noexcept(get_nothrow){return get();}
23044 [[nodiscard]]T&operator*()const noexcept(get_nothrow){return*get();}
23045 [[nodiscard]]explicit operator bool()const noexcept(get_nothrow){return bool(pointer_to_bool(get()));}
23046 [[nodiscard]]auto operator!()const noexcept(get_nothrow){return!pointer_to_bool(get());}
23047 [[nodiscard]]explicit operator T*()const noexcept(get_nothrow){return get();}
23048
23049 base_ptr_t&operator=(T*a)&noexcept(reset_nothrow){reset(a);return*this;}
23050 base_ptr_t&operator=(const same_ptr&a)&noexcept(reset_nothrow&&get_nothrow){reset(a.get());return*this;}
23051 base_ptr_t&operator=(const base_ptr_t&a)&noexcept(reset_nothrow&&get_nothrow){reset(a.get());return*this;}
23052 base_ptr_t&operator=(same_ref&&a)&noexcept{swap_with(a);return*this;}
23053 base_ptr_t&operator=(base_ptr_t&&a)&noexcept{swap_with(a);return*this;}
23054 base_ptr_t&operator=(null_ptr_t)&noexcept(reset_nothrow){return*this=(T*)null_ptr;}
23055 base_ptr_t&operator=(nullptr_t)&noexcept(reset_nothrow){return*this=null_ptr;}
23056
23057private:
23058 static inline thread_local class for_delete_t{
23059 T*_m;
23060 friend class this_t;
23061 for_delete_t*operator()(T*a)noexcept{
23062 _m=a;
23063 return this;
23064 }
23065 public:
23066 static void operator delete(void*a)noexcept{}
23067 static void operator delete(for_delete_t*a,std::destroying_delete_t)noexcept_as(destroy(declvalue(T*))){
23068 destroy((a)->_m);
23069 }
23070 }for_delete{};
23071public:
23072 [[nodiscard]]explicit operator bool()noexcept(get_nothrow){return add_const(this)->operator bool();}
23073 [[nodiscard]]distinctive operator for_delete_t*()noexcept(get_nothrow){return for_delete(get());}
23074
23075 template<typename...Args> requires(invoke<T>.able<Args...>)
23076 inline decltype(auto)operator()(Args&&... rest)noexcept(invoke<T>.nothrow<Args...>){return(operator*())(forward<Args>(rest)...);}
23077};
23078
23079//file_end
23080
23081#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/_body.hpp"
23082#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/comn_ptr_t.hpp"
23083//comn_ptr_t.hpp
23084//at namespace elc::defs::memory::ptr_n
23085/*
23086未完成的elc解释器base文件
23087由steve02081504与Alex0125设计、编写
23088转载时请在不对此文件做任何修改的同时注明出处
23089项目地址:https://github.com/ELC-lang/ELC
23090*/
23091/*
23092 ,??????????????????????????
23093 ????????????????????????????
23094 ?????????????????????????????+
23095 ?????+++++++++++++++++++++++++
23096 ?????+++++++++++++++++++++++++
23097 ??????++++++++++++++++++++++++
23098 ?????++
23099 ?????+++
23100 ??????+++IIIIIIIIIIIIIIIIII
23101 ?????+++++IIIIIIIIIIIIIIIIII
23102 ?????++++++++++++++++++++++++
23103 ??????+++++++++++++++++++++++:
23104 ?????++
23105 ?????+++
23106 ??????++
23107 ??????????????????????????????II
23108 ??????????????????????????????IIII
23109 ,?????????????????????????????IIIII+
23110 =???++++++++++++++++++++++++++III?
23111 ?++++++++++++++++++++++++++++I+
23112*/
23113template<typename T>
23115
23116//file_end
23117
23118#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/_body.hpp"
23119#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/weak_ptr_t.hpp"
23120//weak_ptr_t.hpp
23121//at namespace elc::defs::memory::ptr_n
23122/*
23123未完成的elc解释器base文件
23124由steve02081504与Alex0125设计、编写
23125转载时请在不对此文件做任何修改的同时注明出处
23126项目地址:https://github.com/ELC-lang/ELC
23127*/
23128/*
23129 ,??????????????????????????
23130 ????????????????????????????
23131 ?????????????????????????????+
23132 ?????+++++++++++++++++++++++++
23133 ?????+++++++++++++++++++++++++
23134 ??????++++++++++++++++++++++++
23135 ?????++
23136 ?????+++
23137 ??????+++IIIIIIIIIIIIIIIIII
23138 ?????+++++IIIIIIIIIIIIIIIIII
23139 ?????++++++++++++++++++++++++
23140 ??????+++++++++++++++++++++++:
23141 ?????++
23142 ?????+++
23143 ??????++
23144 ??????????????????????????????II
23145 ??????????????????????????????IIII
23146 ,?????????????????????????????IIIII+
23147 =???++++++++++++++++++++++++++III?
23148 ?++++++++++++++++++++++++++++I+
23149*/
23150template<typename T>
23152
23153//file_end
23154
23155#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/_body.hpp"
23156#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/nocheck_ptr_t.hpp"
23157//nocheck_ptr_t.hpp
23158//at namespace elc::defs::memory::ptr_n
23159/*
23160未完成的elc解释器base文件
23161由steve02081504与Alex0125设计、编写
23162转载时请在不对此文件做任何修改的同时注明出处
23163项目地址:https://github.com/ELC-lang/ELC
23164*/
23165/*
23166 ,??????????????????????????
23167 ????????????????????????????
23168 ?????????????????????????????+
23169 ?????+++++++++++++++++++++++++
23170 ?????+++++++++++++++++++++++++
23171 ??????++++++++++++++++++++++++
23172 ?????++
23173 ?????+++
23174 ??????+++IIIIIIIIIIIIIIIIII
23175 ?????+++++IIIIIIIIIIIIIIIIII
23176 ?????++++++++++++++++++++++++
23177 ??????+++++++++++++++++++++++:
23178 ?????++
23179 ?????+++
23180 ??????++
23181 ??????????????????????????????II
23182 ??????????????????????????????IIII
23183 ,?????????????????????????????IIIII+
23184 =???++++++++++++++++++++++++++III?
23185 ?++++++++++++++++++++++++++++I+
23186*/
23187template<typename T>
23189
23190//file_end
23191
23192#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/_body.hpp"
23193#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/deduction_guides.hpp"
23194//deduction_guides.hpp
23195//at namespace elc::defs::memory::ptr_n
23196/*
23197未完成的elc解释器base文件
23198由steve02081504与Alex0125设计、编写
23199转载时请在不对此文件做任何修改的同时注明出处
23200项目地址:https://github.com/ELC-lang/ELC
23201*/
23202/*
23203 ,??????????????????????????
23204 ????????????????????????????
23205 ?????????????????????????????+
23206 ?????+++++++++++++++++++++++++
23207 ?????+++++++++++++++++++++++++
23208 ??????++++++++++++++++++++++++
23209 ?????++
23210 ?????+++
23211 ??????+++IIIIIIIIIIIIIIIIII
23212 ?????+++++IIIIIIIIIIIIIIIIII
23213 ?????++++++++++++++++++++++++
23214 ??????+++++++++++++++++++++++:
23215 ?????++
23216 ?????+++
23217 ??????++
23218 ??????????????????????????????II
23219 ??????????????????????????????IIII
23220 ,?????????????????????????????IIIII+
23221 =???++++++++++++++++++++++++++III?
23222 ?++++++++++++++++++++++++++++I+
23223*/
23224template<class T,common_attribute_t ref_type,bool has_check>
23225base_ptr_t(T*) -> base_ptr_t<remove_cvref<T>,ref_type<remove_cvref<T>>,has_check>;
23226
23227template<class T,common_attribute_t ref_type,bool has_check>
23229
23230//file_end
23231
23232#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/ptr/_body.hpp"
23233
23234//file_end
23235
23236 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/defs.hpp"
23237}
23238
23239//file_end
23240
23241#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/_body.hpp"
23242#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/_export.hpp"
23243//_export.hpp
23244//at namespace elc
23245/*
23246未完成的elc解释器base文件
23247由steve02081504与Alex0125设计、编写
23248转载时请在不对此文件做任何修改的同时注明出处
23249项目地址:https://github.com/ELC-lang/ELC
23250*/
23251/*
23252 ,??????????????????????????
23253 ????????????????????????????
23254 ?????????????????????????????+
23255 ?????+++++++++++++++++++++++++
23256 ?????+++++++++++++++++++++++++
23257 ??????++++++++++++++++++++++++
23258 ?????++
23259 ?????+++
23260 ??????+++IIIIIIIIIIIIIIIIII
23261 ?????+++++IIIIIIIIIIIIIIIIII
23262 ?????++++++++++++++++++++++++
23263 ??????+++++++++++++++++++++++:
23264 ?????++
23265 ?????+++
23266 ??????++
23267 ??????????????????????????????II
23268 ??????????????????????????????IIII
23269 ,?????????????????????????????IIIII+
23270 =???++++++++++++++++++++++++++III?
23271 ?++++++++++++++++++++++++++++I+
23272*/
23273#define export using ptr_n::
23274export ref_able;
23275export weak_ref_able;
23276export base_ptr_t;
23277export comn_ptr_t;
23278export weak_ptr_t;
23279#undef export
23280
23281//file_end
23282
23283#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/_body.hpp"
23284#if defined(ELC_TEST_ON)
23285 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/_test.hpp"
23286//_test.hpp
23287//at namespace elc::defs::memory::ptr_n
23288/*
23289未完成的elc解释器base文件
23290由steve02081504与Alex0125设计、编写
23291转载时请在不对此文件做任何修改的同时注明出处
23292项目地址:https://github.com/ELC-lang/ELC
23293*/
23294/*
23295 ,??????????????????????????
23296 ????????????????????????????
23297 ?????????????????????????????+
23298 ?????+++++++++++++++++++++++++
23299 ?????+++++++++++++++++++++++++
23300 ??????++++++++++++++++++++++++
23301 ?????++
23302 ?????+++
23303 ??????+++IIIIIIIIIIIIIIIIII
23304 ?????+++++IIIIIIIIIIIIIIIIII
23305 ?????++++++++++++++++++++++++
23306 ??????+++++++++++++++++++++++:
23307 ?????++
23308 ?????+++
23309 ??????++
23310 ??????????????????????????????II
23311 ??????????????????????????????IIII
23312 ,?????????????????????????????IIIII+
23313 =???++++++++++++++++++++++++++III?
23314 ?++++++++++++++++++++++++++++I+
23315*/
23316namespace ptr_n{
23317 struct tester:type_info_t<tester>::template_name
23318 with_common_attribute<ref_able,weak_ref_able,never_in_array>,build_by_get_only{};
23319 void waiting_for_destroy(tester*)noexcept{}
23320 inline void test(){
23321 ELC_TEST_EVENTNAME("ptr部分测试");
23322 {
23323 comn_ptr_t a=get<tester>();
23324 weak_ptr_t b=a;
23325 }
23326 check_memory_lack();
23327 }
23328 inline void test_log_out(){
23329 }
23330 inline void test_end(){
23331 }
23332}
23333
23334//file_end
23335
23336 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/ptr/_body.hpp"
23337#endif
23338
23339//file_end
23340
23341#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
23342//依赖list
23343#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/other/_body.hpp"
23344//_body.hpp
23345//at namespace elc::defs::memory
23346/*
23347未完成的elc解释器base文件
23348由steve02081504与Alex0125设计、编写
23349转载时请在不对此文件做任何修改的同时注明出处
23350项目地址:https://github.com/ELC-lang/ELC
23351*/
23352/*
23353 ,??????????????????????????
23354 ????????????????????????????
23355 ?????????????????????????????+
23356 ?????+++++++++++++++++++++++++
23357 ?????+++++++++++++++++++++++++
23358 ??????++++++++++++++++++++++++
23359 ?????++
23360 ?????+++
23361 ??????+++IIIIIIIIIIIIIIIIII
23362 ?????+++++IIIIIIIIIIIIIIIIII
23363 ?????++++++++++++++++++++++++
23364 ??????+++++++++++++++++++++++:
23365 ?????++
23366 ?????+++
23367 ??????++
23368 ??????????????????????????????II
23369 ??????????????????????????????IIII
23370 ,?????????????????????????????IIIII+
23371 =???++++++++++++++++++++++++++III?
23372 ?++++++++++++++++++++++++++++I+
23373*/
23374namespace others_n{
23375 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/other/replace_able.hpp"
23376//replace_able.hpp
23377//at namespace elc::defs::memory::others_n
23378/*
23379未完成的elc解释器base文件
23380由steve02081504与Alex0125设计、编写
23381转载时请在不对此文件做任何修改的同时注明出处
23382项目地址:https://github.com/ELC-lang/ELC
23383*/
23384/*
23385 ,??????????????????????????
23386 ????????????????????????????
23387 ?????????????????????????????+
23388 ?????+++++++++++++++++++++++++
23389 ?????+++++++++++++++++++++++++
23390 ??????++++++++++++++++++++++++
23391 ?????++
23392 ?????+++
23393 ??????+++IIIIIIIIIIIIIIIIII
23394 ?????+++++IIIIIIIIIIIIIIIIII
23395 ?????++++++++++++++++++++++++
23396 ??????+++++++++++++++++++++++:
23397 ?????++
23398 ?????+++
23399 ??????++
23400 ??????????????????????????????II
23401 ??????????????????????????????IIII
23402 ,?????????????????????????????IIIII+
23403 =???++++++++++++++++++++++++++III?
23404 ?++++++++++++++++++++++++++++I+
23405*/
23406//此属性配合 "../ptr" 食用
23407template<typename T>
23409private:
23410 mutable T*_m;
23411public:
23412 constexpr replace_able()noexcept:_m(get_handle(this)){}
23413 constexpr ~replace_able()noexcept{
23414 if(replaced())
23415 attribute_ptr_cast<ref_able>(_m)->cut_ref();
23416 }
23417 constexpr bool replaced()const noexcept{return _m!=get_handle(this);}
23418 constexpr T*get_ptr()const noexcept{
23419 if(!replaced())
23420 return _m;
23421 else
23422 return attribute_ptr_cast<replace_able>(_m)->get_ptr();
23423 }
23424 constexpr void be_replace_as(T*new_p)noexcept{
23425 if(replaced())
23426 attribute_ptr_cast<ref_able>(_m)->cut_ref();
23427 _m=new_p;
23428 if(replaced())
23429 attribute_ptr_cast<ref_able>(_m)->add_ref();
23430 }
23431 constexpr void be_replace_as(nullptr_t)noexcept{be_replace_as(null_ptr);}
23432};
23433
23434//file_end
23435
23436 #line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/other/_body.hpp"
23437 //依赖list
23438 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/other/can_map_all.hpp"
23439//can_map_all.hpp
23440//at namespace elc::defs::memory::others_n
23441/*
23442未完成的elc解释器base文件
23443由steve02081504与Alex0125设计、编写
23444转载时请在不对此文件做任何修改的同时注明出处
23445项目地址:https://github.com/ELC-lang/ELC
23446*/
23447/*
23448 ,??????????????????????????
23449 ????????????????????????????
23450 ?????????????????????????????+
23451 ?????+++++++++++++++++++++++++
23452 ?????+++++++++++++++++++++++++
23453 ??????++++++++++++++++++++++++
23454 ?????++
23455 ?????+++
23456 ??????+++IIIIIIIIIIIIIIIIII
23457 ?????+++++IIIIIIIIIIIIIIIIII
23458 ?????++++++++++++++++++++++++
23459 ??????+++++++++++++++++++++++:
23460 ?????++
23461 ?????+++
23462 ??????++
23463 ??????????????????????????????II
23464 ??????????????????????????????IIII
23465 ,?????????????????????????????IIIII+
23466 =???++++++++++++++++++++++++++III?
23467 ?++++++++++++++++++++++++++++I+
23468*/
23469template<typename T>
23470struct can_map_all:cons_t<can_map_all<T>>,is_common_attribute(can_map_all){
23472private:
23473 distinctive static inline list_t<this_t> type_list;
23474
23475 template<class,class func_t>
23476 friend inline void map_all_helper(func_t&&a);
23477public:
23478 constexpr can_map_all()noexcept{
23479 type_list.add(this);
23480 }
23481};
23482template<class T,class func_t>
23483inline void map_all_helper(func_t&&a){
23484 auto tmp=can_map_all<T>::type_list.begin();
23485 auto end=can_map_all<T>::type_list.end();
23486 while(tmp!=end)
23487 a(get_handle<T,can_map_all>(tmp++));
23488}
23489#define expr declvalue(func_t)(declvalue(T*))
23490template<class T,class func_t,enable_if(was_not_an_ill_form(expr))>
23491inline void map_all(func_t&&a)noexcept_as(expr){
23492 map_all_helper<T,func_t>(forward<func_t>(a));
23493}
23494#undef expr
23495
23496//file_end
23497
23498 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/other/_body.hpp"
23499}
23500
23501//file_end
23502
23503#line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
23504
23505//#include "gc/_body.hpp"//NOTE:gc不在此处定义,因为它依赖container
23506
23507#if defined(ELC_TEST_ON)
23508 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_test.hpp"
23509//_test.hpp
23510//at namespace elc::defs::memory
23511/*
23512未完成的elc解释器base文件
23513由steve02081504与Alex0125设计、编写
23514转载时请在不对此文件做任何修改的同时注明出处
23515项目地址:https://github.com/ELC-lang/ELC
23516*/
23517/*
23518 ,??????????????????????????
23519 ????????????????????????????
23520 ?????????????????????????????+
23521 ?????+++++++++++++++++++++++++
23522 ?????+++++++++++++++++++++++++
23523 ??????++++++++++++++++++++++++
23524 ?????++
23525 ?????+++
23526 ??????+++IIIIIIIIIIIIIIIIII
23527 ?????+++++IIIIIIIIIIIIIIIIII
23528 ?????++++++++++++++++++++++++
23529 ??????+++++++++++++++++++++++:
23530 ?????++
23531 ?????+++
23532 ??????++
23533 ??????????????????????????????II
23534 ??????????????????????????????IIII
23535 ,?????????????????????????????IIIII+
23536 =???++++++++++++++++++++++++++III?
23537 ?++++++++++++++++++++++++++++I+
23538*/
23539inline void test(){
23540 ELC_TEST_EVENTNAME("memory部分测试");
23541 alloc_n::test();
23542 lifetime_n::test();
23543 get_n::test();
23544 //pool_n::test();
23545}
23546inline void test_log_out(){
23547 alloc_n::test_log_out();
23548 lifetime_n::test_log_out();
23549 get_n::test_log_out();
23550 //pool_n::test_log_out();
23551}
23552inline void test_end(){
23553 alloc_n::test_end();
23554 lifetime_n::test_end();
23555 get_n::test_end();
23556 //pool_n::test_end();
23557}
23558
23559//file_end
23560
23561 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/_body.hpp"
23562#endif
23563
23564//file_end
23565
23566 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
23567 }
23568 using namespace memory;
23569
23570 namespace container{
23571 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
23572//_body.hpp
23573//at namespace elc::defs::container
23574/*
23575未完成的elc解释器base文件
23576由steve02081504与Alex0125设计、编写
23577转载时请在不对此文件做任何修改的同时注明出处
23578项目地址:https://github.com/ELC-lang/ELC
23579*/
23580/*
23581 ,??????????????????????????
23582 ????????????????????????????
23583 ?????????????????????????????+
23584 ?????+++++++++++++++++++++++++
23585 ?????+++++++++++++++++++++++++
23586 ??????++++++++++++++++++++++++
23587 ?????++
23588 ?????+++
23589 ??????+++IIIIIIIIIIIIIIIIII
23590 ?????+++++IIIIIIIIIIIIIIIIII
23591 ?????++++++++++++++++++++++++
23592 ??????+++++++++++++++++++++++:
23593 ?????++
23594 ?????+++
23595 ??????++
23596 ??????????????????????????????II
23597 ??????????????????????????????IIII
23598 ,?????????????????????????????IIIII+
23599 =???++++++++++++++++++++++++++III?
23600 ?++++++++++++++++++++++++++++I+
23601*/
23602#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_body.hpp"
23603//_body.hpp
23604//at namespace elc::defs::container
23605/*
23606未完成的elc解释器base文件
23607由steve02081504与Alex0125设计、编写
23608转载时请在不对此文件做任何修改的同时注明出处
23609项目地址:https://github.com/ELC-lang/ELC
23610*/
23611/*
23612 ,??????????????????????????
23613 ????????????????????????????
23614 ?????????????????????????????+
23615 ?????+++++++++++++++++++++++++
23616 ?????+++++++++++++++++++++++++
23617 ??????++++++++++++++++++++++++
23618 ?????++
23619 ?????+++
23620 ??????+++IIIIIIIIIIIIIIIIII
23621 ?????+++++IIIIIIIIIIIIIIIIII
23622 ?????++++++++++++++++++++++++
23623 ??????+++++++++++++++++++++++:
23624 ?????++
23625 ?????+++
23626 ??????++
23627 ??????????????????????????????II
23628 ??????????????????????????????IIII
23629 ,?????????????????????????????IIIII+
23630 =???++++++++++++++++++++++++++III?
23631 ?++++++++++++++++++++++++++++I+
23632*/
23633#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/defs.hpp"
23634//defs.hpp
23635//at namespace elc::defs::container
23636/*
23637未完成的elc解释器base文件
23638由steve02081504与Alex0125设计、编写
23639转载时请在不对此文件做任何修改的同时注明出处
23640项目地址:https://github.com/ELC-lang/ELC
23641*/
23642/*
23643 ,??????????????????????????
23644 ????????????????????????????
23645 ?????????????????????????????+
23646 ?????+++++++++++++++++++++++++
23647 ?????+++++++++++++++++++++++++
23648 ??????++++++++++++++++++++++++
23649 ?????++
23650 ?????+++
23651 ??????+++IIIIIIIIIIIIIIIIII
23652 ?????+++++IIIIIIIIIIIIIIIIII
23653 ?????++++++++++++++++++++++++
23654 ??????+++++++++++++++++++++++:
23655 ?????++
23656 ?????+++
23657 ??????++
23658 ??????????????????????????????II
23659 ??????????????????????????????IIII
23660 ,?????????????????????????????IIIII+
23661 =???++++++++++++++++++++++++++III?
23662 ?++++++++++++++++++++++++++++I+
23663*/
23664namespace array_n{
23665 template<typename T>
23666 class array_t{
23667 typedef array_t<T>this_t;
23668 T*_m;
23669
23670 /*return{ptr};*/
23671 constexpr array_t(T*a)noexcept:_m(a){}
23672 /*返回一个自身的副本*/
23673 [[nodiscard]]this_t copy()const noexcept(copy_get.nothrow<T>) requires(copy_get.able<T>){
23674 return{copy_get(_m)};
23675 }
23676 public:
23677 void swap_with(this_t&a)noexcept{swap(_m,a._m);}
23678 public:
23679 /*默认构造*/
23680 constexpr array_t()noexcept:_m(null_ptr){}
23681 /*
23682 构造size个T
23683 */
23684 explicit array_t(note::size_t size)noexcept(get<T>.nothrow<>){
23685 _m=get<T>[size.value]();
23686 }
23687 explicit array_t(note::size_t size,const T&elem)noexcept(get<T>.nothrow<>){
23688 _m=get<T>[size.value](elem);
23689 }
23690 // ::std::initializer_list<T>的构造
23691 array_t(::std::initializer_list<T>&&list)noexcept(get<T>.as_array.nothrow<::std::initializer_list<T>>){
23692 _m=get<T>.as_array(array_like_view_t<const T>{list});
23693 }
23694 // T[N]的构造
23695 template<size_t N>
23696 array_t(T(&a)[N])noexcept(get<T>.as_array.nothrow<T(&)[N]>){
23697 _m=get<T>.as_array(a);
23698 }
23699 /*
23700 此重载适用于range_t<const T*>
23701 */
23702 //template<as_concept<get<T>.as_array.able> U>
23703 template<class U> requires(get<T>.as_array.able<U> && type_info<remove_cvref<U>>!=type_info<this_t>)
23704 array_t(U&&a)noexcept(get<T>.as_array.nothrow<U>){
23705 _m=get<T>.as_array(forward<U>(a));
23706 }
23707 /*初始化器进行构建*/
23708 template<class Func> requires(invoke<Func>.with_return_type<T>.able<>)
23709 array_t(note::size_t size, Func&&func)noexcept(get<T>.nothrow<Func>){
23710 _m=get<T>[size.value]();
23711 for(auto&i:*this)
23712 i=func();
23713 }
23714 template<class Func> requires(invoke<Func>.with_return_type<T>.able<size_t>)
23715 array_t(note::size_t size, Func&&func)noexcept(get<T>.nothrow<Func>){
23716 _m=get<T>[size.value]();
23717 for(size_t i=0;i<size.value;++i)
23718 (*this)[i]=func(i);
23719 }
23720
23721 //复制和移动函数
23722 array_t(const this_t&a)noexcept_as(declvalue(this_t).copy()):array_t(a.copy()){}
23724 return operator=(a.copy());
23725 }
23726 array_t(this_t&&a)noexcept:array_t(){swap_with(a);}
23728 swap_with(a);
23729 return*this;
23730 }
23731
23732 ~array_t()noexcept(unget.nothrow<T>){
23733 unget(_m);
23734 }
23735 [[nodiscard]]size_t size()const noexcept{
23736 return get_size_of_get(_m);
23737 }
23738 [[nodiscard]]size_t size_in_byte()const noexcept{
23739 return size()*sizeof(T);
23740 }
23741 static constexpr bool resize_nothrow = get_resize.nothrow<T>;
23742 void resize(size_t size)noexcept(resize_nothrow){
23743 get_resize(_m,size);
23744 }
23745 static constexpr bool forward_resize_nothrow = get_forward_resize.nothrow<T>;
23746 void forward_resize(size_t size)noexcept(forward_resize_nothrow){
23747 get_forward_resize(_m,size);
23748 }
23749 static constexpr bool insert_nothrow = get_resize.insert.nothrow<T>;
23750 void insert(size_t index,size_t count)noexcept(insert_nothrow){
23751 get_resize.insert(_m,index,count);
23752 }
23753 void insert(size_t index,size_t count,const T&value)noexcept(insert_nothrow){
23754 get_resize.insert(_m,index,count,value);
23755 }
23756 void insert(size_t index,size_t count,const T*data)noexcept(insert_nothrow){
23757 get_resize.insert(_m,index,count,data);
23758 }
23759 void insert_with_resize(size_t index,size_t count,const T*data,size_t new_size)noexcept(insert_nothrow){
23760 get_resize.insert_with_resize(_m,index,count,data,new_size);
23761 }
23762 void part_used_insert_with_resize(size_t index,size_t count,const T*data,size_t new_size,size_t used_size)noexcept(insert_nothrow){
23763 get_resize.insert_with_resize.with_used_size[used_size](_m,index,count,data,new_size);
23764 }
23765 static constexpr bool insert_with_forward_resize_nothrow = get_forward_resize.insert_with_resize.nothrow<T>;
23766 void insert_with_forward_resize(size_t index,size_t count,const T*data,size_t new_size)noexcept(insert_with_forward_resize_nothrow){
23767 get_forward_resize.insert_with_resize(_m,index,count,data,new_size);
23768 }
23769 void part_used_insert_with_forward_resize(size_t index,size_t count,const T*data,size_t new_size,size_t used_size)noexcept(insert_with_forward_resize_nothrow){
23770 get_forward_resize.insert_with_resize.with_used_size[used_size](_m,index,count,data,new_size);
23771 }
23772 [[nodiscard]]bool empty()const noexcept{
23773 return _m==null_ptr;
23774 }
23775 void clear()noexcept(re_construct.nothrow<this_t>){
23776 re_construct(this);
23777 }
23778 [[nodiscard]]T*data()noexcept{return _m;}
23779 [[nodiscard]]const T*data()const noexcept{return _m;}
23780 [[nodiscard]]T&operator[](size_t pos)noexcept{return _m[pos];}
23781 [[nodiscard]]const T&operator[](size_t pos)const noexcept{return _m[pos];}
23782 [[nodiscard]]explicit operator hash_t()const noexcept(hash.nothrow<T>){return hash(_m,size());}
23783 [[nodiscard]]explicit operator T*()noexcept{return _m;}
23784 [[nodiscard]]explicit operator const T*()const noexcept{return _m;}
23785
23786 typedef iterator_t<T>iterator;
23787 typedef const_iterator_t<T>const_iterator;
23788
23789 [[nodiscard]]constexpr iterator get_iterator_at(size_t a)noexcept{
23790 return _m+a;
23791 }
23792 [[nodiscard]]constexpr const_iterator get_iterator_at(size_t a)const noexcept{
23793 return _m+a;
23794 }
23795 [[nodiscard]]constexpr iterator begin()noexcept{
23796 return get_iterator_at(zero);
23797 }
23798 [[nodiscard]]iterator end()noexcept{
23799 return get_iterator_at(size());
23800 }
23801 [[nodiscard]]constexpr const_iterator begin()const noexcept{
23802 return get_iterator_at(zero);
23803 }
23804 [[nodiscard]]const_iterator end()const noexcept{
23805 return get_iterator_at(size());
23806 }
23807 [[nodiscard]]const_iterator cbegin()const noexcept{
23808 return begin();
23809 }
23810 [[nodiscard]]const_iterator cend()const noexcept{
23811 return end();
23812 }
23813 typedef reverse_iterator_t<T>reverse_iterator;
23814 typedef reverse_const_iterator_t<T>reverse_const_iterator;
23815 [[nodiscard]]reverse_iterator rbegin()noexcept{
23816 return _m+size()-1;
23817 }
23818 [[nodiscard]]constexpr reverse_iterator rend()noexcept{
23819 return _m-1;
23820 }
23821 [[nodiscard]]reverse_const_iterator rbegin()const noexcept{
23822 return _m+size()-1;
23823 }
23824 [[nodiscard]]auto&front()noexcept{
23825 return*begin();
23826 }
23827 [[nodiscard]]auto&front()const noexcept{
23828 return*begin();
23829 }
23830 [[nodiscard]]auto&back()noexcept{
23831 return*rbegin();
23832 }
23833 [[nodiscard]]auto&back()const noexcept{
23834 return*rbegin();
23835 }
23836 [[nodiscard]]constexpr reverse_const_iterator rend()const noexcept{
23837 return _m-1;
23838 }
23839 [[nodiscard]]reverse_const_iterator rcbegin()const noexcept{
23840 return rbegin();
23841 }
23842 [[nodiscard]]constexpr reverse_const_iterator rcend()const noexcept{
23843 return rend();
23844 }
23845
23846 [[nodiscard]]constexpr auto operator<=>(array_like_view_t<const T> a)const noexcept(compare.nothrow<array_like_view_t<T>>){
23847 return compare(array_like_view_t<const T>(*this),a);
23848 }
23849 [[nodiscard]]constexpr auto operator==(array_like_view_t<const T> a)const noexcept(equal.nothrow<array_like_view_t<T>>){
23850 return equal(array_like_view_t<const T>(*this),a);
23851 }
23852 [[nodiscard]]constexpr auto operator<=>(const this_t&a)const noexcept(compare.nothrow<array_like_view_t<T>>){
23853 return operator<=>(array_like_view_t<const T>(a));
23854 }
23855 [[nodiscard]]constexpr auto operator==(const this_t&a)const noexcept(equal.nothrow<array_like_view_t<T>>){
23857 }
23858
23859 #define expr declvalue(func_t)(declvalue(T&))
23860 template<typename func_t> requires was_not_an_ill_form(expr)
23861 void for_each(func_t&&func)noexcept_as(expr){
23862 auto asize=size();
23863 while(asize--)
23864 func((*this)[asize]);
23865 }
23866 #undef expr
23867
23868 #define expr declvalue(func_t)(declvalue(const T&))
23869 template<typename func_t> requires was_not_an_ill_form(expr)
23870 void for_each(func_t&&func)const noexcept_as(expr){
23871 auto asize=size();
23872 while(asize--)
23873 func((*this)[asize]);
23874 }
23875 #undef expr
23876
23877 void push_back(const T&a)noexcept(get<T>.apply_end.nothrow<const T&>){
23878 get<T>.apply_end(note::to<T*&>(_m),a);
23879 }
23880 void push_back(T&&a)noexcept(get<T>.apply_end.nothrow<T>){
23881 get<T>.apply_end(note::to<T*&>(_m),move(a));
23882 }
23883 void remove(T a)noexcept(get<T>.remove.nothrow<T>){
23884 get<T>.remove(a,note::from(_m));
23885 }
23886 //template<as_concept<get<T>.apply_end.able> U>
23887 template<class U,enable_if(get<T>.apply_end.able)>
23888 friend this_t&operator+=(this_t&a,U&&b)noexcept(get<T>.apply_end.nothrow<U>){
23889 get<T>.apply_end(note::to(a._m),b);
23890 return a;
23891 }
23892 friend this_t&operator+=(this_t&a,zero_t b)noexcept(get<T>.apply_end.nothrow<T>){
23893 return a+=T(0);
23894 }
23895 template<typename U>
23896 friend this_t operator+(const this_t&a,U&&b)noexcept_as(a.copy()+=b) requires was_not_an_ill_form(a.copy()+=b){
23897 return a.copy()+=b;
23898 }
23899 template<typename U>
23900 friend this_t operator+(U&&a,const this_t&b)noexcept_as(this_t(a)+=b) requires was_not_an_ill_form(this_t(a)+=b){
23901 return this_t(a)+=b;
23902 }
23903
23904 template<typename U>
23905 this_t&& operator+(U&& b)&&noexcept_as(*this+=b) requires was_not_an_ill_form(*this+=b){//对右值的operator+优化为operator+=
23906 return *this+=b;
23907 }
23908
23909
23910 template<typename U>
23911 [[nodiscard]]iterator find(U&&a)noexcept{
23912 return in_range(a,array_like_view_t<T>{*this});
23913 }
23914 template<typename U>
23915 [[nodiscard]]const_iterator find(U&&a)const noexcept{
23916 return in_range(a,array_like_view_t<const T>{*this});
23917 }
23918 };
23919 template<typename T>
23920 inline void swap(array_t<T>&a,array_t<T>&b)noexcept{a.swap_with(b);}
23921
23922 template<class T>
23923 [[nodiscard]]inline auto size_of_array_like(const array_t<remove_cv<T>>&a)noexcept{return a.size();}
23924 template<class T>
23925 [[nodiscard]]inline auto begin_of_array_like(array_t<remove_cv<T>>&a)noexcept{return(T*)a.begin();}
23926 template<class T>
23927 [[nodiscard]]inline auto begin_of_array_like(const array_t<remove_cv<T>>&a)noexcept{return(const T*)a.begin();}
23928}
23929
23930//file_end
23931
23932#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_body.hpp"
23933#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/deduction_guides.hpp"
23934//deduction_guides.hpp
23935//at namespace elc::defs::container
23936/*
23937未完成的elc解释器base文件
23938由steve02081504与Alex0125设计、编写
23939转载时请在不对此文件做任何修改的同时注明出处
23940项目地址:https://github.com/ELC-lang/ELC
23941*/
23942/*
23943 ,??????????????????????????
23944 ????????????????????????????
23945 ?????????????????????????????+
23946 ?????+++++++++++++++++++++++++
23947 ?????+++++++++++++++++++++++++
23948 ??????++++++++++++++++++++++++
23949 ?????++
23950 ?????+++
23951 ??????+++IIIIIIIIIIIIIIIIII
23952 ?????+++++IIIIIIIIIIIIIIIIII
23953 ?????++++++++++++++++++++++++
23954 ??????+++++++++++++++++++++++:
23955 ?????++
23956 ?????+++
23957 ??????++
23958 ??????????????????????????????II
23959 ??????????????????????????????IIII
23960 ,?????????????????????????????IIIII+
23961 =???++++++++++++++++++++++++++III?
23962 ?++++++++++++++++++++++++++++I+
23963*/
23964namespace array_n{
23965 template <class T,class...U>
23967 template <class T>
23969}
23970
23971//file_end
23972
23973#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_body.hpp"
23974#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_export.hpp"
23975//_export.hpp
23976//at namespace elc::defs::container
23977/*
23978未完成的elc解释器base文件
23979由steve02081504与Alex0125设计、编写
23980转载时请在不对此文件做任何修改的同时注明出处
23981项目地址:https://github.com/ELC-lang/ELC
23982*/
23983/*
23984 ,??????????????????????????
23985 ????????????????????????????
23986 ?????????????????????????????+
23987 ?????+++++++++++++++++++++++++
23988 ?????+++++++++++++++++++++++++
23989 ??????++++++++++++++++++++++++
23990 ?????++
23991 ?????+++
23992 ??????+++IIIIIIIIIIIIIIIIII
23993 ?????+++++IIIIIIIIIIIIIIIIII
23994 ?????++++++++++++++++++++++++
23995 ??????+++++++++++++++++++++++:
23996 ?????++
23997 ?????+++
23998 ??????++
23999 ??????????????????????????????II
24000 ??????????????????????????????IIII
24001 ,?????????????????????????????IIIII+
24002 =???++++++++++++++++++++++++++III?
24003 ?++++++++++++++++++++++++++++I+
24004*/
24005#define export using array_n::
24006export array_t;
24007#undef export
24008
24009//file_end
24010
24011#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_body.hpp"
24012#if defined(ELC_TEST_ON)
24013 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_test.hpp"
24014//_test.hpp
24015//at namespace elc::defs::container
24016/*
24017未完成的elc解释器base文件
24018由steve02081504与Alex0125设计、编写
24019转载时请在不对此文件做任何修改的同时注明出处
24020项目地址:https://github.com/ELC-lang/ELC
24021*/
24022/*
24023 ,??????????????????????????
24024 ????????????????????????????
24025 ?????????????????????????????+
24026 ?????+++++++++++++++++++++++++
24027 ?????+++++++++++++++++++++++++
24028 ??????++++++++++++++++++++++++
24029 ?????++
24030 ?????+++
24031 ??????+++IIIIIIIIIIIIIIIIII
24032 ?????+++++IIIIIIIIIIIIIIIIII
24033 ?????++++++++++++++++++++++++
24034 ??????+++++++++++++++++++++++:
24035 ?????++
24036 ?????+++
24037 ??????++
24038 ??????????????????????????????II
24039 ??????????????????????????????IIII
24040 ,?????????????????????????????IIIII+
24041 =???++++++++++++++++++++++++++III?
24042 ?++++++++++++++++++++++++++++I+
24043*/
24044namespace array_n{
24045 //BLOCK:for debug
24046 inline void test(){
24047 ELC_TEST_EVENTNAME("array部分测试");
24048 {
24049 array_t<int>anarray;
24050 stest_accert(anarray.size()==0);
24051 anarray.resize(5);
24052 stest_accert(anarray.size()==5);
24053 anarray[2]=99;
24054 stest_accert(anarray[2]==99);
24055 anarray.resize(3);
24056 stest_accert(anarray[2]==99);
24057 anarray=anarray;
24058 swap(anarray,anarray);
24059 }
24060 check_memory_lack();
24061 }
24062 inline void test_log_out(){
24063 }
24064 inline void test_end(){
24065 }
24066 //BLOCK_END
24067}
24068
24069//file_end
24070
24071 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/array/_body.hpp"
24072#endif
24073
24074//file_end
24075
24076#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
24077#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_body.hpp"
24078//_body.hpp
24079//at namespace elc::defs::container
24080/*
24081未完成的elc解释器base文件
24082由steve02081504与Alex0125设计、编写
24083转载时请在不对此文件做任何修改的同时注明出处
24084项目地址:https://github.com/ELC-lang/ELC
24085*/
24086/*
24087 ,??????????????????????????
24088 ????????????????????????????
24089 ?????????????????????????????+
24090 ?????+++++++++++++++++++++++++
24091 ?????+++++++++++++++++++++++++
24092 ??????++++++++++++++++++++++++
24093 ?????++
24094 ?????+++
24095 ??????+++IIIIIIIIIIIIIIIIII
24096 ?????+++++IIIIIIIIIIIIIIIIII
24097 ?????++++++++++++++++++++++++
24098 ??????+++++++++++++++++++++++:
24099 ?????++
24100 ?????+++
24101 ??????++
24102 ??????????????????????????????II
24103 ??????????????????????????????IIII
24104 ,?????????????????????????????IIIII+
24105 =???++++++++++++++++++++++++++III?
24106 ?++++++++++++++++++++++++++++I+
24107*/
24108#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/base_function_t.hpp"
24109//base_function_t.hpp
24110//at namespace elc::defs::container
24111/*
24112未完成的elc解释器base文件
24113由steve02081504与Alex0125设计、编写
24114转载时请在不对此文件做任何修改的同时注明出处
24115项目地址:https://github.com/ELC-lang/ELC
24116*/
24117/*
24118 ,??????????????????????????
24119 ????????????????????????????
24120 ?????????????????????????????+
24121 ?????+++++++++++++++++++++++++
24122 ?????+++++++++++++++++++++++++
24123 ??????++++++++++++++++++++++++
24124 ?????++
24125 ?????+++
24126 ??????+++IIIIIIIIIIIIIIIIII
24127 ?????+++++IIIIIIIIIIIIIIIIII
24128 ?????++++++++++++++++++++++++
24129 ??????+++++++++++++++++++++++:
24130 ?????++
24131 ?????+++
24132 ??????++
24133 ??????????????????????????????II
24134 ??????????????????????????????IIII
24135 ,?????????????????????????????IIIII+
24136 =???++++++++++++++++++++++++++III?
24137 ?++++++++++++++++++++++++++++I+
24138*/
24139namespace function_n{
24140 template<class T>
24142 template<class Ret_t,class...Args_t>
24143 no_vtable_struct base_func_data_t<Ret_t(Args_t...)>:type_info_t<base_func_data_t<Ret_t(Args_t...)>>::template_name with_common_attribute<abstract_base,ref_able,never_in_array>,build_by_get_only{
24144 typedef base_func_data_t<Ret_t(Args_t...)>this_t;
24145 typedef comn_ptr_t<this_t>ptr_t;
24146
24147 virtual ~base_func_data_t()=default;
24148 virtual Ret_t call(Args_t...)=0;
24149 //for equal:
24150 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept=0;
24151 [[nodiscard]]virtual const void*get_data_begin()const noexcept=0;
24152 [[nodiscard]]virtual bool equal_with(const void*)const=0;
24153 [[noreturn]] virtual void throw_self_ptr()const=0;
24154 [[noreturn]] virtual void throw_self_ptr()=0;
24155 [[nodiscard]]bool operator==(const this_t&a)const{
24156 return this->get_type_info()==a.get_type_info()&&this->equal_with(a.get_data_begin());
24157 }
24158 template<typename T>
24159 [[nodiscard]]bool operator==(const T&a)const{
24160 return this->get_type_info()==type_info<T>&&this->equal_with(addressof(a));
24161 }
24162 typedef Ret_t(*func_ptr_t)(Args_t...);
24163 virtual func_ptr_t get_func_ptr()const noexcept{return nullptr;}
24164 };
24165
24166 template<class T,class Func_t>
24168 template<class T,class Ret_t,class...Args_t>
24169 struct func_data_t<T,Ret_t(Args_t...)>final:
24170 type_info_t<func_data_t<T,Ret_t(Args_t...)>>::template_name with_common_attribute<instance_struct>,
24171 base_func_data_t<Ret_t(Args_t...)>,function_data_wrapper_t<T,Ret_t(Args_t...)>{
24172 static_assert(!::std::is_function_v<remove_cvref<T>>);
24173 typedef base_func_data_t<Ret_t(Args_t...)>base_t;
24174 typedef func_data_t<T,Ret_t(Args_t...)>this_t;
24175 typedef function_data_wrapper_t<T,Ret_t(Args_t...)>data_t;
24177 typedef base_t::func_ptr_t func_ptr_t;
24178
24179 [[nodiscard]]bool is_unique()const noexcept{return get_ref_num((base_t*)this)==1;}
24180
24181 using data_t::data_t;
24182 virtual ~func_data_t()override=default;
24183 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<T>;}
24184 [[nodiscard]]virtual const void*get_data_begin()const noexcept override final{return addressof(data_t::get_data());}
24185 [[noreturn]] virtual void throw_self_ptr()const override final{throw addressof(data_t::get_data());}
24186 [[noreturn]] virtual void throw_self_ptr()override final{throw addressof(data_t::get_data());}
24187 [[nodiscard]]virtual bool equal_with(const void*a)const noexcept(equal.able<T>?equal.nothrow<T>:true)override final{
24188 if constexpr(equal.able<T>)
24189 return data_t::get_data()==*remove_const(reinterpret_cast<const T*>(a));
24190 else
24191 return false;
24192 }
24193 [[nodiscard]]virtual Ret_t call(Args_t...args)noexcept(invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>)override final{
24194 return data_t::operator()(forward<Args_t>(args)...);
24195 }
24196
24197 //func ptr convert
24198 virtual func_ptr_t get_func_ptr()const noexcept override final{
24199 //if constexpr(type_info<const T>.can_convert_to<func_ptr_t>)
24200 //workaround of https://developercommunity.visualstudio.com/t/name-lookup-problem-after-update-1740/10189035
24201 if constexpr(::std::is_convertible_v<const T,func_ptr_t>)
24202 return static_cast<func_ptr_t>(data_t::get_data());
24203 else
24204 return nullptr;
24205 }
24206 };
24207
24208 template<class T>
24210 template<class Ret_t,class...Args_t>
24211 struct default_func_data_t<Ret_t(Args_t...)>final:base_func_data_t<Ret_t(Args_t...)>,instance_struct<default_func_data_t<Ret_t(Args_t...)>>{
24212 typedef base_func_data_t<Ret_t(Args_t...)>base_t;
24214
24215 virtual ~default_func_data_t()noexcept override final{}
24216 virtual Ret_t call(Args_t...)noexcept_as(Ret_t())override final{return Ret_t();}
24217 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<void>;}
24218 [[nodiscard]]virtual const void*get_data_begin()const noexcept override final{return null_ptr;}//这玩意实际上用不到,艹
24219 [[noreturn]] virtual void throw_self_ptr()const override final{throw(const void*)null_ptr;}
24220 [[noreturn]] virtual void throw_self_ptr()override final{throw(void*)null_ptr;}
24221 [[nodiscard]]virtual bool equal_with(const void*)const noexcept override final{return true;}
24222 };
24223 template<class Ret_t,class...Args_t>
24225
24226 template<class Ret_t,class...Args_t>
24227 [[nodiscard]]constexpr base_func_data_t<Ret_t(Args_t...)>*the_get_null_ptr(const base_func_data_t<Ret_t(Args_t...)>*)noexcept{
24228 return&default_func_data<Ret_t,Args_t...>;
24229 }
24230
24231 template<class T>
24233 template<class Ret_t,class...Args_t>
24234 class function_data_saver_t<Ret_t(Args_t...)>{
24235 protected:
24236 typedef function_data_saver_t<Ret_t(Args_t...)>this_t;
24237 typedef base_func_data_t<Ret_t(Args_t...)> base_t_w;
24238 typedef comn_ptr_t<base_t_w>ptr_t;
24239
24240 mutable ptr_t _m;
24241 void swap_with(this_t&a)noexcept{swap(_m,a._m);}
24242 public:
24243 function_data_saver_t()noexcept=default;
24244 function_data_saver_t(const this_t&a)noexcept:_m(a._m){}
24245 function_data_saver_t(this_t&&a)noexcept{swap_with(a);}
24246 [[nodiscard]]bool operator==(const this_t&a)const{
24247 return *_m==*(a._m);
24248 }
24249 template<typename T> requires(equal.able<base_t_w,T>)
24250 [[nodiscard]]bool operator==(T&&a)const noexcept(equal.nothrow<base_t_w,T>){
24251 return *_m==a;
24252 }
24253 template<typename T>
24254 [[nodiscard]]bool was_an()const noexcept{
24255 try{
24256 _m->throw_self_ptr();
24257 }
24258 catch(const T*p){
24259 return true;
24260 }
24261 catch(const void*){}
24262 return false;
24263 }
24264 template<typename T>
24265 [[nodiscard]]maybe_fail_reference<T> get_as()noexcept{
24266 try{
24267 _m->throw_self_ptr();
24268 }
24269 catch(T*p){
24270 return *p;
24271 }
24272 catch(void*){}
24273 return note::fail;
24274 }
24275 push_and_disable_msvc_warning(26440);//nothrow警告diss
24276 void operator=(const this_t&a){_m=a._m;}
24277 Ret_t call(Args_t&&...rest)const{return _m->call(forward<Args_t>(rest)...);}
24279 };
24280
24281 template<class T,bool promise_nothrow_at_destruct>
24283
24284 template<class T>
24286 static constexpr bool value = false;
24287 };
24288 template<class T, bool promise_nothrow_at_destruct>
24289 struct is_function_t_helper<base_function_t<T, promise_nothrow_at_destruct>> {
24290 static constexpr bool value = true;
24291 };
24292 template<class T>
24294 #if !defined(_MSC_VER)
24295 template<class Ret_t,class...Args_t,bool nothrow,bool promise_nothrow_at_destruct>
24296 struct base_function_t<Ret_t(Args_t...)noexcept(nothrow),promise_nothrow_at_destruct>:function_data_saver_t<Ret_t(Args_t...)>{
24297 protected:
24298 typedef function_data_saver_t<Ret_t(Args_t...)>base_t;
24299 typedef base_function_t<Ret_t(Args_t...)noexcept(nothrow),promise_nothrow_at_destruct>this_t;
24300
24301 template<class,bool>
24302 friend class base_function_t;
24303
24304 template<class U>
24305 using func_data_t=function_n::func_data_t<U,Ret_t(Args_t...)>;
24306
24307 typedef Ret_t func_t(Args_t...)noexcept(nothrow);
24308 typedef func_t *func_ptr_t;
24309
24310 using base_t::ptr_t;
24311 using base_t::_m;
24312
24313 template<class T>
24314 static constexpr bool base_on_this_t_or_more_stringent_restrictions=(
24315 type_info<T>.base_on<this_t>||
24316 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept(bool(nothrow+1)), promise_nothrow_at_destruct >>||
24317 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept(nothrow), bool(promise_nothrow_at_destruct+1) >>||
24318 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept(bool(nothrow+1)), bool(promise_nothrow_at_destruct+1) >>
24319 );
24320
24321 template<class T>
24322 static constexpr bool get_data_able_helper()noexcept{
24323 if constexpr(base_on_this_t_or_more_stringent_restrictions<T>)
24324 return false;
24325 elseif constexpr(is_function_t<T>)
24326 return false;
24327 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24328 return get_data_able_helper<decltype(&declvalue(T))>();
24329 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24330 return get<func_data_t<remove_cvref<T>>>.able<T>;
24331 else
24332 return false;
24333 }
24334 template<class T>
24335 static constexpr bool get_data_able=get_data_able_helper<T>();
24336 template<class T>
24337 static constexpr bool get_data_nothrow_helper()noexcept{
24338 if constexpr(base_on_this_t_or_more_stringent_restrictions<T>)
24339 return false;
24340 elseif constexpr(is_function_t<T>)
24341 return false;
24342 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24343 return get_data_nothrow_helper<decltype(&declvalue(T))>();
24344 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24345 return get<func_data_t<remove_cvref<T>>>.nothrow<T>;
24346 else
24347 return false;
24348 }
24349 template<class T>
24350 static constexpr bool get_data_nothrow=get_data_nothrow_helper<T>();
24351
24352 template<class T> requires get_data_able<T>
24353 static auto get_data_from(T&&a)noexcept(get_data_nothrow<T>){
24354 if constexpr(::std::is_function_v<remove_cvref<T>>)
24355 return get_data_from(&a);
24356 elseif constexpr(is_function_t<T>)
24357 return a._m;
24358 else{
24359 //BLOCK:constexpr checks
24360 if constexpr(promise_nothrow_at_destruct and not destruct.nothrow<T>)
24361 template_error("unexpected assign.");
24362 if constexpr(nothrow)
24363 if constexpr(!invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>)
24364 template_warning("the call of T was not noexcept,this may cause terminate.");
24365 //BLOCK_END
24366 return get<func_data_t<remove_cvref<T>>>(a);
24367 }
24368 }
24369 explicit base_function_t(base_t::ptr_t a)noexcept{_m=a;}
24370 public:
24371 void swap_with(this_t&a)noexcept{//不与base_t::swap_with重复:与更加严格(或宽松)的this_t进行swap是错误的
24372 base_t::swap_with(a);
24373 }
24374
24375 base_function_t()noexcept=default;
24376 template<class T> requires base_on_this_t_or_more_stringent_restrictions<T>
24377 base_function_t(const T&a)noexcept:base_t(a){}
24378 base_function_t(const this_t&a)noexcept:base_t(a){}
24380 swap_with(a);
24381 }
24384 template<class T> requires get_data_able<T>
24385 base_function_t(T&&a)noexcept(get_data_nothrow<T>){
24386 _m=get_data_from(forward<T>(a));
24387 }
24388 ~base_function_t()noexcept(promise_nothrow_at_destruct)=default;
24389
24390 this_t&operator=(const this_t&a)&noexcept(promise_nothrow_at_destruct)=default;
24391 this_t&operator=(this_t&&a)&noexcept(promise_nothrow_at_destruct)=default;
24392 this_t&operator=(null_ptr_t)&noexcept(promise_nothrow_at_destruct){_m=null_ptr;return *this;}
24393 this_t&operator=(nullptr_t)&noexcept(promise_nothrow_at_destruct){return *this=null_ptr;}
24394 template<class T> requires base_on_this_t_or_more_stringent_restrictions<T>
24395 this_t&operator=(const T&a)&noexcept(promise_nothrow_at_destruct){
24396 base_t::operator=(a);
24397 return*this;
24398 }
24399 template<class T> requires get_data_able<T>
24400 this_t&operator=(T&&a)noexcept(get_data_nothrow<T> && promise_nothrow_at_destruct){
24401 _m=get_data_from(forward<T>(a));
24402 return*this;
24403 }
24404
24405 this_t deep_copy(){return this_t{copy_get(_m.get())};}
24406
24407 [[nodiscard]]explicit operator bool()const noexcept{
24408 return bool(_m);
24409 }
24410
24411 Ret_t operator()(Args_t...args)const noexcept(nothrow){
24413 return base_t::call(forward<Args_t>(args)...);
24415 }
24416
24417 private:
24418 //以下是突然想加的功能(没什么用<迷惑行为大赏>).
24419 static thread_local inline base_t::base_t_w* _func_ptr_data_local=nullptr;
24420 static inline ::std::atomic<decltype(_func_ptr_data_local)> _func_ptr_data_gobal=nullptr;
24421 static Ret_t _func_ptr_value(Args_t...args)noexcept{
24422 if(!_func_ptr_data_local)
24423 _func_ptr_data_local=_func_ptr_data_gobal.load(::std::memory_order_relaxed);
24424 push_and_disable_msvc_warning(26447);//noexcept不匹配警告diss
24425 return _func_ptr_data_local->call(forward<Args_t>(args)...);
24427 }
24428 public:
24429 //自当前function对象生成一个函数指针,具有与当前function对象相同的行为
24430 //注意:该函数指针的有效性保留到当前线程下一个同类型的函数指针生成时或当前function对象析构时
24431 //若自该函数指针创建一个新的线程,该函数指针在新线程中的行为与调用时以前所有线程中最后一个生成的同类型的函数指针行为相同
24432 [[nodiscard]]explicit operator func_ptr_t()const noexcept(promise_nothrow_at_destruct){
24433 func_ptr_t a=(func_ptr_t)_m->get_func_ptr();
24434 if(a)return a;
24435 _func_ptr_data_local=base_t::_m.get();
24436 _func_ptr_data_gobal.store(_func_ptr_data_local,::std::memory_order_relaxed);
24437 return _func_ptr_value;
24438 }
24439 };
24440 #else
24441 //MSVC,我滴垃圾堆
24442 template<class Ret_t,class...Args_t,bool promise_nothrow_at_destruct>
24443 struct base_function_t<Ret_t(Args_t...),promise_nothrow_at_destruct>:function_data_saver_t<Ret_t(Args_t...)>{
24444 protected:
24445 typedef function_data_saver_t<Ret_t(Args_t...)>base_t;
24446 typedef base_function_t<Ret_t(Args_t...),promise_nothrow_at_destruct>this_t;
24447
24448 template<class,bool>
24449 friend class base_function_t;
24450
24451 template<class U>
24452 using func_data_t=function_n::func_data_t<U,Ret_t(Args_t...)>;
24453
24454 typedef Ret_t func_t(Args_t...);
24455 typedef func_t *func_ptr_t;
24456
24457 using base_t::ptr_t;
24458 using base_t::_m;
24459
24460 template<class T>
24461 static constexpr bool base_on_this_t_or_more_stringent_restrictions=(
24462 type_info<T>.base_on<this_t>||
24463 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept, promise_nothrow_at_destruct >>||
24464 type_info<T>.base_on<base_function_t<Ret_t(Args_t...), bool(promise_nothrow_at_destruct+1) >>||
24465 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept, bool(promise_nothrow_at_destruct+1) >>
24466 );
24467
24468 template<class T>
24469 static constexpr bool get_data_able_helper()noexcept{
24470 if constexpr(base_on_this_t_or_more_stringent_restrictions<T>)
24471 return false;
24472 elseif constexpr(is_function_t<T>)
24473 return false;
24474 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24475 return get_data_able_helper<decltype(&declvalue(T))>();
24476 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24477 return get<func_data_t<remove_cvref<T>>>.able<T>;
24478 else
24479 return false;
24480 }
24481 template<class T>
24482 static constexpr bool get_data_able=get_data_able_helper<T>();
24483 template<class T>
24484 static constexpr bool get_data_nothrow_helper()noexcept{
24485 if constexpr(base_on_this_t_or_more_stringent_restrictions<T>)
24486 return false;
24487 elseif constexpr(is_function_t<T>)
24488 return false;
24489 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24490 return get_data_nothrow_helper<decltype(&declvalue(T))>();
24491 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24492 return get<func_data_t<remove_cvref<T>>>.nothrow<T>;
24493 else
24494 return false;
24495 }
24496 template<class T>
24497 static constexpr bool get_data_nothrow=get_data_nothrow_helper<T>();
24498
24499 template<class T> requires get_data_able<T>
24500 static auto get_data_from(T&&a)noexcept(get_data_nothrow<T>){
24501 if constexpr(::std::is_function_v<remove_cvref<T>>)
24502 return get_data_from(&a);
24503 elseif constexpr(is_function_t<T>)
24504 return a._m;
24505 else{
24506 //BLOCK:constexpr checks
24507 if constexpr(promise_nothrow_at_destruct and not destruct.nothrow<T>)
24508 template_error("unexpected assign.");
24509 //BLOCK_END
24510 return get<func_data_t<remove_cvref<T>>>(a);
24511 }
24512 }
24513 explicit base_function_t(base_t::ptr_t a)noexcept{_m=a;}
24514 public:
24515 void swap_with(this_t&a)noexcept{//不与base_t::swap_with重复:与更加严格(或宽松)的this_t进行swap是错误的
24516 base_t::swap_with(a);
24517 }
24518
24519 base_function_t()noexcept=default;
24520 template<class T> requires base_on_this_t_or_more_stringent_restrictions<T>
24521 base_function_t(const T&a)noexcept:base_t(a){}
24522 base_function_t(const this_t&a)noexcept:base_t(a){}
24524 swap_with(a);
24525 }
24527 base_function_t(nullptr_t)noexcept:base_function_t(null_ptr){}
24528 template<class T> requires get_data_able<T>
24529 base_function_t(T&&a)noexcept(get_data_nothrow<T>){
24530 _m=get_data_from(forward<T>(a));
24531 }
24532 ~base_function_t()noexcept(promise_nothrow_at_destruct)=default;
24533
24534 this_t&operator=(const this_t&a)noexcept(promise_nothrow_at_destruct)=default;
24535 this_t&operator=(this_t&&a)noexcept(promise_nothrow_at_destruct)=default;
24536 this_t&operator=(null_ptr_t)noexcept(promise_nothrow_at_destruct){_m=null_ptr;return *this;}
24537 this_t&operator=(nullptr_t)noexcept(promise_nothrow_at_destruct){return *this=null_ptr;}
24538 template<class T> requires base_on_this_t_or_more_stringent_restrictions<T>
24539 this_t&operator=(const T&a)&noexcept(promise_nothrow_at_destruct){
24540 base_t::operator=(a);
24541 return*this;
24542 }
24543 template<class T> requires get_data_able<T>
24544 this_t&operator=(T&&a)noexcept(get_data_nothrow<T> && promise_nothrow_at_destruct){
24545 _m=get_data_from(forward<T>(a));
24546 return*this;
24547 }
24548
24549 this_t deep_copy(){return this_t{copy_get(_m.get())};}
24550
24551 [[nodiscard]]explicit operator bool()const noexcept{
24552 return bool(_m);
24553 }
24554
24555 Ret_t operator()(Args_t...args){
24556 return base_t::call(forward<Args_t>(args)...);
24557 }
24558 Ret_t operator()(Args_t...args)const{
24559 return base_t::call(forward<Args_t>(args)...);
24560 }
24561
24562 private:
24563 //以下是突然想加的功能(没什么用<迷惑行为大赏>).
24564 static thread_local inline base_t::base_t_w* _func_ptr_data_local=nullptr;
24565 static inline ::std::atomic<decltype(_func_ptr_data_local)> _func_ptr_data_gobal=nullptr;
24566 static Ret_t _func_ptr_value(Args_t...args)noexcept{
24567 if(!_func_ptr_data_local)
24568 _func_ptr_data_local=_func_ptr_data_gobal.load(::std::memory_order_relaxed);
24569 push_and_disable_msvc_warning(26447);//noexcept不匹配警告diss
24570 return _func_ptr_data_local->call(forward<Args_t>(args)...);
24572 }
24573 public:
24574 //自当前function对象生成一个函数指针,具有与当前function对象相同的行为
24575 //注意:该函数指针的有效性保留到当前线程下一个同类型的函数指针生成时或当前function对象析构时
24576 //若自该函数指针创建一个新的线程,该函数指针在新线程中的行为与调用时以前所有线程中最后一个生成的同类型的函数指针行为相同
24577 [[nodiscard]]explicit operator func_ptr_t()const noexcept(promise_nothrow_at_destruct){
24578 func_ptr_t a=(func_ptr_t)_m->get_func_ptr();
24579 if(a)return a;
24580 _func_ptr_data_local=base_t::_m.get();
24581 _func_ptr_data_gobal.store(_func_ptr_data_local,::std::memory_order_relaxed);
24582 return _func_ptr_value;
24583 }
24584 };
24585 template<class Ret_t,class...Args_t,bool promise_nothrow_at_destruct>
24586 struct base_function_t<Ret_t(Args_t...)noexcept,promise_nothrow_at_destruct>:function_data_saver_t<Ret_t(Args_t...)>{
24587 protected:
24588 typedef function_data_saver_t<Ret_t(Args_t...)>base_t;
24589 typedef base_function_t<Ret_t(Args_t...)noexcept,promise_nothrow_at_destruct>this_t;
24590
24591 template<class,bool>
24592 friend class base_function_t;
24593
24594 template<class U>
24595 using func_data_t=function_n::func_data_t<U,Ret_t(Args_t...)>;
24596
24597 typedef Ret_t func_t(Args_t...)noexcept;
24598 typedef func_t *func_ptr_t;
24599
24600 using base_t::ptr_t;
24601 using base_t::_m;
24602
24603 template<class T>
24604 static constexpr bool base_on_this_t_or_more_stringent_restrictions=(
24605 type_info<T>.base_on<this_t>||
24606 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept, promise_nothrow_at_destruct >>||
24607 type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept, bool(promise_nothrow_at_destruct+1) >>
24608 );
24609
24610 template<class T>
24611 static constexpr bool get_data_able_helper()noexcept{
24612 if constexpr(base_on_this_t_or_more_stringent_restrictions<T>)
24613 return false;
24614 elseif constexpr(is_function_t<T>)
24615 return false;
24616 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24617 return get_data_able_helper<decltype(&declvalue(T))>();
24618 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24619 return get<func_data_t<remove_cvref<T>>>.able<T>;
24620 else
24621 return false;
24622 }
24623 template<class T>
24624 static constexpr bool get_data_able=get_data_able_helper<T>();
24625 template<class T>
24626 static constexpr bool get_data_nothrow_helper()noexcept{
24627 if constexpr(base_on_this_t_or_more_stringent_restrictions<T>)
24628 return false;
24629 elseif constexpr(is_function_t<T>)
24630 return false;
24631 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24632 return get_data_nothrow_helper<decltype(&declvalue(T))>();
24633 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24634 return get<func_data_t<remove_cvref<T>>>.nothrow<T>;
24635 else
24636 return false;
24637 }
24638 template<class T>
24639 static constexpr bool get_data_nothrow=get_data_nothrow_helper<T>();
24640
24641 template<class T> requires get_data_able<T>
24642 static auto get_data_from(T&&a)noexcept(get_data_nothrow<T>){
24643 if constexpr(::std::is_function_v<remove_cvref<T>>)
24644 return get_data_from(&a);
24645 elseif constexpr(is_function_t<T>)
24646 return a._m;
24647 else{
24648 //BLOCK:constexpr checks
24649 if constexpr(promise_nothrow_at_destruct and not destruct.nothrow<T>)
24650 template_error("unexpected assign.");
24651 if constexpr(1)
24652 if constexpr(!invoke<T>.with_return_type<Ret_t>.nothrow<Args_t...>)
24653 template_warning("the call of T was not noexcept,this may cause terminate.");
24654 //BLOCK_END
24655 return get<func_data_t<remove_cvref<T>>>(a);
24656 }
24657 }
24658 explicit base_function_t(base_t::ptr_t a)noexcept{_m=a;}
24659 public:
24660 void swap_with(this_t&a)noexcept{//不与base_t::swap_with重复:与更加严格(或宽松)的this_t进行swap是错误的
24661 base_t::swap_with(a);
24662 }
24663
24664 base_function_t()noexcept=default;
24665 template<class T> requires base_on_this_t_or_more_stringent_restrictions<T>
24666 base_function_t(const T&a)noexcept:base_t(a){}
24667 base_function_t(const this_t&a)noexcept:base_t(a){}
24669 swap_with(a);
24670 }
24672 base_function_t(nullptr_t)noexcept:base_function_t(null_ptr){}
24673 template<class T> requires get_data_able<T>
24674 base_function_t(T&&a)noexcept(get_data_nothrow<T>){
24675 _m=get_data_from(forward<T>(a));
24676 }
24677 ~base_function_t()noexcept(promise_nothrow_at_destruct)=default;
24678
24679 this_t&operator=(const this_t&a)&noexcept(promise_nothrow_at_destruct)=default;
24680 this_t&operator=(this_t&&a)&noexcept(promise_nothrow_at_destruct)=default;
24681 this_t&operator=(null_ptr_t)&noexcept(promise_nothrow_at_destruct){_m=null_ptr;return *this;}
24682 this_t&operator=(nullptr_t)&noexcept(promise_nothrow_at_destruct){return *this=null_ptr;}
24683 template<class T> requires base_on_this_t_or_more_stringent_restrictions<T>
24684 this_t&operator=(const T&a)&noexcept(promise_nothrow_at_destruct){
24685 base_t::operator=(a);
24686 return*this;
24687 }
24688 template<class T> requires get_data_able<T>
24689 this_t&operator=(T&&a)noexcept(get_data_nothrow<T> && promise_nothrow_at_destruct){
24690 _m=get_data_from(forward<T>(a));
24691 return*this;
24692 }
24693
24694 this_t deep_copy(){return this_t{copy_get(_m.get())};}
24695
24696 [[nodiscard]]explicit operator bool()const noexcept{
24697 return bool(_m);
24698 }
24699
24701 Ret_t operator()(Args_t...args)noexcept{
24702 return base_t::call(forward<Args_t>(args)...);
24703 }
24704 Ret_t operator()(Args_t...args)const noexcept{
24705 return base_t::call(forward<Args_t>(args)...);
24706 }
24708
24709 private:
24710 //以下是突然想加的功能(没什么用<迷惑行为大赏>).
24711 static thread_local inline base_t::base_t_w* _func_ptr_data_local=nullptr;
24712 static inline ::std::atomic<decltype(_func_ptr_data_local)> _func_ptr_data_gobal=nullptr;
24713 static Ret_t _func_ptr_value(Args_t...args)noexcept{
24714 if(!_func_ptr_data_local)
24715 _func_ptr_data_local=_func_ptr_data_gobal.load(::std::memory_order_relaxed);
24716 push_and_disable_msvc_warning(26447);//noexcept不匹配警告diss
24717 return _func_ptr_data_local->call(forward<Args_t>(args)...);
24719 }
24720 public:
24721 //自当前function对象生成一个函数指针,具有与当前function对象相同的行为
24722 //注意:该函数指针的有效性保留到当前线程下一个同类型的函数指针生成时或当前function对象析构时
24723 //若自该函数指针创建一个新的线程,该函数指针在新线程中的行为与调用时以前所有线程中最后一个生成的同类型的函数指针行为相同
24724 [[nodiscard]]explicit operator func_ptr_t()const noexcept(promise_nothrow_at_destruct){
24725 func_ptr_t a=(func_ptr_t)_m->get_func_ptr();
24726 if(a)return a;
24727 _func_ptr_data_local=base_t::_m.get();
24728 _func_ptr_data_gobal.store(_func_ptr_data_local,::std::memory_order_relaxed);
24729 return _func_ptr_value;
24730 }
24731 };
24732 #endif
24733 template<class T,bool promise_nothrow_at_destruct>
24737}
24738
24739//file_end
24740
24741#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_body.hpp"
24742#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/defs.hpp"
24743//defs.hpp
24744//at namespace elc::defs::container
24745/*
24746未完成的elc解释器base文件
24747由steve02081504与Alex0125设计、编写
24748转载时请在不对此文件做任何修改的同时注明出处
24749项目地址:https://github.com/ELC-lang/ELC
24750*/
24751/*
24752 ,??????????????????????????
24753 ????????????????????????????
24754 ?????????????????????????????+
24755 ?????+++++++++++++++++++++++++
24756 ?????+++++++++++++++++++++++++
24757 ??????++++++++++++++++++++++++
24758 ?????++
24759 ?????+++
24760 ??????+++IIIIIIIIIIIIIIIIII
24761 ?????+++++IIIIIIIIIIIIIIIIII
24762 ?????++++++++++++++++++++++++
24763 ??????+++++++++++++++++++++++:
24764 ?????++
24765 ?????+++
24766 ??????++
24767 ??????????????????????????????II
24768 ??????????????????????????????IIII
24769 ,?????????????????????????????IIIII+
24770 =???++++++++++++++++++++++++++III?
24771 ?++++++++++++++++++++++++++++I+
24772*/
24773namespace function_n{
24774 template<class T>
24776
24777 //[[deprecated("not safe")]]//用这么长名字的人大概知道自己在干啥
24778 template<class T>
24780}
24781
24782//file_end
24783
24784#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_body.hpp"
24785#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/deduction_guides.hpp"
24786//deduction_guides.hpp
24787//at namespace elc::defs::container
24788/*
24789未完成的elc解释器base文件
24790由steve02081504与Alex0125设计、编写
24791转载时请在不对此文件做任何修改的同时注明出处
24792项目地址:https://github.com/ELC-lang/ELC
24793*/
24794/*
24795 ,??????????????????????????
24796 ????????????????????????????
24797 ?????????????????????????????+
24798 ?????+++++++++++++++++++++++++
24799 ?????+++++++++++++++++++++++++
24800 ??????++++++++++++++++++++++++
24801 ?????++
24802 ?????+++
24803 ??????+++IIIIIIIIIIIIIIIIII
24804 ?????+++++IIIIIIIIIIIIIIIIII
24805 ?????++++++++++++++++++++++++
24806 ??????+++++++++++++++++++++++:
24807 ?????++
24808 ?????+++
24809 ??????++
24810 ??????????????????????????????II
24811 ??????????????????????????????IIII
24812 ,?????????????????????????????IIIII+
24813 =???++++++++++++++++++++++++++III?
24814 ?++++++++++++++++++++++++++++I+
24815*/
24816namespace function_n{
24817 template<typename T,bool promise_nothrow_at_destruct>
24818 base_function_t(T) -> base_function_t<get_function_type<T>, promise_nothrow_at_destruct>;
24819}
24820
24821//file_end
24822
24823#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_body.hpp"
24824#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_export.hpp"
24825//_export.hpp
24826//at namespace elc::defs::container
24827/*
24828未完成的elc解释器base文件
24829由steve02081504与Alex0125设计、编写
24830转载时请在不对此文件做任何修改的同时注明出处
24831项目地址:https://github.com/ELC-lang/ELC
24832*/
24833/*
24834 ,??????????????????????????
24835 ????????????????????????????
24836 ?????????????????????????????+
24837 ?????+++++++++++++++++++++++++
24838 ?????+++++++++++++++++++++++++
24839 ??????++++++++++++++++++++++++
24840 ?????++
24841 ?????+++
24842 ??????+++IIIIIIIIIIIIIIIIII
24843 ?????+++++IIIIIIIIIIIIIIIIII
24844 ?????++++++++++++++++++++++++
24845 ??????+++++++++++++++++++++++:
24846 ?????++
24847 ?????+++
24848 ??????++
24849 ??????????????????????????????II
24850 ??????????????????????????????IIII
24851 ,?????????????????????????????IIIII+
24852 =???++++++++++++++++++++++++++III?
24853 ?++++++++++++++++++++++++++++I+
24854*/
24855#define export using function_n::
24856export function_t;
24857//export may_throw_in_destruct_function_t;
24858#undef export
24859
24860//file_end
24861
24862#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_body.hpp"
24863#if defined(ELC_TEST_ON)
24864 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_test.hpp"
24865//_test.hpp
24866//at namespace elc::defs::container
24867/*
24868未完成的elc解释器base文件
24869由steve02081504与Alex0125设计、编写
24870转载时请在不对此文件做任何修改的同时注明出处
24871项目地址:https://github.com/ELC-lang/ELC
24872*/
24873/*
24874 ,??????????????????????????
24875 ????????????????????????????
24876 ?????????????????????????????+
24877 ?????+++++++++++++++++++++++++
24878 ?????+++++++++++++++++++++++++
24879 ??????++++++++++++++++++++++++
24880 ?????++
24881 ?????+++
24882 ??????+++IIIIIIIIIIIIIIIIII
24883 ?????+++++IIIIIIIIIIIIIIIIII
24884 ?????++++++++++++++++++++++++
24885 ??????+++++++++++++++++++++++:
24886 ?????++
24887 ?????+++
24888 ??????++
24889 ??????????????????????????????II
24890 ??????????????????????????????IIII
24891 ,?????????????????????????????IIIII+
24892 =???++++++++++++++++++++++++++III?
24893 ?++++++++++++++++++++++++++++I+
24894*/
24895namespace function_n{
24896 //BLOCK:for debug
24897 inline void test(){
24898 ELC_TEST_EVENTNAME("function部分测试");
24899 {
24900 int tester=0;
24901 #if !defined(_MSC_VER)
24902 function_t
24903 #else
24904 function_t<void()noexcept>
24905 #endif
24906 a(λ_with_catch (&tester)()noexcept{ tester=1; });
24907 static_assert(type_info<decltype(a)> == type_info<function_t<void()noexcept>>);
24908 stest_accert(tester==0);
24909 a();
24910 stest_accert(tester==1);
24911 #if !defined(_MSC_VER)
24912 function_t
24913 #else
24914 function_t<void()>
24915 #endif
24916 b=test;
24917 static_assert(type_info<decltype(b)> == type_info<function_t<void()>>);
24918 b=a;
24919 a=null_ptr;
24920 tester=0;
24921 a();
24922 stest_accert(tester==0);
24923 b();
24924 stest_accert(tester==1);
24925 swap(a,a);
24926 stest_accert(a!=b);
24927 b=a;
24928 stest_accert(a==b);
24929 }
24930 check_memory_lack();
24931 }
24932 inline void test_log_out(){
24933 }
24934 inline void test_end(){
24935 }
24936 //BLOCK_END
24937}
24938
24939//file_end
24940
24941 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/function/_body.hpp"
24942#endif
24943
24944//file_end
24945
24946#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
24947
24948#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_body.hpp"
24949//_body.hpp
24950//at namespace elc::defs::container
24951/*
24952未完成的elc解释器base文件
24953由steve02081504与Alex0125设计、编写
24954转载时请在不对此文件做任何修改的同时注明出处
24955项目地址:https://github.com/ELC-lang/ELC
24956*/
24957/*
24958 ,??????????????????????????
24959 ????????????????????????????
24960 ?????????????????????????????+
24961 ?????+++++++++++++++++++++++++
24962 ?????+++++++++++++++++++++++++
24963 ??????++++++++++++++++++++++++
24964 ?????++
24965 ?????+++
24966 ??????+++IIIIIIIIIIIIIIIIII
24967 ?????+++++IIIIIIIIIIIIIIIIII
24968 ?????++++++++++++++++++++++++
24969 ??????+++++++++++++++++++++++:
24970 ?????++
24971 ?????+++
24972 ??????++
24973 ??????????????????????????????II
24974 ??????????????????????????????IIII
24975 ,?????????????????????????????IIIII+
24976 =???++++++++++++++++++++++++++III?
24977 ?++++++++++++++++++++++++++++I+
24978*/
24979namespace stack_n{
24980 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/base_stack.hpp"
24981//defs.hpp
24982//at namespace elc::defs::container::stack_n
24983/*
24984未完成的elc解释器base文件
24985由steve02081504与Alex0125设计、编写
24986转载时请在不对此文件做任何修改的同时注明出处
24987项目地址:https://github.com/ELC-lang/ELC
24988*/
24989/*
24990 ,??????????????????????????
24991 ????????????????????????????
24992 ?????????????????????????????+
24993 ?????+++++++++++++++++++++++++
24994 ?????+++++++++++++++++++++++++
24995 ??????++++++++++++++++++++++++
24996 ?????++
24997 ?????+++
24998 ??????+++IIIIIIIIIIIIIIIIII
24999 ?????+++++IIIIIIIIIIIIIIIIII
25000 ?????++++++++++++++++++++++++
25001 ??????+++++++++++++++++++++++:
25002 ?????++
25003 ?????+++
25004 ??????++
25005 ??????????????????????????????II
25006 ??????????????????????????????IIII
25007 ,?????????????????????????????IIIII+
25008 =???++++++++++++++++++++++++++III?
25009 ?++++++++++++++++++++++++++++I+
25010*/
25011template<typename T>
25012class base_stack_t:non_copyable{//基础容器,可用于hashtable
25013 typedef base_stack_t<T>this_t;
25014protected:
25015 struct data_t{
25018
25019 constexpr_as(construct<T>(declvalue(const T&)))data_t(const T&a,data_t*b)noexcept(construct<T>.nothrow<const T&>):_data(a),_next(b){}
25020 constexpr_as(construct<T>(declvalue(const T&)))data_t(const data_t&a)noexcept(construct<T>.nothrow<const T&>):_data(a._data),_next(null_ptr){}
25022 size_t _size;
25023private:
25024 this_t copy()const noexcept(copy_get.nothrow<data_t>){
25025 this_t tmp;
25026 const data_t*p=_m;
25027 data_t**p_=&tmp._m;
25028 while(p!=null_ptr){
25029 *p_=copy_get(p);
25030 p_=&(**p_)._next;
25031 p=p->_next;
25032 }
25033 tmp._size=size();
25034 return tmp;
25035 }
25036public:
25037 constexpr base_stack_t()noexcept:_m(null_ptr),_size(0){}
25038 void swap_with(this_t&a)noexcept{
25039 swap(_m,a._m);
25040 swap(_size,a._size);
25041 }
25043 swap_with(a);
25044 return*this;
25045 }
25047 operator=(move(a));
25048 }
25050 return operator=(a.copy());
25051 }
25053 ~base_stack_t()noexcept(unget.nothrow<data_t>){
25054 push_and_disable_msvc_warning(26494);//未初始化警告diss
25055 data_t*tmp;
25057 while(_m!=null_ptr){
25058 tmp=_m;
25059 _m=_m->_next;
25060 unget(tmp);
25061 }
25062 }
25063 void clear()noexcept(re_construct.nothrow<this_t>){
25064 re_construct(this);
25065 }
25066 [[nodiscard]]bool empty()const noexcept{
25067 return _m==null_ptr;
25068 }
25069 template<typename U>
25071 data_t*tmp=_m;
25072 while(tmp!=null_ptr){
25073 if(tmp->_data==a)
25074 return tmp->_data;
25075 tmp=tmp->_next;
25076 }
25077 return note::fail;
25078 }
25079 [[nodiscard]]bool in_stack(const T&a)const noexcept_as(declvalue(this_t).find(a).not_fail()){
25080 return remove_const(this)->find(a).not_fail();
25081 }
25082 [[nodiscard]]bool not_in_stack(const T&a)const noexcept_as(declvalue(this_t).in_stack(a)){
25083 return not in_stack(a);
25084 }
25085 [[nodiscard]]size_t size()const noexcept{
25086 return _size;
25087 }
25088
25089 static constexpr bool add_nothrow=noexcept(get<data_t>(declvalue(const T&),declvalue(data_t*)));
25090 void add(const T&a)noexcept(add_nothrow){
25091 _m=get<data_t>(a,_m);
25092 _size++;
25093 }
25094
25095 static constexpr bool remove_nothrow=unget.nothrow<data_t>;
25096 template<typename T_>
25097 bool remove(const T_&a)noexcept(remove_nothrow && equal.nothrow<T_,T>){//返回值:是否成功移除(容器里是否有此T)
25098 data_t*tmp=_m,**tmp_=&_m;
25099 while(tmp!=null_ptr){
25100 if(a==tmp->_data){
25101 _size--;
25102 *tmp_=tmp->_next;
25103 unget(tmp);
25104 return true;
25105 }
25106 tmp_=&tmp->_next;
25107 tmp=*tmp_;
25108 }
25109 return false;
25110 }
25111 #define expr declvalue(func_t)(declvalue(T&))
25112 template<typename func_t> requires was_not_an_ill_form(expr)
25113 void for_each(func_t&&func)noexcept_as(expr){
25114 data_t*tmp=_m;
25115 while(tmp!=null_ptr){
25116 func(tmp->_data);
25117 tmp=tmp->_next;
25118 }
25119 }
25120 #undef expr
25121
25122 #define expr declvalue(func_t)(declvalue(const T&))
25123 template<typename func_t> requires was_not_an_ill_form(expr)
25124 void for_each(func_t&&func)const noexcept_as(expr){
25125 const data_t*tmp=_m;
25126 while(tmp!=null_ptr){
25127 func(tmp->_data);
25128 tmp=tmp->_next;
25129 }
25130 }
25131 #undef expr
25132protected:
25133 void add(data_t*a)noexcept{
25134 a->_next=_m;
25135 _m=a;
25136 _size++;
25137 }
25138public:
25140 if(_m)
25141 return hash(_m->_data);
25142 else
25143 return hash(_m);
25144 }
25145 void move_top_to(this_t&a)noexcept{
25146 _size--;
25147 a.add(swap(_m,add_const_by_value(_m->_next)));
25148 }
25149};
25150
25151//file_end
25152
25153 #line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_body.hpp"
25154 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/auto_stack.hpp"
25155//defs.hpp
25156//at namespace elc::defs::container::stack_n
25157/*
25158未完成的elc解释器base文件
25159由steve02081504与Alex0125设计、编写
25160转载时请在不对此文件做任何修改的同时注明出处
25161项目地址:https://github.com/ELC-lang/ELC
25162*/
25163/*
25164 ,??????????????????????????
25165 ????????????????????????????
25166 ?????????????????????????????+
25167 ?????+++++++++++++++++++++++++
25168 ?????+++++++++++++++++++++++++
25169 ??????++++++++++++++++++++++++
25170 ?????++
25171 ?????+++
25172 ??????+++IIIIIIIIIIIIIIIIII
25173 ?????+++++IIIIIIIIIIIIIIIIII
25174 ?????++++++++++++++++++++++++
25175 ??????+++++++++++++++++++++++:
25176 ?????++
25177 ?????+++
25178 ??????++
25179 ??????????????????????????????II
25180 ??????????????????????????????IIII
25181 ,?????????????????????????????IIIII+
25182 =???++++++++++++++++++++++++++III?
25183 ?++++++++++++++++++++++++++++I+
25184*/
25185template<typename T>
25186struct auto_stack_t:base_stack_t<T>{//提头优化容器,可用于hashtable
25187private:
25188 typedef base_stack_t<T>base_t;
25189 typedef auto_stack_t<T>this_t;
25190
25191 using base_t::data_t;
25192 using base_t::_m;
25193public:
25194 using base_t::base_t;
25197
25198 this_t&operator=(this_t&&a)&noexcept{base_t::operator=(move(a));return*this;}
25199 template<typename U>
25201 data_t*tmp=_m,**tmp_=&_m;
25202 while(tmp!=null_ptr){
25203 if(tmp->_data==a){
25204 *tmp_=tmp->_next;
25205 tmp->_next=_m;//提头
25206 _m=tmp;
25207 return tmp->_data;
25208 }
25209 tmp_=&tmp->_next;
25210 tmp=*tmp_;
25211 }
25212 return note::fail;
25213 }
25214 [[nodiscard]]bool in_stack(const T&a)const noexcept_as(declvalue(this_t).find(a).not_fail()){
25215 return remove_const(this)->find(a).not_fail();
25216 }
25217 [[nodiscard]]bool not_in_stack(const T&a)const noexcept_as(declvalue(this_t).in_stack(a)){
25218 return not in_stack(a);
25219 }
25220};
25221
25222//file_end
25223
25224 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_body.hpp"
25225
25226 #if defined(ELC_TEST_ON)
25227 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_test.hpp"
25228//_test.hpp
25229//at namespace elc::defs::container::stack_n
25230/*
25231未完成的elc解释器base文件
25232由steve02081504与Alex0125设计、编写
25233转载时请在不对此文件做任何修改的同时注明出处
25234项目地址:https://github.com/ELC-lang/ELC
25235*/
25236/*
25237 ,??????????????????????????
25238 ????????????????????????????
25239 ?????????????????????????????+
25240 ?????+++++++++++++++++++++++++
25241 ?????+++++++++++++++++++++++++
25242 ??????++++++++++++++++++++++++
25243 ?????++
25244 ?????+++
25245 ??????+++IIIIIIIIIIIIIIIIII
25246 ?????+++++IIIIIIIIIIIIIIIIII
25247 ?????++++++++++++++++++++++++
25248 ??????+++++++++++++++++++++++:
25249 ?????++
25250 ?????+++
25251 ??????++
25252 ??????????????????????????????II
25253 ??????????????????????????????IIII
25254 ,?????????????????????????????IIIII+
25255 =???++++++++++++++++++++++++++III?
25256 ?++++++++++++++++++++++++++++I+
25257*/
25258inline void test(){
25259 ELC_TEST_EVENTNAME("stack部分测试");
25260 {
25261 base_stack_t<int>a;
25262 stest_accert(a.size()==0);
25263 a.add(1);
25264 a.add(2);
25265 a.add(3);
25266 stest_accert(a.size()==3);
25267 a.remove(2);
25268 stest_accert(a.size()==2);
25269 int add_num=0;
25270 a.for_each(λ_with_catch(&add_num)(int a){add_num+=a;});
25271 stest_accert(add_num==4);
25272 auto_stack_t<int>b=a;
25273 stest_accert(b.not_in_stack(2));
25274 b.remove(3);
25275 stest_accert(a.in_stack(3));
25276 a.clear();
25277 b=a;
25278 a=b;
25279 stest_accert(b.size()==0);
25280 }
25281 check_memory_lack();
25282}
25283inline void test_log_out(){
25284}
25285inline void test_end(){
25286}
25287
25288//file_end
25289
25290 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_body.hpp"
25291 #endif
25292}
25293#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_export.hpp"
25294//_export.hpp
25295//at namespace elc::defs::container
25296/*
25297未完成的elc解释器base文件
25298由steve02081504与Alex0125设计、编写
25299转载时请在不对此文件做任何修改的同时注明出处
25300项目地址:https://github.com/ELC-lang/ELC
25301*/
25302/*
25303 ,??????????????????????????
25304 ????????????????????????????
25305 ?????????????????????????????+
25306 ?????+++++++++++++++++++++++++
25307 ?????+++++++++++++++++++++++++
25308 ??????++++++++++++++++++++++++
25309 ?????++
25310 ?????+++
25311 ??????+++IIIIIIIIIIIIIIIIII
25312 ?????+++++IIIIIIIIIIIIIIIIII
25313 ?????++++++++++++++++++++++++
25314 ??????+++++++++++++++++++++++:
25315 ?????++
25316 ?????+++
25317 ??????++
25318 ??????????????????????????????II
25319 ??????????????????????????????IIII
25320 ,?????????????????????????????IIIII+
25321 =???++++++++++++++++++++++++++III?
25322 ?++++++++++++++++++++++++++++I+
25323*/
25324#define export using stack_n::
25325export auto_stack_t;
25326export base_stack_t;
25327#undef export
25328
25329//file_end
25330
25331#line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/stacks/_body.hpp"
25332
25333//file_end
25334
25335#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
25336#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/_body.hpp"
25337//_body.hpp
25338//at namespace elc::defs::container
25339/*
25340未完成的elc解释器base文件
25341由steve02081504与Alex0125设计、编写
25342转载时请在不对此文件做任何修改的同时注明出处
25343项目地址:https://github.com/ELC-lang/ELC
25344*/
25345/*
25346 ,??????????????????????????
25347 ????????????????????????????
25348 ?????????????????????????????+
25349 ?????+++++++++++++++++++++++++
25350 ?????+++++++++++++++++++++++++
25351 ??????++++++++++++++++++++++++
25352 ?????++
25353 ?????+++
25354 ??????+++IIIIIIIIIIIIIIIIII
25355 ?????+++++IIIIIIIIIIIIIIIIII
25356 ?????++++++++++++++++++++++++
25357 ??????+++++++++++++++++++++++:
25358 ?????++
25359 ?????+++
25360 ??????++
25361 ??????????????????????????????II
25362 ??????????????????????????????IIII
25363 ,?????????????????????????????IIIII+
25364 =???++++++++++++++++++++++++++III?
25365 ?++++++++++++++++++++++++++++I+
25366*/
25367#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/defs.hpp"
25368//defs.hpp
25369//at namespace elc::defs::container
25370/*
25371未完成的elc解释器base文件
25372由steve02081504与Alex0125设计、编写
25373转载时请在不对此文件做任何修改的同时注明出处
25374项目地址:https://github.com/ELC-lang/ELC
25375*/
25376/*
25377 ,??????????????????????????
25378 ????????????????????????????
25379 ?????????????????????????????+
25380 ?????+++++++++++++++++++++++++
25381 ?????+++++++++++++++++++++++++
25382 ??????++++++++++++++++++++++++
25383 ?????++
25384 ?????+++
25385 ??????+++IIIIIIIIIIIIIIIIII
25386 ?????+++++IIIIIIIIIIIIIIIIII
25387 ?????++++++++++++++++++++++++
25388 ??????+++++++++++++++++++++++:
25389 ?????++
25390 ?????+++
25391 ??????++
25392 ??????????????????????????????II
25393 ??????????????????????????????IIII
25394 ,?????????????????????????????IIIII+
25395 =???++++++++++++++++++++++++++III?
25396 ?++++++++++++++++++++++++++++I+
25397*/
25398namespace hash_table_n{
25399 template<typename T,template<typename>class stack_t=auto_stack_t,size_t bucket_max_size=256>
25402 typedef stack_t<T>bucket_t;
25403 public:
25404 typedef array_t<bucket_t>base_t_w;
25405 private:
25406 base_t_w _m;
25407 public:
25408 void swap(base_t_w&a)noexcept{_m.swap_with(a);}
25409 private:
25410 [[nodiscard]]bucket_t&find_bucket(hash_t a)noexcept{
25411 return _m[a%_m.size()];
25412 }
25413 void bucket_count_grow()noexcept{
25414 this_t tmp(special_init,get_next_gold_size_to_resize_for_hash(_m.size()));
25415 for(bucket_t&a:_m){
25416 while(!a.empty())
25417 a.move_top_to(tmp.find_bucket(a.get_top_hash()));
25418 }
25419 swap(tmp);
25420 }
25421 hash_table_t(const base_t_w&a)noexcept:_m(a){}
25422 this_t copy()noexcept(copy_construct.nothrow<base_t_w>){
25423 return{_m};
25424 }
25425 public:
25426 hash_table_t()noexcept:_m(5){}
25427 hash_table_t(special_init_t,size_t bucket_size)noexcept:_m(bucket_size){}
25428 ~hash_table_t()noexcept(destruct.nothrow<base_t_w>)=default;
25429
25430 operator base_t_w&()noexcept{return _m;}
25431 operator const base_t_w&()const noexcept{return _m;}
25432
25433 hash_table_t(const this_t&a)noexcept:_m(a._m){}
25434 hash_table_t(this_t&&a)noexcept:_m(a._m){}
25435
25437 swap(_m,a);
25438 return*this;
25439 }
25440 this_t&operator=(const base_t_w&a)&noexcept{
25441 _m=a;
25442 return*this;
25443 }
25444
25445 template<typename U>
25446 static constexpr bool hash_nothrow=noexcept(hash(declvalue(U)));
25447 template<typename U>
25448 static constexpr bool find_nothrow=hash_nothrow<U>&&noexcept(declvalue(bucket_t).find(declvalue(U)));
25449
25450 void add(const T&a)noexcept(hash_nothrow<const T&>&&bucket_t::add_nothrow){
25451 auto&bucket=find_bucket(hash(a));
25452 bucket.add(a);
25453 if(bucket.size() > bucket_max_size)
25454 bucket_count_grow();
25455 }
25456 bool remove(const T&a)noexcept(bucket_t::remove_nothrow){
25457 auto&bucket=find_bucket(hash(a));
25458 bool remove_success=bucket.remove(a);
25459 if constexpr(is_unstable_hash<T>)
25460 if(not remove_success){
25461 for(auto&i:_m){
25462 if(is_eq(i,bucket))
25463 continue;
25464 remove_success=i.remove(a);
25465 if(remove_success)
25466 break;
25467 }
25468 }
25469 return remove_success;
25470 }
25471 template<typename U>
25472 [[nodiscard]]maybe_fail_reference<T>find(U&&a)noexcept(find_nothrow<U>){
25473 auto&bucket=find_bucket(hash(a));
25475 auto reference=bucket.find(a);
25476 if constexpr(is_unstable_hash<T>)
25477 if(reference.fail()){
25478 for(auto&i:_m){
25479 if(is_eq(i,bucket))
25480 continue;
25481 re_construct[&reference](i.find(a));
25482 if(reference.not_fail())
25483 break;
25484 }
25485 }
25487 return reference;
25488 }
25489 [[nodiscard]]bool in_table(const T&a)noexcept_as(declvalue(this_t).find(a).not_fail()){
25490 return find(a).not_fail();
25491 }
25492 [[nodiscard]]bool not_in_table(const T&a)noexcept_as(declvalue(this_t).in_table(a)){
25493 return not in_table(a);
25494 }
25495
25496 size_t size()noexcept{
25497 size_t aret=0;
25498 for(const bucket_t&a:_m){
25499 aret+=a.size();
25500 }
25501 return aret;
25502 }
25503
25504 void clear()noexcept(re_construct.nothrow<this_t>){
25505 re_construct(this);
25506 }
25507
25508 #define expr declvalue(func_t)(declvalue(T&))
25509 template<typename func_t> requires was_not_an_ill_form(expr)
25510 void for_each(func_t&&func)noexcept_as(expr){
25511 for(bucket_t&a:_m){
25512 a.for_each(func);
25513 }
25514 }
25515 #undef expr
25516
25517 #define expr declvalue(func_t)(declvalue(const T&))
25518 template<typename func_t> requires was_not_an_ill_form(expr)
25519 void for_each(func_t&&func)const noexcept_as(expr){
25520 for(bucket_t&a:_m){
25521 a.for_each(func);
25522 }
25523 }
25524 #undef expr
25525
25526 #define expr declvalue(func_t)(declvalue(bucket_t&))
25527 template<typename func_t> requires was_not_an_ill_form(expr)
25528 void for_each_bucket(func_t&&func)noexcept_as(expr){
25529 _m.for_each(func);
25530 }
25531 #undef expr
25532
25533 #define expr declvalue(func_t)(declvalue(const bucket_t&))
25534 template<typename func_t> requires was_not_an_ill_form(expr)
25535 void for_each_bucket(func_t&&func)const noexcept_as(expr){
25536 _m.for_each(func);
25537 }
25538 #undef expr
25539 };
25540 template<typename T,template<typename>class stack_t,size_t _,size_t __>
25541 inline void swap(hash_table_t<T,stack_t,_>&a,hash_table_t<T,stack_t,__>&b)noexcept{a.swap(b);}
25542 template<typename T,template<typename>class stack_t,size_t _>
25543 inline void swap(hash_table_t<T,stack_t,_>&a,typename hash_table_t<T,stack_t,_>::base_t_w&b)noexcept{a.swap(b);}
25544 template<typename T,template<typename>class stack_t,size_t _>
25545 inline void swap(typename hash_table_t<T,stack_t,_>::base_t_w&b,hash_table_t<T,stack_t,_>&a)noexcept{a.swap(b);}
25546}
25547
25548//file_end
25549
25550#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/_body.hpp"
25551#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/_export.hpp"
25552//_export.hpp
25553//at namespace elc::defs::container
25554/*
25555未完成的elc解释器base文件
25556由steve02081504与Alex0125设计、编写
25557转载时请在不对此文件做任何修改的同时注明出处
25558项目地址:https://github.com/ELC-lang/ELC
25559*/
25560/*
25561 ,??????????????????????????
25562 ????????????????????????????
25563 ?????????????????????????????+
25564 ?????+++++++++++++++++++++++++
25565 ?????+++++++++++++++++++++++++
25566 ??????++++++++++++++++++++++++
25567 ?????++
25568 ?????+++
25569 ??????+++IIIIIIIIIIIIIIIIII
25570 ?????+++++IIIIIIIIIIIIIIIIII
25571 ?????++++++++++++++++++++++++
25572 ??????+++++++++++++++++++++++:
25573 ?????++
25574 ?????+++
25575 ??????++
25576 ??????????????????????????????II
25577 ??????????????????????????????IIII
25578 ,?????????????????????????????IIIII+
25579 =???++++++++++++++++++++++++++III?
25580 ?++++++++++++++++++++++++++++I+
25581*/
25582#define export using hash_table_n::
25583export hash_table_t;
25584#undef export
25585
25586//file_end
25587
25588#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/_body.hpp"
25589#if defined(ELC_TEST_ON)
25590 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/_test.hpp"
25591//_test.hpp
25592//at namespace elc::defs::container
25593/*
25594未完成的elc解释器base文件
25595由steve02081504与Alex0125设计、编写
25596转载时请在不对此文件做任何修改的同时注明出处
25597项目地址:https://github.com/ELC-lang/ELC
25598*/
25599/*
25600 ,??????????????????????????
25601 ????????????????????????????
25602 ?????????????????????????????+
25603 ?????+++++++++++++++++++++++++
25604 ?????+++++++++++++++++++++++++
25605 ??????++++++++++++++++++++++++
25606 ?????++
25607 ?????+++
25608 ??????+++IIIIIIIIIIIIIIIIII
25609 ?????+++++IIIIIIIIIIIIIIIIII
25610 ?????++++++++++++++++++++++++
25611 ??????+++++++++++++++++++++++:
25612 ?????++
25613 ?????+++
25614 ??????++
25615 ??????????????????????????????II
25616 ??????????????????????????????IIII
25617 ,?????????????????????????????IIIII+
25618 =???++++++++++++++++++++++++++III?
25619 ?++++++++++++++++++++++++++++I+
25620*/
25621namespace hash_table_n{
25622 //BLOCK:for debug
25623 inline void test(){
25624 ELC_TEST_EVENTNAME("hash_table部分测试");
25625 {
25626
25627 }
25628 check_memory_lack();
25629 }
25630 inline void test_log_out(){
25631 }
25632 inline void test_end(){
25633 }
25634 //BLOCK_END
25635}
25636
25637//file_end
25638
25639 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/hash_table/_body.hpp"
25640#endif
25641
25642//file_end
25643
25644#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
25645
25646#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/_body.hpp"
25647//_body.hpp
25648//at namespace elc::defs::container
25649/*
25650未完成的elc解释器base文件
25651由steve02081504与Alex0125设计、编写
25652转载时请在不对此文件做任何修改的同时注明出处
25653项目地址:https://github.com/ELC-lang/ELC
25654*/
25655/*
25656 ,??????????????????????????
25657 ????????????????????????????
25658 ?????????????????????????????+
25659 ?????+++++++++++++++++++++++++
25660 ?????+++++++++++++++++++++++++
25661 ??????++++++++++++++++++++++++
25662 ?????++
25663 ?????+++
25664 ??????+++IIIIIIIIIIIIIIIIII
25665 ?????+++++IIIIIIIIIIIIIIIIII
25666 ?????++++++++++++++++++++++++
25667 ??????+++++++++++++++++++++++:
25668 ?????++
25669 ?????+++
25670 ??????++
25671 ??????????????????????????????II
25672 ??????????????????????????????IIII
25673 ,?????????????????????????????IIIII+
25674 =???++++++++++++++++++++++++++III?
25675 ?++++++++++++++++++++++++++++I+
25676*/
25677#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/defs.hpp"
25678//defs.hpp
25679//at namespace elc::defs::container
25680/*
25681未完成的elc解释器base文件
25682由steve02081504与Alex0125设计、编写
25683转载时请在不对此文件做任何修改的同时注明出处
25684项目地址:https://github.com/ELC-lang/ELC
25685*/
25686/*
25687 ,??????????????????????????
25688 ????????????????????????????
25689 ?????????????????????????????+
25690 ?????+++++++++++++++++++++++++
25691 ?????+++++++++++++++++++++++++
25692 ??????++++++++++++++++++++++++
25693 ?????++
25694 ?????+++
25695 ??????+++IIIIIIIIIIIIIIIIII
25696 ?????+++++IIIIIIIIIIIIIIIIII
25697 ?????++++++++++++++++++++++++
25698 ??????+++++++++++++++++++++++:
25699 ?????++
25700 ?????+++
25701 ??????++
25702 ??????????????????????????????II
25703 ??????????????????????????????IIII
25704 ,?????????????????????????????IIIII+
25705 =???++++++++++++++++++++++++++III?
25706 ?++++++++++++++++++++++++++++I+
25707*/
25708namespace map_n{
25709 template<typename T,typename key_t,template<typename>class stack_t=auto_stack_t,size_t bucket_max_size=256>
25710 class map_t{
25712
25713 struct data_t{
25714 key_t _key;
25715 T _value;
25716
25717 data_t(const data_t&) = default;
25718 data_t(const key_t&a,const T&b)noexcept(copy_construct.nothrow<key_t> && copy_construct.nothrow<T>):_key(a),_value(b){}
25719
25721 const T*_m;
25722 constexpr seek_value_t(const T&a)noexcept:_m(addressof(a)){};
25723 [[nodiscard]]bool operator==(const data_t&a)const noexcept_as(a._value==*_m){
25724 return bool(a._value==*_m);
25725 }
25726 };
25727
25728 [[nodiscard]]bool operator==(const key_t&a)noexcept_as(_key==a){
25729 return bool(_key==a);
25730 }
25731 [[nodiscard]]constexpr_as(hash(_key))operator decltype(hash(_key))()const noexcept_as(hash(_key)){
25732 return hash(_key);
25733 }
25734 /* operator T&()noexcept{
25735 return _value;
25736 } */
25737 [[nodiscard]]bool empty(){
25738 return _value==const_default_value_of<T>;
25739 }
25740 };
25741 typedef hash_table_t<data_t,stack_t,bucket_max_size>base_t_w;
25742
25743 mutable base_t_w _m;//mutable cause shrink.
25744
25745 map_t(const base_t_w&a)noexcept:_m(a){}
25746 this_t copy()noexcept(copy_construct.nothrow<base_t_w>){
25747 return{_m};//不用疑惑,这是deep copy
25748 }
25749 public:
25750 map_t()noexcept=default;
25751 ~map_t()noexcept(destruct.nothrow<base_t_w>)=default;
25752 map_t(const this_t&a)noexcept=default;
25753 map_t(this_t&&a)noexcept=default;
25754
25755 this_t&operator=(this_t&&a)noexcept{
25756 swap(_m,a._m);
25757 return*this;
25758 }
25759 this_t&operator=(const this_t&a)noexcept{
25760 return operator=(a.copy());
25761 }
25762
25763 template<size_t _>
25764 void swap(map_t<T,key_t,stack_t,_>&a)noexcept{swap(_m,a._m);}
25765
25766 [[nodiscard]]T&operator[](const key_t&a)noexcept_as(_m.add({a,T()})){
25767 auto tmp=_m.find(a);
25768 if(tmp.fail()){
25769 _m.add({a,T()});
25770 tmp=_m.find(a);
25771 }
25772 return tmp.get_ref()._value;
25773 }
25774 [[nodiscard]]const T&operator[](const key_t&a)const noexcept{
25775 auto tmp=_m.find(a);
25776 return tmp.fail()?const_default_value_of<T>:tmp.get_ref()._value;
25777 }
25778 void clear()noexcept(re_construct.nothrow<this_t>){
25779 re_construct(this);
25780 }
25781
25782 #define expr declvalue(func_t)(declvalue(T&))
25783 template<typename func_t> requires was_not_an_ill_form(expr)
25784 void for_each(func_t&&func)noexcept_as(expr){
25785 _m.for_each(λ(data_t&a)noexcept_as(expr){
25786 func(a._value);
25787 });
25788 }
25789 #undef expr
25790
25791 #define expr declvalue(func_t)(declvalue(const T&))
25792 template<typename func_t> requires was_not_an_ill_form(expr)
25793 void for_each(func_t&&func)const noexcept_as(expr){
25794 _m.for_each(λ(data_t&a)noexcept_as(expr){
25795 func(add_const<T&>(a._value));
25796 });
25797 }
25798 #undef expr
25799
25800 static constexpr bool shrink_nothow=stack_t<data_t>::remove_nothrow;
25801 void shrink()const noexcept(shrink_nothow){
25802 _m.for_each_bucket(λ(stack_t<data_t>&a)noexcept(shrink_nothow && equal.nothrow<T>){
25803 while(a.remove(data_t::seek_value_t(const_default_value_of<T>)));
25804 });
25805 }
25806
25808
25809 bool operator==(const this_t&a)const noexcept(shrink_nothow && equal.nothrow<T>){
25810 shrink();
25811 a.shrink();
25812 if(size()!=a.size())
25813 return 0;
25814 try{
25815 _m.for_each(λ_with_catch(&a)(data_t&b){
25816 if(a[b._key]!=b._value)
25817 throw (this_t*)(nullptr);
25818 });
25819 }
25820 catch(this_t*){
25821 return 0;
25822 }
25823 return 1;
25824 }
25825 };
25826 template<typename T,typename key_t,template<typename>class stack_t,size_t _,size_t __>
25827 inline void swap(map_t<T,key_t,stack_t,_>&a,map_t<T,key_t,stack_t,__>&b)noexcept{a.swap(b);}
25828}
25829
25830//file_end
25831
25832#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/_body.hpp"
25833#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/_export.hpp"
25834//_export.hpp
25835//at namespace elc::defs::container
25836/*
25837未完成的elc解释器base文件
25838由steve02081504与Alex0125设计、编写
25839转载时请在不对此文件做任何修改的同时注明出处
25840项目地址:https://github.com/ELC-lang/ELC
25841*/
25842/*
25843 ,??????????????????????????
25844 ????????????????????????????
25845 ?????????????????????????????+
25846 ?????+++++++++++++++++++++++++
25847 ?????+++++++++++++++++++++++++
25848 ??????++++++++++++++++++++++++
25849 ?????++
25850 ?????+++
25851 ??????+++IIIIIIIIIIIIIIIIII
25852 ?????+++++IIIIIIIIIIIIIIIIII
25853 ?????++++++++++++++++++++++++
25854 ??????+++++++++++++++++++++++:
25855 ?????++
25856 ?????+++
25857 ??????++
25858 ??????????????????????????????II
25859 ??????????????????????????????IIII
25860 ,?????????????????????????????IIIII+
25861 =???++++++++++++++++++++++++++III?
25862 ?++++++++++++++++++++++++++++I+
25863*/
25864#define export using map_n::
25865export map_t;
25866#undef export
25867
25868//file_end
25869
25870#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/_body.hpp"
25871#if defined(ELC_TEST_ON)
25872 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/_test.hpp"
25873//_test.hpp
25874//at namespace elc::defs::container
25875/*
25876未完成的elc解释器base文件
25877由steve02081504与Alex0125设计、编写
25878转载时请在不对此文件做任何修改的同时注明出处
25879项目地址:https://github.com/ELC-lang/ELC
25880*/
25881/*
25882 ,??????????????????????????
25883 ????????????????????????????
25884 ?????????????????????????????+
25885 ?????+++++++++++++++++++++++++
25886 ?????+++++++++++++++++++++++++
25887 ??????++++++++++++++++++++++++
25888 ?????++
25889 ?????+++
25890 ??????+++IIIIIIIIIIIIIIIIII
25891 ?????+++++IIIIIIIIIIIIIIIIII
25892 ?????++++++++++++++++++++++++
25893 ??????+++++++++++++++++++++++:
25894 ?????++
25895 ?????+++
25896 ??????++
25897 ??????????????????????????????II
25898 ??????????????????????????????IIII
25899 ,?????????????????????????????IIIII+
25900 =???++++++++++++++++++++++++++III?
25901 ?++++++++++++++++++++++++++++I+
25902*/
25903namespace map_n{
25904 //BLOCK:for debug
25905 inline void test(){
25906 ELC_TEST_EVENTNAME("map部分测试");
25907 {
25908
25909 }
25910 check_memory_lack();
25911 }
25912 inline void test_log_out(){
25913 }
25914 inline void test_end(){
25915 }
25916 //BLOCK_END
25917}
25918
25919//file_end
25920
25921 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/map/_body.hpp"
25922#endif
25923
25924//file_end
25925
25926#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
25927
25928#if defined(ELC_TEST_ON)
25929 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_test.hpp"
25930//_test.hpp
25931//at namespace elc::defs::container
25932/*
25933未完成的elc解释器base文件
25934由steve02081504与Alex0125设计、编写
25935转载时请在不对此文件做任何修改的同时注明出处
25936项目地址:https://github.com/ELC-lang/ELC
25937*/
25938/*
25939 ,??????????????????????????
25940 ????????????????????????????
25941 ?????????????????????????????+
25942 ?????+++++++++++++++++++++++++
25943 ?????+++++++++++++++++++++++++
25944 ??????++++++++++++++++++++++++
25945 ?????++
25946 ?????+++
25947 ??????+++IIIIIIIIIIIIIIIIII
25948 ?????+++++IIIIIIIIIIIIIIIIII
25949 ?????++++++++++++++++++++++++
25950 ??????+++++++++++++++++++++++:
25951 ?????++
25952 ?????+++
25953 ??????++
25954 ??????????????????????????????II
25955 ??????????????????????????????IIII
25956 ,?????????????????????????????IIIII+
25957 =???++++++++++++++++++++++++++III?
25958 ?++++++++++++++++++++++++++++I+
25959*/
25960inline void test(){
25961 ELC_TEST_EVENTNAME("container部分测试");
25962 array_n::test();
25963 function_n::test();
25964 stack_n::test();
25965}
25966inline void test_log_out(){
25967 array_n::test_log_out();
25968 function_n::test_log_out();
25969 stack_n::test_log_out();
25970}
25971inline void test_end(){
25972 array_n::test_end();
25973 function_n::test_end();
25974 stack_n::test_end();
25975}
25976
25977//file_end
25978
25979 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/container/_body.hpp"
25980#endif
25981
25982//file_end
25983
25984 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
25985 }
25986 using namespace container;
25987
25988 namespace memory::gc_n{//gc定义,依赖container(但container依赖memory的其他部分)
25989 //依赖container
25990 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
25991//_body.hpp
25992//at namespace elc::defs::memory::gc_n
25993/*
25994未完成的elc解释器base文件
25995由steve02081504与Alex0125设计、编写
25996转载时请在不对此文件做任何修改的同时注明出处
25997项目地址:https://github.com/ELC-lang/ELC
25998*/
25999/*
26000 ,??????????????????????????
26001 ????????????????????????????
26002 ?????????????????????????????+
26003 ?????+++++++++++++++++++++++++
26004 ?????+++++++++++++++++++++++++
26005 ??????++++++++++++++++++++++++
26006 ?????++
26007 ?????+++
26008 ??????+++IIIIIIIIIIIIIIIIII
26009 ?????+++++IIIIIIIIIIIIIIIIII
26010 ?????++++++++++++++++++++++++
26011 ??????+++++++++++++++++++++++:
26012 ?????++
26013 ?????+++
26014 ??????++
26015 ??????????????????????????????II
26016 ??????????????????????????????IIII
26017 ,?????????????????????????????IIIII+
26018 =???++++++++++++++++++++++++++III?
26019 ?++++++++++++++++++++++++++++I+
26020*/
26021#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/_body.hpp"
26022//_body.hpp
26023//at namespace elc::defs::memory::gc_n
26024/*
26025未完成的elc解释器base文件
26026由steve02081504与Alex0125设计、编写
26027转载时请在不对此文件做任何修改的同时注明出处
26028项目地址:https://github.com/ELC-lang/ELC
26029*/
26030/*
26031 ,??????????????????????????
26032 ????????????????????????????
26033 ?????????????????????????????+
26034 ?????+++++++++++++++++++++++++
26035 ?????+++++++++++++++++++++++++
26036 ??????++++++++++++++++++++++++
26037 ?????++
26038 ?????+++
26039 ??????+++IIIIIIIIIIIIIIIIII
26040 ?????+++++IIIIIIIIIIIIIIIIII
26041 ?????++++++++++++++++++++++++
26042 ??????+++++++++++++++++++++++:
26043 ?????++
26044 ?????+++
26045 ??????++
26046 ??????????????????????????????II
26047 ??????????????????????????????IIII
26048 ,?????????????????????????????IIIII+
26049 =???++++++++++++++++++++++++++III?
26050 ?++++++++++++++++++++++++++++I+
26051*/
26052#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/roots/_body.hpp"
26053//_body.hpp
26054//at namespace elc::defs::memory::gc_n
26055/*
26056未完成的elc解释器base文件
26057由steve02081504与Alex0125设计、编写
26058转载时请在不对此文件做任何修改的同时注明出处
26059项目地址:https://github.com/ELC-lang/ELC
26060*/
26061/*
26062 ,??????????????????????????
26063 ????????????????????????????
26064 ?????????????????????????????+
26065 ?????+++++++++++++++++++++++++
26066 ?????+++++++++++++++++++++++++
26067 ??????++++++++++++++++++++++++
26068 ?????++
26069 ?????+++
26070 ??????+++IIIIIIIIIIIIIIIIII
26071 ?????+++++IIIIIIIIIIIIIIIIII
26072 ?????++++++++++++++++++++++++
26073 ??????+++++++++++++++++++++++:
26074 ?????++
26075 ?????+++
26076 ??????++
26077 ??????????????????????????????II
26078 ??????????????????????????????IIII
26079 ,?????????????????????????????IIIII+
26080 =???++++++++++++++++++++++++++III?
26081 ?++++++++++++++++++++++++++++I+
26082*/
26083struct have_root{};
26084
26085template<typename T>
26086class root_of;
26087
26088template<typename T>
26090 typedef roots_t<T>this_t;
26091 typedef root_of<T>root_t;
26092 typedef root_of<T>*value_t;
26093
26094 base_stack_t<value_t>_roots;
26095public:
26096 constexpr roots_t()noexcept=default;
26097 ~roots_t()noexcept=default;
26098
26102 using_method_from_value(for_each,_roots);
26103
26104 void map_and_mark()noexcept_as(declvalue(value_t)->map_and_mark()){
26105 _roots.for_each(
26107 {
26108 a->map_and_mark();
26109 }
26110 );
26111 }
26112};
26113template<typename T>
26115
26116template<typename T>
26118 typedef root_of<T>this_t;
26119public:
26120 root_of()noexcept_as(roots_of<T>.add(declvalue(this_t*))){
26121 roots_of<T>.add(this);
26122 }
26123 virtual T& get()noexcept=0;
26124 virtual void map_and_mark()noexcept=0;
26125};
26126template<typename T>
26127inline T& root_of<T>::get()noexcept{return const_default_value_of<T>;}
26128template<typename T>
26129inline void root_of<T>::map_and_mark()noexcept{}
26130
26131//file_end
26132
26133#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/_body.hpp"
26134#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/mark_able_for_gc/_body.hpp"
26135//_body.hpp
26136//at namespace elc::defs::memory::gc_n
26137/*
26138未完成的elc解释器base文件
26139由steve02081504与Alex0125设计、编写
26140转载时请在不对此文件做任何修改的同时注明出处
26141项目地址:https://github.com/ELC-lang/ELC
26142*/
26143/*
26144 ,??????????????????????????
26145 ????????????????????????????
26146 ?????????????????????????????+
26147 ?????+++++++++++++++++++++++++
26148 ?????+++++++++++++++++++++++++
26149 ??????++++++++++++++++++++++++
26150 ?????++
26151 ?????+++
26152 ??????+++IIIIIIIIIIIIIIIIII
26153 ?????+++++IIIIIIIIIIIIIIIIII
26154 ?????++++++++++++++++++++++++
26155 ??????+++++++++++++++++++++++:
26156 ?????++
26157 ?????+++
26158 ??????++
26159 ??????????????????????????????II
26160 ??????????????????????????????IIII
26161 ,?????????????????????????????IIIII+
26162 =???++++++++++++++++++++++++++III?
26163 ?++++++++++++++++++++++++++++I+
26164*/
26165template<typename T>
26167 mark_able_for_gc()noexcept:mark_able<T>(not_mark){}
26169};
26170
26171//file_end
26172
26173#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/_body.hpp"
26174#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/others/_body.hpp"
26175//_body.hpp
26176//at namespace elc::defs::memory::gc_n
26177/*
26178未完成的elc解释器base文件
26179由steve02081504与Alex0125设计、编写
26180转载时请在不对此文件做任何修改的同时注明出处
26181项目地址:https://github.com/ELC-lang/ELC
26182*/
26183/*
26184 ,??????????????????????????
26185 ????????????????????????????
26186 ?????????????????????????????+
26187 ?????+++++++++++++++++++++++++
26188 ?????+++++++++++++++++++++++++
26189 ??????++++++++++++++++++++++++
26190 ?????++
26191 ?????+++
26192 ??????+++IIIIIIIIIIIIIIIIII
26193 ?????+++++IIIIIIIIIIIIIIIIII
26194 ?????++++++++++++++++++++++++
26195 ??????+++++++++++++++++++++++:
26196 ?????++
26197 ?????+++
26198 ??????++
26199 ??????????????????????????????II
26200 ??????????????????????????????IIII
26201 ,?????????????????????????????IIIII+
26202 =???++++++++++++++++++++++++++III?
26203 ?++++++++++++++++++++++++++++I+
26204*/
26207
26208//file_end
26209
26210#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_flags/_body.hpp"
26211
26212//file_end
26213
26214#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26215
26216#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/_body.hpp"
26217//_body.hpp
26218//at namespace elc::defs::memory::gc_n
26219/*
26220未完成的elc解释器base文件
26221由steve02081504与Alex0125设计、编写
26222转载时请在不对此文件做任何修改的同时注明出处
26223项目地址:https://github.com/ELC-lang/ELC
26224*/
26225/*
26226 ,??????????????????????????
26227 ????????????????????????????
26228 ?????????????????????????????+
26229 ?????+++++++++++++++++++++++++
26230 ?????+++++++++++++++++++++++++
26231 ??????++++++++++++++++++++++++
26232 ?????++
26233 ?????+++
26234 ??????+++IIIIIIIIIIIIIIIIII
26235 ?????+++++IIIIIIIIIIIIIIIIII
26236 ?????++++++++++++++++++++++++
26237 ??????+++++++++++++++++++++++:
26238 ?????++
26239 ?????+++
26240 ??????++
26241 ??????????????????????????????II
26242 ??????????????????????????????IIII
26243 ,?????????????????????????????IIIII+
26244 =???++++++++++++++++++++++++++III?
26245 ?++++++++++++++++++++++++++++I+
26246*/
26247#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/default_method/decl.hpp"
26248//_body.hpp
26249//at namespace elc::defs::memory::gc_n
26250/*
26251未完成的elc解释器base文件
26252由steve02081504与Alex0125设计、编写
26253转载时请在不对此文件做任何修改的同时注明出处
26254项目地址:https://github.com/ELC-lang/ELC
26255*/
26256/*
26257 ,??????????????????????????
26258 ????????????????????????????
26259 ?????????????????????????????+
26260 ?????+++++++++++++++++++++++++
26261 ?????+++++++++++++++++++++++++
26262 ??????++++++++++++++++++++++++
26263 ?????++
26264 ?????+++
26265 ??????+++IIIIIIIIIIIIIIIIII
26266 ?????+++++IIIIIIIIIIIIIIIIII
26267 ?????++++++++++++++++++++++++
26268 ??????+++++++++++++++++++++++:
26269 ?????++
26270 ?????+++
26271 ??????++
26272 ??????????????????????????????II
26273 ??????????????????????????????IIII
26274 ,?????????????????????????????IIIII+
26275 =???++++++++++++++++++++++++++III?
26276 ?++++++++++++++++++++++++++++I+
26277*/
26278template<class T,enable_flag>
26279inline void gc_method_of()noexcept;
26280template<class T,enable_flag>
26281[[nodiscard]]inline bool gc_success_identifier_of()noexcept;
26282
26283//file_end
26284
26285#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/_body.hpp"
26286//
26287#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/defs.hpp"
26288//defs.hpp
26289//at namespace elc::defs::memory
26290/*
26291未完成的elc解释器base文件
26292由steve02081504与Alex0125设计、编写
26293转载时请在不对此文件做任何修改的同时注明出处
26294项目地址:https://github.com/ELC-lang/ELC
26295*/
26296/*
26297 ,??????????????????????????
26298 ????????????????????????????
26299 ?????????????????????????????+
26300 ?????+++++++++++++++++++++++++
26301 ?????+++++++++++++++++++++++++
26302 ??????++++++++++++++++++++++++
26303 ?????++
26304 ?????+++
26305 ??????+++IIIIIIIIIIIIIIIIII
26306 ?????+++++IIIIIIIIIIIIIIIIII
26307 ?????++++++++++++++++++++++++
26308 ??????+++++++++++++++++++++++:
26309 ?????++
26310 ?????+++
26311 ??????++
26312 ??????????????????????????????II
26313 ??????????????????????????????IIII
26314 ,?????????????????????????????IIIII+
26315 =???++++++++++++++++++++++++++III?
26316 ?++++++++++++++++++++++++++++I+
26317*/
26318class gc_t{
26319 typedef gc_t this_t;
26320 typedef function_t<void()noexcept>gc_method_t;
26321 typedef function_t<bool()noexcept>success_identifier_t;
26322
26323 base_stack_t<gc_method_t>_gc_methods;
26324 base_stack_t<success_identifier_t>_gc_success_identifiers;
26325 mutable flag _gc_running=flag(not_set);
26326public:
26327 inline void operator()()const noexcept{
26328 if(_gc_running)
26329 die_with(locale::str::gc_fail);
26330 _gc_running.set();
26331 if(_gc_methods.empty())
26332 die_with(locale::str::empty_gc_method);
26333 _gc_methods.for_each(invoke<const gc_method_t>._as(nothing));
26334 _gc_running.unset();
26335 }
26336 [[nodiscard]]inline bool success()const noexcept{
26337 bool success=_gc_success_identifiers.empty();
26338 _gc_success_identifiers.for_each(
26339 λ_with_catch(&success)(const success_identifier_t&a)noexcept{
26340 if(not success)
26341 success=a();
26342 }
26343 );
26344 return success;
26345 }
26346
26347 inline void add_gc_method(gc_method_t a)noexcept{
26348 _gc_methods.add(a);
26349 }
26350 inline void remove_gc_method(gc_method_t a){
26351 _gc_methods.remove(a);
26352 }
26353
26354 inline void add_gc_success_identifier(success_identifier_t a)noexcept{
26355 _gc_success_identifiers.add(a);
26356 }
26357 inline void remove_gc_success_identifier(success_identifier_t a){
26358 _gc_success_identifiers.remove(a);
26359 }
26360
26361 template<class T>
26362 inline void add_gc_method(type_info_t<T>)noexcept{
26363 add_gc_method((void(*)()noexcept)gc_method_of<T>);
26364 add_gc_success_identifier(gc_success_identifier_of<T>);
26365 }
26366 template<class T>
26367 inline void remove_gc_method(type_info_t<T>)noexcept{
26368 remove_gc_method(gc_method_of<T>);
26369 remove_gc_success_identifier(gc_success_identifier_of<T>);
26370 }
26371};
26372
26373//file_end
26374
26375#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/_body.hpp"
26376//
26377#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/default_method/defs.hpp"
26378//_body.hpp
26379//at namespace elc::defs::memory::gc_n
26380/*
26381未完成的elc解释器base文件
26382由steve02081504与Alex0125设计、编写
26383转载时请在不对此文件做任何修改的同时注明出处
26384项目地址:https://github.com/ELC-lang/ELC
26385*/
26386/*
26387 ,??????????????????????????
26388 ????????????????????????????
26389 ?????????????????????????????+
26390 ?????+++++++++++++++++++++++++
26391 ?????+++++++++++++++++++++++++
26392 ??????++++++++++++++++++++++++
26393 ?????++
26394 ?????+++
26395 ??????+++IIIIIIIIIIIIIIIIII
26396 ?????+++++IIIIIIIIIIIIIIIIII
26397 ?????++++++++++++++++++++++++
26398 ??????+++++++++++++++++++++++:
26399 ?????++
26400 ?????+++
26401 ??????++
26402 ??????????????????????????????II
26403 ??????????????????????????????IIII
26404 ,?????????????????????????????IIIII+
26405 =???++++++++++++++++++++++++++III?
26406 ?++++++++++++++++++++++++++++I+
26407*/
26408namespace default_gc_for_type{
26409 template<class T,enable_if(type_info<T>.has_attribute(count_able))>
26411
26412 template<class T>
26413 constexpr bool use_default_gc_able =
26414 (
26415 type_info<T>.has_attribute(mark_able_for_gc) &&
26416 type_info<T>.has_attribute(have_root)
26417 )&&(
26418 type_info<T>.has_attribute(can_map_all)
26419 &&(
26420 type_info<T>.has_attribute(can_shrink)
26421 ||(
26422 type_info<T>.has_attribute(mark_able_for_gc) &&
26423 type_info<T>.has_attribute(have_root)
26424 )
26425 )
26426 );
26427
26428 enable_adl(destory_by_gc);
26429 template<class T>
26431 template_error("this function should not be instantiated,please overload the function destory_by_gc in the namespace where this type is defined.");
26432 }
26433
26434 template<class T> requires use_default_gc_able<T>
26435 inline void default_gc_method()noexcept{
26436 constexpr auto&info=type_info<T>;
26437 //
26438 if constexpr(info.has_attribute(count_able))
26439 count_for_success_identify<T> = the_number_of(info);
26440 //
26441 if constexpr(info.has_attribute(can_map_all)){
26442 if constexpr(info.has_attribute(mark_able_for_gc)&&info.has_attribute(have_root))
26443 roots_of<T>.map_and_mark();
26444 if constexpr(info.has_attribute(can_shrink) || (info.has_attribute(mark_able_for_gc)&&info.has_attribute(have_root)))
26445 map_all<T>(
26446 λ(T*a)noexcept{
26447 if constexpr(info.has_attribute(can_shrink))
26448 a->shrink();
26449 if constexpr(info.has_attribute(mark_able_for_gc)&&info.has_attribute(have_root)){
26450 auto& b=attribute_cast<mark_able_for_gc>(*a);
26451 if(b.was_marked())
26452 b.unmark();
26453 else
26454 destory_by_gc(a);
26455 }
26456 }
26457 );
26458 }
26459 }
26460 //
26461 template<class T>
26462 constexpr bool use_default_gc_success_identifier_able = type_info<T>.has_attribute(count_able);
26463
26464 template<class T> requires use_default_gc_success_identifier_able<T>
26465 [[nodiscard]]inline bool default_gc_success_identifier()noexcept{
26466 constexpr auto&info=type_info<T>;
26467 if constexpr(info.has_attribute(count_able)){//重复判定,勿删,方便日后扩展
26468 return count_for_success_identify<T> _big_than_ the_number_of(info);
26469 }
26470 }
26471}
26472template<class T,enable_if(default_gc_for_type::use_default_gc_able<T>)>
26473inline void gc_method_of()noexcept{
26474 default_gc_for_type::default_gc_method<T>();
26475}
26476template<class T,enable_if(default_gc_for_type::use_default_gc_success_identifier_able<T>)>
26477[[nodiscard]]inline bool gc_success_identifier_of()noexcept{
26478 return default_gc_for_type::default_gc_success_identifier<T>();
26479}
26480
26481//file_end
26482
26483#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_t/_body.hpp"
26484
26485//file_end
26486
26487#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26488
26489#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/defs.hpp"
26490//defs.hpp
26491//at namespace elc::defs::memory::gc_n
26492/*
26493未完成的elc解释器base文件
26494由steve02081504与Alex0125设计、编写
26495转载时请在不对此文件做任何修改的同时注明出处
26496项目地址:https://github.com/ELC-lang/ELC
26497*/
26498/*
26499 ,??????????????????????????
26500 ????????????????????????????
26501 ?????????????????????????????+
26502 ?????+++++++++++++++++++++++++
26503 ?????+++++++++++++++++++++++++
26504 ??????++++++++++++++++++++++++
26505 ?????++
26506 ?????+++
26507 ??????+++IIIIIIIIIIIIIIIIII
26508 ?????+++++IIIIIIIIIIIIIIIIII
26509 ?????++++++++++++++++++++++++
26510 ??????+++++++++++++++++++++++:
26511 ?????++
26512 ?????+++
26513 ??????++
26514 ??????????????????????????????II
26515 ??????????????????????????????IIII
26516 ,?????????????????????????????IIIII+
26517 =???++++++++++++++++++++++++++III?
26518 ?++++++++++++++++++++++++++++I+
26519*/
26521
26522//file_end
26523
26524#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26525
26526//for alloc (def in "../alloc/defs.hpp#L10" )
26527#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/gc_for_alloc/_body.hpp"
26528//_body.hpp
26529//at namespace elc::defs::memory::gc_n
26530/*
26531未完成的elc解释器base文件
26532由steve02081504与Alex0125设计、编写
26533转载时请在不对此文件做任何修改的同时注明出处
26534项目地址:https://github.com/ELC-lang/ELC
26535*/
26536/*
26537 ,??????????????????????????
26538 ????????????????????????????
26539 ?????????????????????????????+
26540 ?????+++++++++++++++++++++++++
26541 ?????+++++++++++++++++++++++++
26542 ??????++++++++++++++++++++++++
26543 ?????++
26544 ?????+++
26545 ??????+++IIIIIIIIIIIIIIIIII
26546 ?????+++++IIIIIIIIIIIIIIIIII
26547 ?????++++++++++++++++++++++++
26548 ??????+++++++++++++++++++++++:
26549 ?????++
26550 ?????+++
26551 ??????++
26552 ??????????????????????????????II
26553 ??????????????????????????????IIII
26554 ,?????????????????????????????IIIII+
26555 =???++++++++++++++++++++++++++III?
26556 ?++++++++++++++++++++++++++++I+
26557*/
26558inline void gc_for_alloc()noexcept{
26559 gc();
26560}
26561
26562//file_end
26563
26564#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26565#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/_body.hpp"
26566//_body.hpp
26567//at namespace elc::defs::memory::gc_n
26568/*
26569未完成的elc解释器base文件
26570由steve02081504与Alex0125设计、编写
26571转载时请在不对此文件做任何修改的同时注明出处
26572项目地址:https://github.com/ELC-lang/ELC
26573*/
26574/*
26575 ,??????????????????????????
26576 ????????????????????????????
26577 ?????????????????????????????+
26578 ?????+++++++++++++++++++++++++
26579 ?????+++++++++++++++++++++++++
26580 ??????++++++++++++++++++++++++
26581 ?????++
26582 ?????+++
26583 ??????+++IIIIIIIIIIIIIIIIII
26584 ?????+++++IIIIIIIIIIIIIIIIII
26585 ?????++++++++++++++++++++++++
26586 ??????+++++++++++++++++++++++:
26587 ?????++
26588 ?????+++
26589 ??????++
26590 ??????????????????????????????II
26591 ??????????????????????????????IIII
26592 ,?????????????????????????????IIIII+
26593 =???++++++++++++++++++++++++++III?
26594 ?++++++++++++++++++++++++++++I+
26595*/
26596BREAK_NAMESPACE//in namespace elc::defs
26597INTER_NAMESPACE(memory::ptr_n)
26598
26599#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/defs.hpp"
26600//defs.hpp
26601//at namespace elc::defs::memory::ptr_n
26602/*
26603未完成的elc解释器base文件
26604由steve02081504与Alex0125设计、编写
26605转载时请在不对此文件做任何修改的同时注明出处
26606项目地址:https://github.com/ELC-lang/ELC
26607*/
26608/*
26609 ,??????????????????????????
26610 ????????????????????????????
26611 ?????????????????????????????+
26612 ?????+++++++++++++++++++++++++
26613 ?????+++++++++++++++++++++++++
26614 ??????++++++++++++++++++++++++
26615 ?????++
26616 ?????+++
26617 ??????+++IIIIIIIIIIIIIIIIII
26618 ?????+++++IIIIIIIIIIIIIIIIII
26619 ?????++++++++++++++++++++++++
26620 ??????+++++++++++++++++++++++:
26621 ?????++
26622 ?????+++
26623 ??????++
26624 ??????????????????????????????II
26625 ??????????????????????????????IIII
26626 ,?????????????????????????????IIIII+
26627 =???++++++++++++++++++++++++++III?
26628 ?++++++++++++++++++++++++++++I+
26629*/
26630enable_adl(map_and_mark_for_gc);
26631template<typename T>
26632void map_and_mark_for_gc(T*)noexcept{
26633 template_error("this function should not be instantiated,please overload the function map_and_mark_for_gc in the namespace where this type is defined");
26634}
26635using ::elc::defs::memory::gc_n::root_of;
26636template<class T,enable_if(
26637 was_ref_able<T> &&
26638 comn_ptr_t<T>::replace_check_nothrow &&
26639 type_info<T>.has_attribute(gc_n::have_root)
26640 )>
26641struct root_ptr_t:comn_ptr_t<T>,root_of<T>{
26644public:
26645 using base_t::base_t;
26646 template<class assign_t> requires was_not_an_ill_form(declvalue(base_t)=declvalue(assign_t))
26647 this_t&operator=(assign_t&&a)noexcept_as(base_t::operator=(forward<assign_t>(a))){
26648 base_t::operator=(forward<assign_t>(a));
26649 return*this;
26650 }
26651 virtual T& get()noexcept override{
26652 return base_t::operator*();
26653 }
26654 virtual void map_and_mark()noexcept override{
26655 map_and_mark_for_gc(&**this);
26656 }
26657};
26658
26659//file_end
26660
26661#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/_body.hpp"
26662#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/deduction_guides.hpp"
26663//deduction_guides.hpp
26664//at namespace elc::defs::memory::ptr_n
26665/*
26666未完成的elc解释器base文件
26667由steve02081504与Alex0125设计、编写
26668转载时请在不对此文件做任何修改的同时注明出处
26669项目地址:https://github.com/ELC-lang/ELC
26670*/
26671/*
26672 ,??????????????????????????
26673 ????????????????????????????
26674 ?????????????????????????????+
26675 ?????+++++++++++++++++++++++++
26676 ?????+++++++++++++++++++++++++
26677 ??????++++++++++++++++++++++++
26678 ?????++
26679 ?????+++
26680 ??????+++IIIIIIIIIIIIIIIIII
26681 ?????+++++IIIIIIIIIIIIIIIIII
26682 ?????++++++++++++++++++++++++
26683 ??????+++++++++++++++++++++++:
26684 ?????++
26685 ?????+++
26686 ??????++
26687 ??????????????????????????????II
26688 ??????????????????????????????IIII
26689 ,?????????????????????????????IIIII+
26690 =???++++++++++++++++++++++++++III?
26691 ?++++++++++++++++++++++++++++I+
26692*/
26693template<class T>
26695
26696//file_end
26697
26698#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/_body.hpp"
26699
26700BREAK_NAMESPACE//in namespace elc::defs
26701
26702#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/_export.hpp"
26703//_export.hpp
26704//at namespace elc::defs
26705/*
26706未完成的elc解释器base文件
26707由steve02081504与Alex0125设计、编写
26708转载时请在不对此文件做任何修改的同时注明出处
26709项目地址:https://github.com/ELC-lang/ELC
26710*/
26711/*
26712 ,??????????????????????????
26713 ????????????????????????????
26714 ?????????????????????????????+
26715 ?????+++++++++++++++++++++++++
26716 ?????+++++++++++++++++++++++++
26717 ??????++++++++++++++++++++++++
26718 ?????++
26719 ?????+++
26720 ??????+++IIIIIIIIIIIIIIIIII
26721 ?????+++++IIIIIIIIIIIIIIIIII
26722 ?????++++++++++++++++++++++++
26723 ??????+++++++++++++++++++++++:
26724 ?????++
26725 ?????+++
26726 ??????++
26727 ??????????????????????????????II
26728 ??????????????????????????????IIII
26729 ,?????????????????????????????IIIII+
26730 =???++++++++++++++++++++++++++III?
26731 ?++++++++++++++++++++++++++++I+
26732*/
26733INTER_NAMESPACE(memory)
26734#define export using memory::ptr_n::
26735export root_ptr_t;
26736#undef export
26738
26739//file_end
26740
26741#line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/root_ptr/_body.hpp"
26742
26743INTER_NAMESPACE(memory::gc_n)
26744
26745//file_end
26746
26747#line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26748
26749#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_export.hpp"
26750//_export.hpp
26751//at namespace elc::defs::memory::gc_n
26752/*
26753未完成的elc解释器base文件
26754由steve02081504与Alex0125设计、编写
26755转载时请在不对此文件做任何修改的同时注明出处
26756项目地址:https://github.com/ELC-lang/ELC
26757*/
26758/*
26759 ,??????????????????????????
26760 ????????????????????????????
26761 ?????????????????????????????+
26762 ?????+++++++++++++++++++++++++
26763 ?????+++++++++++++++++++++++++
26764 ??????++++++++++++++++++++++++
26765 ?????++
26766 ?????+++
26767 ??????+++IIIIIIIIIIIIIIIIII
26768 ?????+++++IIIIIIIIIIIIIIIIII
26769 ?????++++++++++++++++++++++++
26770 ??????+++++++++++++++++++++++:
26771 ?????++
26772 ?????+++
26773 ??????++
26774 ??????????????????????????????II
26775 ??????????????????????????????IIII
26776 ,?????????????????????????????IIIII+
26777 =???++++++++++++++++++++++++++III?
26778 ?++++++++++++++++++++++++++++I+
26779*/
26780BREAK_NAMESPACE//in namespace elc::defs
26781INTER_NAMESPACE(memory)
26782#define export using gc_n::
26783export gc;
26784export have_root;
26785export root_of;
26786export mark_able_for_gc;
26787export can_shrink;
26788#undef export
26789BREAK_NAMESPACE//in namespace elc::defs
26790INTER_NAMESPACE(memory::gc_n)
26791
26792//file_end
26793
26794#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26795
26796#if defined(ELC_TEST_ON)
26797 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_test.hpp"
26798//_body.hpp
26799//at namespace elc::defs::memory::gc_n
26800/*
26801未完成的elc解释器base文件
26802由steve02081504与Alex0125设计、编写
26803转载时请在不对此文件做任何修改的同时注明出处
26804项目地址:https://github.com/ELC-lang/ELC
26805*/
26806/*
26807 ,??????????????????????????
26808 ????????????????????????????
26809 ?????????????????????????????+
26810 ?????+++++++++++++++++++++++++
26811 ?????+++++++++++++++++++++++++
26812 ??????++++++++++++++++++++++++
26813 ?????++
26814 ?????+++
26815 ??????+++IIIIIIIIIIIIIIIIII
26816 ?????+++++IIIIIIIIIIIIIIIIII
26817 ?????++++++++++++++++++++++++
26818 ??????+++++++++++++++++++++++:
26819 ?????++
26820 ?????+++
26821 ??????++
26822 ??????????????????????????????II
26823 ??????????????????????????????IIII
26824 ,?????????????????????????????IIIII+
26825 =???++++++++++++++++++++++++++III?
26826 ?++++++++++++++++++++++++++++I+
26827*/
26828#if!defined(_MSC_VER)//貌似msvc在这里有bug
26829struct gc_tester:type_info_t<gc_tester>::template_name
26830 with_common_attribute<can_map_all,can_shrink,count_able,mark_able_for_gc,never_in_array,ref_able>,
26832 distinctive static inline int shrink_time=0;
26833 distinctive static inline int destroy_time=0;
26834 ~gc_tester()noexcept{destroy_time++;}
26835 void shrink(){
26836 shrink_time++;
26837 }
26838 static void reset_times(){
26839 shrink_time=destroy_time=0;
26840 }
26841};
26842static_assert(type_info<gc_tester>.base_on<can_map_all<gc_tester>>);
26843void map_and_mark_for_gc(gc_tester*a){
26844 attribute_ptr_cast<mark_able_for_gc>(a)->mark();
26845}
26846void destory_by_gc(gc_tester*a){
26847 a->~gc_tester();
26848}
26849#endif
26850inline void test(){
26851 #if!defined(_MSC_VER)
26852 ELC_TEST_EVENTNAME("gc部分测试");
26853 rand_seed.set_by_time();
26854 gc.add_gc_method(type_info<gc_tester>);
26855 for(int t=rand<int>()%7;t--;)
26856 {
26857 int i;
26858 root_ptr_t<gc_tester> name=get<gc_tester>();
26859 for(i=rand<int>()%72;i--;){
26860 #pragma warning(suppress: 4189)
26861 auto p=get<gc_tester>();
26862 }
26863 gc();
26864 stest_accert(gc_tester::shrink_time==i+1);
26865 stest_accert(gc_tester::destroy_time==i);
26866 stest_accert(get_size_of_get(&*name)==1);
26867 }
26868 check_memory_lack();
26869 #endif
26870}
26871inline void test_log_out(){
26872
26873}
26874inline void test_end(){
26875
26876}
26877
26878//file_end
26879
26880 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/memory/gc/_body.hpp"
26881#endif
26882
26883//file_end
26884
26885 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
26886 }
26887 using namespace memory;//只是强迫症
26888
26889 #if defined(ELC_TEST_ON)
26890 namespace base_part_test{
26891 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_test.hpp"
26892//_test.hpp
26893//at namespace elc::defs::base_part_test
26894/*
26895未完成的elc解释器base文件
26896由steve02081504与Alex0125设计、编写
26897转载时请在不对此文件做任何修改的同时注明出处
26898项目地址:https://github.com/ELC-lang/ELC
26899*/
26900/*
26901 ,??????????????????????????
26902 ????????????????????????????
26903 ?????????????????????????????+
26904 ?????+++++++++++++++++++++++++
26905 ?????+++++++++++++++++++++++++
26906 ??????++++++++++++++++++++++++
26907 ?????++
26908 ?????+++
26909 ??????+++IIIIIIIIIIIIIIIIII
26910 ?????+++++IIIIIIIIIIIIIIIIII
26911 ?????++++++++++++++++++++++++
26912 ??????+++++++++++++++++++++++:
26913 ?????++
26914 ?????+++
26915 ??????++
26916 ??????????????????????????????II
26917 ??????????????????????????????IIII
26918 ,?????????????????????????????IIIII+
26919 =???++++++++++++++++++++++++++III?
26920 ?++++++++++++++++++++++++++++I+
26921*/
26922inline void test(){
26923 ELC_TEST_EVENTNAME("base部分测试");
26924 memory::test();
26925 container::test();
26926 gc_n::test();
26927}
26928inline void test_log_out(){
26929 memory::test_log_out();
26930 container::test_log_out();
26931}
26932inline void test_end(){
26933 memory::test_end();
26934 container::test_end();
26935}
26936
26937//file_end
26938
26939 #line 62 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
26940 }
26941 #endif
26942
26943 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
26944//_undefs.hpp
26945/*
26946未完成的elc解释器basic文件
26947由steve02081504与Alex0125设计、编写
26948转载时请在不对此文件做任何修改的同时注明出处
26949项目地址:https://github.com/ELC-lang/ELC
26950*/
26951/*
26952 ,??????????????????????????
26953 ????????????????????????????
26954 ?????????????????????????????+
26955 ?????+++++++++++++++++++++++++
26956 ?????+++++++++++++++++++++++++
26957 ??????++++++++++++++++++++++++
26958 ?????++
26959 ?????+++
26960 ??????+++IIIIIIIIIIIIIIIIII
26961 ?????+++++IIIIIIIIIIIIIIIIII
26962 ?????++++++++++++++++++++++++
26963 ??????+++++++++++++++++++++++:
26964 ?????++
26965 ?????+++
26966 ??????++
26967 ??????????????????????????????II
26968 ??????????????????????????????IIII
26969 ,?????????????????????????????IIIII+
26970 =???++++++++++++++++++++++++++III?
26971 ?++++++++++++++++++++++++++++I+
26972*/
26973#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
26974//_undefs.hpp
26975/*
26976未完成的elc解释器_share文件
26977由steve02081504与Alex0125设计、编写
26978转载时请在不对此文件做任何修改的同时注明出处
26979项目地址:https://github.com/ELC-lang/ELC
26980*/
26981/*
26982 ,??????????????????????????
26983 ????????????????????????????
26984 ?????????????????????????????+
26985 ?????+++++++++++++++++++++++++
26986 ?????+++++++++++++++++++++++++
26987 ??????++++++++++++++++++++++++
26988 ?????++
26989 ?????+++
26990 ??????+++IIIIIIIIIIIIIIIIII
26991 ?????+++++IIIIIIIIIIIIIIIIII
26992 ?????++++++++++++++++++++++++
26993 ??????+++++++++++++++++++++++:
26994 ?????++
26995 ?????+++
26996 ??????++
26997 ??????????????????????????????II
26998 ??????????????????????????????IIII
26999 ,?????????????????????????????IIIII+
27000 =???++++++++++++++++++++++++++III?
27001 ?++++++++++++++++++++++++++++I+
27002*/
27003
27004//defs at "_defs.hpp"
27005
27006#if defined(_MSC_VER)
27007 #pragma warning(pop)
27008#endif
27009//#undef suppress_msvc_warning
27010#undef disable_msvc_warning
27011#undef push_msvc_warning
27012#undef pop_msvc_warning
27013#undef push_and_disable_msvc_warning
27014#if defined(_MSC_VER)
27015 #pragma pack(pop)
27016#endif
27017#if defined(__GNUC__)
27018 #pragma GCC diagnostic pop
27019#endif
27020#if defined(_MSC_VER)
27021 #pragma pop_macro("new")
27022 #pragma pop_macro("delete")
27023 #pragma pop_macro("min")
27024 #pragma pop_macro("max")
27025 #pragma pop_macro("abs")
27026 #pragma pop_macro("export")
27027 #pragma pop_macro("rand")
27028 #pragma pop_macro("sqrt")
27029 #pragma pop_macro("type_info")
27030 #pragma pop_macro("elc")
27031#endif
27032
27033//
27034#if defined(ELC_VOID_NAME)
27035 #define void the_void
27036#endif
27037//
27038#if defined(ELC_PUBLIC_ALL)
27039 #undef protected
27040 #undef private
27041#endif
27042//
27043#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
27044 #define rand the_rand
27045#endif
27046
27047// #undef often_noexcept
27048#undef noexcept_as
27049#undef noexcept_as_auto
27050#undef constexpr_as
27051#undef constexpr_as_auto
27052
27053#undef using_method_from_base_t
27054#undef using_method_from_value
27055
27056#undef floop
27057#undef times
27058#undef debug_times
27059#undef enable_adl
27060
27061#undef re_declvalue
27062#undef re_decltype
27063
27064#undef declvalue
27065
27066#undef template_error
27067#undef template_error_of_type
27068#undef template_warning
27069
27070#undef type_info_of
27071#undef type_name_of
27072
27073#undef is_common_attribute
27074#undef is_special_attribute
27075
27076#undef has_attribute
27077#undef not_has_attribute
27078
27079#undef float_size_of
27080#undef bitnum_of
27081
27082#undef def_common_attribute_with_nothing
27083#undef def_special_attribute_with_nothing
27084
27085#undef common_attribute_t
27086#undef special_attribute_t
27087
27088#undef enable_if
27089#undef enabled_by_default
27090#undef disabled_by_default
27091#undef enable_if_not_ill_form
27092#undef enable_flag
27093
27094#undef was_an_ill_form
27095#undef was_an_ill_form_with_parameter
27096#undef was_not_an_ill_form
27097#undef was_not_an_ill_form_and_noexcept
27098#undef was_not_an_ill_form_with_parameter
27099
27100#undef recursive_λ
27101#undef get_recursive_λ_caller
27102#undef λ
27103#undef exλ
27104#undef λ_with_catch
27105#undef self_recursion
27106#undef λ_RLSRRS
27107#undef λ_inline
27108#undef λ_force_inline
27109
27110#undef MAGIC
27111
27112#undef nothing
27113
27114#undef elseif
27115#undef _big_than_
27116#undef _small_than_
27117
27118#if defined(_MSC_VER)
27119 #undef not
27120 #undef and
27121 #undef or
27122#endif
27123
27124#undef INTER_NAMESPACE
27125#undef BREAK_NAMESPACE
27126
27127#undef szie
27128#undef form
27129
27130#undef template_name
27131#undef type_name
27132
27133#undef not_in_debug
27134
27135#undef es
27136#undef ec
27137
27138#undef ELC_TEST_EVENTNAME
27139
27140#undef override_instance_struct
27141
27142#undef distinctive
27143
27144#undef force_inline
27145
27146#undef with_no_vtable
27147
27148#undef in_consteval
27149
27150#undef no_vtable_struct
27151#undef no_vtable_class
27152
27153//#undef get_elc_defs
27154
27155//file_end
27156
27157#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
27158
27159//file_end
27160
27161 #line 66 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
27162}
27163namespace elc{
27164 //导出base承诺于名称空间elc中提供的内容
27165 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_export.hpp"
27166//_export.hpp
27167//at namespace elc
27168/*
27169未完成的elc解释器base文件
27170由steve02081504与Alex0125设计、编写
27171转载时请在不对此文件做任何修改的同时注明出处
27172项目地址:https://github.com/ELC-lang/ELC
27173*/
27174/*
27175 ,??????????????????????????
27176 ????????????????????????????
27177 ?????????????????????????????+
27178 ?????+++++++++++++++++++++++++
27179 ?????+++++++++++++++++++++++++
27180 ??????++++++++++++++++++++++++
27181 ?????++
27182 ?????+++
27183 ??????+++IIIIIIIIIIIIIIIIII
27184 ?????+++++IIIIIIIIIIIIIIIIII
27185 ?????++++++++++++++++++++++++
27186 ??????+++++++++++++++++++++++:
27187 ?????++
27188 ?????+++
27189 ??????++
27190 ??????????????????????????????II
27191 ??????????????????????????????IIII
27192 ,?????????????????????????????IIIII+
27193 =???++++++++++++++++++++++++++III?
27194 ?++++++++++++++++++++++++++++I+
27195*/
27196#define export using defs::base::
27197#undef export
27198
27199//file_end
27200
27201 #line 69 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base/_body.hpp"
27202}
27203
27204//file_end
27205
27206 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
27207#endif
27208
27209//file_end
27210
27211 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
27212 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
27213//base_defs
27214//at namespace ::
27215/*@
27216未完成的elc解释器include文件
27217由steve02081504与Alex0125设计、编写
27218转载时请在不对此文件做任何修改的同时注明出处
27219项目地址:https://github.com/ELC-lang/ELC
27220*/
27221/*
27222 ,??????????????????????????
27223 ????????????????????????????
27224 ?????????????????????????????+
27225 ?????+++++++++++++++++++++++++
27226 ?????+++++++++++++++++++++++++
27227 ??????++++++++++++++++++++++++
27228 ?????++
27229 ?????+++
27230 ??????+++IIIIIIIIIIIIIIIIII
27231 ?????+++++IIIIIIIIIIIIIIIIII
27232 ?????++++++++++++++++++++++++
27233 ??????+++++++++++++++++++++++:
27234 ?????++
27235 ?????+++
27236 ??????++
27237 ??????????????????????????????II
27238 ??????????????????????????????IIII
27239 ,?????????????????????????????IIIII+
27240 =???++++++++++++++++++++++++++III?
27241 ?++++++++++++++++++++++++++++I+
27242*/
27243#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
27244//pre_checks.hpp
27245/*
27246未完成的elc解释器_share文件
27247由steve02081504与Alex0125设计、编写
27248转载时请在不对此文件做任何修改的同时注明出处
27249项目地址:https://github.com/ELC-lang/ELC
27250*/
27251/*
27252 ,??????????????????????????
27253 ????????????????????????????
27254 ?????????????????????????????+
27255 ?????+++++++++++++++++++++++++
27256 ?????+++++++++++++++++++++++++
27257 ??????++++++++++++++++++++++++
27258 ?????++
27259 ?????+++
27260 ??????+++IIIIIIIIIIIIIIIIII
27261 ?????+++++IIIIIIIIIIIIIIIIII
27262 ?????++++++++++++++++++++++++
27263 ??????+++++++++++++++++++++++:
27264 ?????++
27265 ?????+++
27266 ??????++
27267 ??????????????????????????????II
27268 ??????????????????????????????IIII
27269 ,?????????????????????????????IIIII+
27270 =???++++++++++++++++++++++++++III?
27271 ?++++++++++++++++++++++++++++I+
27272*/
27273//__cplusplus needs 20+
27274#if !defined(__cplusplus)||__cplusplus<202002L
27275 //if msvc, check _MSVC_LANG
27276 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
27277 //ok
27278 #else
27279 #error "elc files needs c++20 or higher"
27280 #endif
27281#endif
27282
27283//check if the compiler is msvc
27284#if defined(_MSC_VER)
27285 //check if _CPPRTTI
27286 #if !defined(_CPPRTTI)
27287 #error "elc files needs rtti"
27288 #endif
27289 //check _MSC_VER at last 1932
27290 #if _MSC_VER<1932
27291 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
27292 #endif
27293#endif
27294
27295//file_end
27296
27297#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
27298#line 57 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
27299
27300//file_end
27301
27302 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
27303 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
27304//base_exception
27305//at namespace ::
27306/*@
27307未完成的elc解释器include文件
27308由steve02081504与Alex0125设计、编写
27309转载时请在不对此文件做任何修改的同时注明出处
27310项目地址:https://github.com/ELC-lang/ELC
27311*/
27312/*
27313 ,??????????????????????????
27314 ????????????????????????????
27315 ?????????????????????????????+
27316 ?????+++++++++++++++++++++++++
27317 ?????+++++++++++++++++++++++++
27318 ??????++++++++++++++++++++++++
27319 ?????++
27320 ?????+++
27321 ??????+++IIIIIIIIIIIIIIIIII
27322 ?????+++++IIIIIIIIIIIIIIIIII
27323 ?????++++++++++++++++++++++++
27324 ??????+++++++++++++++++++++++:
27325 ?????++
27326 ?????+++
27327 ??????++
27328 ??????????????????????????????II
27329 ??????????????????????????????IIII
27330 ,?????????????????????????????IIIII+
27331 =???++++++++++++++++++++++++++III?
27332 ?++++++++++++++++++++++++++++I+
27333*/
27334#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
27335//pre_checks.hpp
27336/*
27337未完成的elc解释器_share文件
27338由steve02081504与Alex0125设计、编写
27339转载时请在不对此文件做任何修改的同时注明出处
27340项目地址:https://github.com/ELC-lang/ELC
27341*/
27342/*
27343 ,??????????????????????????
27344 ????????????????????????????
27345 ?????????????????????????????+
27346 ?????+++++++++++++++++++++++++
27347 ?????+++++++++++++++++++++++++
27348 ??????++++++++++++++++++++++++
27349 ?????++
27350 ?????+++
27351 ??????+++IIIIIIIIIIIIIIIIII
27352 ?????+++++IIIIIIIIIIIIIIIIII
27353 ?????++++++++++++++++++++++++
27354 ??????+++++++++++++++++++++++:
27355 ?????++
27356 ?????+++
27357 ??????++
27358 ??????????????????????????????II
27359 ??????????????????????????????IIII
27360 ,?????????????????????????????IIIII+
27361 =???++++++++++++++++++++++++++III?
27362 ?++++++++++++++++++++++++++++I+
27363*/
27364//__cplusplus needs 20+
27365#if !defined(__cplusplus)||__cplusplus<202002L
27366 //if msvc, check _MSVC_LANG
27367 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
27368 //ok
27369 #else
27370 #error "elc files needs c++20 or higher"
27371 #endif
27372#endif
27373
27374//check if the compiler is msvc
27375#if defined(_MSC_VER)
27376 //check if _CPPRTTI
27377 #if !defined(_CPPRTTI)
27378 #error "elc files needs rtti"
27379 #endif
27380 //check _MSC_VER at last 1932
27381 #if _MSC_VER<1932
27382 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
27383 #endif
27384#endif
27385
27386//file_end
27387
27388#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
27389#if !defined(ELC_BASE_EXCEPTION)
27390 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
27391//using.hpp
27392/*
27393未完成的elc解释器_share文件
27394由steve02081504与Alex0125设计、编写
27395转载时请在不对此文件做任何修改的同时注明出处
27396项目地址:https://github.com/ELC-lang/ELC
27397*/
27398/*
27399 ,??????????????????????????
27400 ????????????????????????????
27401 ?????????????????????????????+
27402 ?????+++++++++++++++++++++++++
27403 ?????+++++++++++++++++++++++++
27404 ??????++++++++++++++++++++++++
27405 ?????++
27406 ?????+++
27407 ??????+++IIIIIIIIIIIIIIIIII
27408 ?????+++++IIIIIIIIIIIIIIIIII
27409 ?????++++++++++++++++++++++++
27410 ??????+++++++++++++++++++++++:
27411 ?????++
27412 ?????+++
27413 ??????++
27414 ??????????????????????????????II
27415 ??????????????????????????????IIII
27416 ,?????????????????????????????IIIII+
27417 =???++++++++++++++++++++++++++III?
27418 ?++++++++++++++++++++++++++++I+
27419*/
27420/*
27421locale说明
27422elc使用的字符串.
27423调整这些,实现快速本地化.
27424*/
27425#line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
27426
27427//file_end
27428
27429 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
27430 #define ELC_BASE_EXCEPTION
27431 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
27432//_body.hpp
27433//at namespace ::
27434/*
27435未完成的elc解释器base_exception文件
27436由steve02081504与Alex0125设计、编写
27437转载时请在不对此文件做任何修改的同时注明出处
27438项目地址:https://github.com/ELC-lang/ELC
27439*/
27440/*
27441 ,??????????????????????????
27442 ????????????????????????????
27443 ?????????????????????????????+
27444 ?????+++++++++++++++++++++++++
27445 ?????+++++++++++++++++++++++++
27446 ??????++++++++++++++++++++++++
27447 ?????++
27448 ?????+++
27449 ??????+++IIIIIIIIIIIIIIIIII
27450 ?????+++++IIIIIIIIIIIIIIIIII
27451 ?????++++++++++++++++++++++++
27452 ??????+++++++++++++++++++++++:
27453 ?????++
27454 ?????+++
27455 ??????++
27456 ??????????????????????????????II
27457 ??????????????????????????????IIII
27458 ,?????????????????????????????IIIII+
27459 =???++++++++++++++++++++++++++III?
27460 ?++++++++++++++++++++++++++++I+
27461*/
27462#if defined(ELC_TEST)
27463 #error "this part cannot be tested."
27464#endif
27465//char_t
27466#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/default_data_type.hpp"
27467//default_data_type.hpp
27468/*
27469未完成的elc解释器_share文件
27470由steve02081504与Alex0125设计、编写
27471转载时请在不对此文件做任何修改的同时注明出处
27472项目地址:https://github.com/ELC-lang/ELC
27473*/
27474/*
27475 ,??????????????????????????
27476 ????????????????????????????
27477 ?????????????????????????????+
27478 ?????+++++++++++++++++++++++++
27479 ?????+++++++++++++++++++++++++
27480 ??????++++++++++++++++++++++++
27481 ?????++
27482 ?????+++
27483 ??????+++IIIIIIIIIIIIIIIIII
27484 ?????+++++IIIIIIIIIIIIIIIIII
27485 ?????++++++++++++++++++++++++
27486 ??????+++++++++++++++++++++++:
27487 ?????++
27488 ?????+++
27489 ??????++
27490 ??????????????????????????????II
27491 ??????????????????????????????IIII
27492 ,?????????????????????????????IIIII+
27493 =???++++++++++++++++++++++++++III?
27494 ?++++++++++++++++++++++++++++I+
27495*/
27496namespace elc{
27497 /*ELC内部string统一采用char_t宽字符,使用setlocale(LC_ALL,"en_US.utf8")下的UTF编码。*/
27498 typedef char32_t char_t;
27499 /*c_string表示*/
27500 typedef char_t* string_ptr_t;
27501 /*c_string表示*/
27502 typedef const char_t* const_string_ptr_t;
27503 /*ELC内部钦定int_t类型*/
27504 typedef int64_t int_t;
27505 /*ELC内部钦定uint_t类型*/
27506 typedef uint64_t uint_t;
27507 /*ELC内部钦定float_t类型*/
27508 typedef double float_t;
27509 /*ELC内部钦定float_size_t类型,用以描述内存大小的浮点状况*/
27510 typedef long double float_size_t;
27511}
27512
27513//file_end
27514
27515#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
27516namespace elc::defs{
27517 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
27518//_defs.hpp
27519/*
27520未完成的elc解释器basic文件
27521由steve02081504与Alex0125设计、编写
27522转载时请在不对此文件做任何修改的同时注明出处
27523项目地址:https://github.com/ELC-lang/ELC
27524*/
27525/*
27526 ,??????????????????????????
27527 ????????????????????????????
27528 ?????????????????????????????+
27529 ?????+++++++++++++++++++++++++
27530 ?????+++++++++++++++++++++++++
27531 ??????++++++++++++++++++++++++
27532 ?????++
27533 ?????+++
27534 ??????+++IIIIIIIIIIIIIIIIII
27535 ?????+++++IIIIIIIIIIIIIIIIII
27536 ?????++++++++++++++++++++++++
27537 ??????+++++++++++++++++++++++:
27538 ?????++
27539 ?????+++
27540 ??????++
27541 ??????????????????????????????II
27542 ??????????????????????????????IIII
27543 ,?????????????????????????????IIIII+
27544 =???++++++++++++++++++++++++++III?
27545 ?++++++++++++++++++++++++++++I+
27546*/
27547#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
27548//_defs.hpp
27549/*
27550未完成的elc解释器_share文件
27551由steve02081504与Alex0125设计、编写
27552转载时请在不对此文件做任何修改的同时注明出处
27553项目地址:https://github.com/ELC-lang/ELC
27554*/
27555/*
27556 ,??????????????????????????
27557 ????????????????????????????
27558 ?????????????????????????????+
27559 ?????+++++++++++++++++++++++++
27560 ?????+++++++++++++++++++++++++
27561 ??????++++++++++++++++++++++++
27562 ?????++
27563 ?????+++
27564 ??????+++IIIIIIIIIIIIIIIIII
27565 ?????+++++IIIIIIIIIIIIIIIIII
27566 ?????++++++++++++++++++++++++
27567 ??????+++++++++++++++++++++++:
27568 ?????++
27569 ?????+++
27570 ??????++
27571 ??????????????????????????????II
27572 ??????????????????????????????IIII
27573 ,?????????????????????????????IIIII+
27574 =???++++++++++++++++++++++++++III?
27575 ?++++++++++++++++++++++++++++I+
27576*/
27577
27578//undefs at "_undefs.hpp"
27579
27580#if defined(ELC_CODE_REALM)
27581 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
27582#endif
27583
27584//set ELC_WARNING_LEVEL default to 4(max)
27585#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
27586
27587#if defined(_MSC_VER)
27588 #pragma warning(push,ELC_WARNING_LEVEL)
27589 #pragma warning(disable:4099)//class与struct混用警告diss
27590 #pragma warning(disable:4584)//重复子类警告diss
27591 #pragma warning(disable:4250)//域控制继承警告diss
27592 #pragma warning(disable:26432)//不完全默认方法警告diss
27593 #pragma warning(disable:26435)//virtual override方法警告diss
27594 #pragma warning(disable:26481)//容器安利diss
27595 #pragma warning(disable:26446)//gsl::at安利diss
27596 #pragma warning(disable:26434)//方法覆盖警告diss
27597 #pragma warning(disable:26429)//gsl::not_null安利diss
27598 #pragma warning(disable:26471)//对void*进行static_cast安利diss
27599 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
27600 #pragma warning(disable:26473)//相同指针显式cast警告diss
27601 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
27602 #pragma warning(disable:26485)//数组作指针警告diss
27603 #pragma warning(disable:26490)//reinterpret_cast警告diss
27604 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
27605 #pragma warning(disable:26482)//非常数数组索引警告diss
27606 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
27607#endif
27608#if defined(__GNUC__)
27609 #pragma GCC diagnostic push
27610 #pragma GCC diagnostic warning "-Wall"//开启所有警告
27611 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
27612#endif
27613#if defined(_MSC_VER)
27614 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
27615 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
27616 #define push_msvc_warning() __pragma(warning(push))
27617 #define pop_msvc_warning() __pragma(warning(pop))
27618 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
27619#else
27620 //#define suppress_msvc_warning(...)
27621 #define disable_msvc_warning(...)
27622 #define push_msvc_warning()
27623 #define pop_msvc_warning()
27624 #define push_and_disable_msvc_warning(...)
27625#endif
27626#if defined(_MSC_VER)
27627 //push pack settings
27628 #pragma pack(push)
27629 #pragma pack()
27630#endif
27631#if defined(_MSC_VER)
27632 //push and undef common macros
27633 #pragma push_macro("new")
27634 #undef new
27635 #pragma push_macro("delete")
27636 #undef delete
27637 #pragma push_macro("min")
27638 #undef min
27639 #pragma push_macro("max")
27640 #undef max
27641 #pragma push_macro("abs")
27642 #undef abs
27643 #pragma push_macro("export")
27644 #undef export
27645 #pragma push_macro("rand")
27646 #undef rand
27647 #pragma push_macro("sqrt")
27648 #undef sqrt
27649 #pragma push_macro("type_info")
27650 #undef type_info
27651 #pragma push_macro("elc")
27652 #undef elc
27653#endif
27654//
27655#if defined(ELC_VOID_NAME)
27656 #undef void
27657#endif
27658//
27659#if defined(ELC_PUBLIC_ALL)
27660 #define protected public
27661 #define private public
27662#endif
27663//
27664#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
27665 #undef rand
27666#endif
27667
27668// #define often_noexcept
27669#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
27670#define noexcept_as_auto MAGIC//哦现在有了
27671#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
27672#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
27673
27674#define using_method_from_base_t(name,...) \
27675template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
27676auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
27677{\
27678 return base_t::name(forward<Args>(rest)...);\
27679}\
27680
27681#define using_method_from_value(name,value_name,...) \
27682template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
27683auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
27684{\
27685 return value_name.name(forward<Args>(rest)...);\
27686}\
27687
27688#define floop while(__builtin_is_my_dick_still_there())
27689#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
27690#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
27691#if defined(_MSC_VER) && _MSC_VER>=1935
27692 //@see https://developercommunity.visualstudio.com/t/10193638
27693 #define enable_adl(name) template<typename=void>void name()noexcept=delete
27694#else
27695 #define enable_adl(name) void name()noexcept=delete
27696#endif
27697
27698#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
27699#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
27700
27701#define declvalue(...) (::std::declval<__VA_ARGS__>())
27702
27704#define template_error(reason) static_assert(template_error_helper<T>,reason)
27706#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
27708#define template_warning(reason) template_warning_helper<T>(reason)
27709
27710//for type_info
27711#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
27712#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
27713
27714#define is_common_attribute(name) public attribute<T,name<T>>
27715#define is_special_attribute(name) public attribute<T,name>
27716
27717#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
27718#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
27719
27720//for float_size_t
27721#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
27722//bitnum_of
27723#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
27724
27725//for attribute
27726#define def_common_attribute_with_nothing(name) \
27727template<typename T>\
27728class name{}\
27729
27730#define def_special_attribute_with_nothing(name) \
27731class name{}\
27732
27733#define common_attribute_t template<class>class
27734#define special_attribute_t class
27735
27744#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
27746#define enabled_by_default class enable_state=void
27748#define disabled_by_default class enable_state= ::std::enable_if_t<false>
27750#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
27752#define enable_flag class enable_state
27753
27754#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
27755#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
27756#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
27757#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
27758#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
27759
27761#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
27763#define get_recursive_λ_caller(name,...) \
27764exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
27765 return name(name,Args...);\
27766}
27768#define λ []
27770#define exλ [&]
27772#define λ_with_catch(...) [__VA_ARGS__]
27774#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
27775//recursive_λ_self_referential_reserved_symbolname
27776#define λ_RLSRRS _my_jb_super_sb_name_
27777
27778#if defined(_MSC_VER) && !defined(__clang__)
27779 #define λ_inline [[msvc::forceinline]]
27780 #define λ_force_inline [[msvc::forceinline]]
27781#elif
27782 #define λ_inline [[gnu::always_inline]]
27783 #define λ_force_inline [[gnu::always_inline]]
27784#else
27785 #define λ_inline
27786 #define λ_force_inline
27787#endif
27788
27789#define MAGIC//ahh,ko no tenno da!
27790
27792#define nothing
27793
27795#define elseif else if
27797#define _big_than_ >
27799#define _small_than_ <
27800
27801#if defined(_MSC_VER)
27802 #define not !
27803 #define and &&
27804 #define or ||
27805#endif
27806
27808#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
27810#define BREAK_NAMESPACE }
27811
27813#define template_name template
27815#define type_name class
27816
27817#if defined(DEBUG) || defined(_DEBUG)
27818 #define not_in_debug 0
27819 #define in_debug 1
27820#else
27821 #define not_in_debug 1
27822 #define in_debug 0
27823#endif
27824
27825#define es U""
27826#define ec(ch) U ## ch
27827
27828#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
27829 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
27830#else
27831 #define ELC_TEST_EVENTNAME(name)
27832#endif
27833
27834#define override_instance_struct \
27835protected:\
27836 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
27837 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
27838 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
27839 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
27840 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
27841
27842#if defined(_MSC_VER) && !defined(__clang__)
27843 #define distinctive __declspec(dllexport)
27844#else
27845 #define distinctive
27846#endif
27847
27848#if defined(_MSC_VER) && !defined(__clang__)
27849 #define force_inline __forceinline
27850#elif defined(__GNUC__) || defined(__clang__)
27851 #define force_inline __attribute__((always_inline)) inline
27852#else
27853 #define force_inline inline
27854#endif
27855
27856#if defined(_MSC_VER) && !defined(__clang__)
27857 #define with_no_vtable __declspec(novtable)
27858#else
27859 #define with_no_vtable
27860#endif
27861
27862#define in_consteval (::std::is_constant_evaluated())
27863
27864#define no_vtable_struct struct with_no_vtable
27865#define no_vtable_class class with_no_vtable
27866
27867//#define get_elc_defs using namespace ::elc::defs
27868
27869//file_end
27870
27871#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
27872
27873//file_end
27874
27875 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
27876
27877 namespace exception_n{
27878 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/exception/_body.hpp"
27879//_body.hpp
27880//at namespace elc::defs::exception_n
27881/*
27882未完成的elc解释器base_exception文件
27883由steve02081504与Alex0125设计、编写
27884转载时请在不对此文件做任何修改的同时注明出处
27885项目地址:https://github.com/ELC-lang/ELC
27886*/
27887/*
27888 ,??????????????????????????
27889 ????????????????????????????
27890 ?????????????????????????????+
27891 ?????+++++++++++++++++++++++++
27892 ?????+++++++++++++++++++++++++
27893 ??????++++++++++++++++++++++++
27894 ?????++
27895 ?????+++
27896 ??????+++IIIIIIIIIIIIIIIIII
27897 ?????+++++IIIIIIIIIIIIIIIIII
27898 ?????++++++++++++++++++++++++
27899 ??????+++++++++++++++++++++++:
27900 ?????++
27901 ?????+++
27902 ??????++
27903 ??????????????????????????????II
27904 ??????????????????????????????IIII
27905 ,?????????????????????????????IIIII+
27906 =???++++++++++++++++++++++++++III?
27907 ?++++++++++++++++++++++++++++I+
27908*/
27909#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/exception/exception.hpp"
27910//_body.hpp
27911//at namespace elc::defs::exception_n
27912/*
27913未完成的elc解释器base_exception文件
27914由steve02081504与Alex0125设计、编写
27915转载时请在不对此文件做任何修改的同时注明出处
27916项目地址:https://github.com/ELC-lang/ELC
27917*/
27918/*
27919 ,??????????????????????????
27920 ????????????????????????????
27921 ?????????????????????????????+
27922 ?????+++++++++++++++++++++++++
27923 ?????+++++++++++++++++++++++++
27924 ??????++++++++++++++++++++++++
27925 ?????++
27926 ?????+++
27927 ??????+++IIIIIIIIIIIIIIIIII
27928 ?????+++++IIIIIIIIIIIIIIIIII
27929 ?????++++++++++++++++++++++++
27930 ??????+++++++++++++++++++++++:
27931 ?????++
27932 ?????+++
27933 ??????++
27934 ??????????????????????????????II
27935 ??????????????????????????????IIII
27936 ,?????????????????????????????IIIII+
27937 =???++++++++++++++++++++++++++III?
27938 ?++++++++++++++++++++++++++++I+
27939*/
27941 const_string_ptr_t _constexpr_str=locale::str::exception::unknow_error;
27942public:
27943 constexpr exception()noexcept=default;
27944 constexpr exception(const constexpr_str&str)noexcept:_constexpr_str(str){}
27945 virtual constexpr ~exception()noexcept=0;
27946 virtual constexpr const_string_ptr_t what()noexcept{return _constexpr_str;}
27947};
27948inline constexpr exception::~exception()noexcept{}
27949
27951 using exception::exception;
27952};
27953
27954//file_end
27955
27956#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/exception/_body.hpp"
27957
27958//file_end
27959
27960 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
27961 }
27962 namespace exceptions=exception_n;
27963
27964 #if defined(ELC_TEST_ON)
27965 namespace base_exception_part_test{
27966 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_test.hpp"
27967//_test.hpp
27968/*
27969未完成的elc解释器base_exception文件
27970由steve02081504与Alex0125设计、编写
27971转载时请在不对此文件做任何修改的同时注明出处
27972项目地址:https://github.com/ELC-lang/ELC
27973*/
27974/*
27975 ,??????????????????????????
27976 ????????????????????????????
27977 ?????????????????????????????+
27978 ?????+++++++++++++++++++++++++
27979 ?????+++++++++++++++++++++++++
27980 ??????++++++++++++++++++++++++
27981 ?????++
27982 ?????+++
27983 ??????+++IIIIIIIIIIIIIIIIII
27984 ?????+++++IIIIIIIIIIIIIIIIII
27985 ?????++++++++++++++++++++++++
27986 ??????+++++++++++++++++++++++:
27987 ?????++
27988 ?????+++
27989 ??????++
27990 ??????????????????????????????II
27991 ??????????????????????????????IIII
27992 ,?????????????????????????????IIIII+
27993 =???++++++++++++++++++++++++++III?
27994 ?++++++++++++++++++++++++++++I+
27995*/
27996inline void test(){
27997 ELC_TEST_EVENTNAME("base_exception部分测试");
27998}
27999inline void test_log_out(){
28000}
28001inline void test_end(){
28002}
28003
28004//file_end
28005
28006 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
28007 }
28008 #endif
28009
28010 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
28011//_undefs.hpp
28012/*
28013未完成的elc解释器basic文件
28014由steve02081504与Alex0125设计、编写
28015转载时请在不对此文件做任何修改的同时注明出处
28016项目地址:https://github.com/ELC-lang/ELC
28017*/
28018/*
28019 ,??????????????????????????
28020 ????????????????????????????
28021 ?????????????????????????????+
28022 ?????+++++++++++++++++++++++++
28023 ?????+++++++++++++++++++++++++
28024 ??????++++++++++++++++++++++++
28025 ?????++
28026 ?????+++
28027 ??????+++IIIIIIIIIIIIIIIIII
28028 ?????+++++IIIIIIIIIIIIIIIIII
28029 ?????++++++++++++++++++++++++
28030 ??????+++++++++++++++++++++++:
28031 ?????++
28032 ?????+++
28033 ??????++
28034 ??????????????????????????????II
28035 ??????????????????????????????IIII
28036 ,?????????????????????????????IIIII+
28037 =???++++++++++++++++++++++++++III?
28038 ?++++++++++++++++++++++++++++I+
28039*/
28040#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
28041//_undefs.hpp
28042/*
28043未完成的elc解释器_share文件
28044由steve02081504与Alex0125设计、编写
28045转载时请在不对此文件做任何修改的同时注明出处
28046项目地址:https://github.com/ELC-lang/ELC
28047*/
28048/*
28049 ,??????????????????????????
28050 ????????????????????????????
28051 ?????????????????????????????+
28052 ?????+++++++++++++++++++++++++
28053 ?????+++++++++++++++++++++++++
28054 ??????++++++++++++++++++++++++
28055 ?????++
28056 ?????+++
28057 ??????+++IIIIIIIIIIIIIIIIII
28058 ?????+++++IIIIIIIIIIIIIIIIII
28059 ?????++++++++++++++++++++++++
28060 ??????+++++++++++++++++++++++:
28061 ?????++
28062 ?????+++
28063 ??????++
28064 ??????????????????????????????II
28065 ??????????????????????????????IIII
28066 ,?????????????????????????????IIIII+
28067 =???++++++++++++++++++++++++++III?
28068 ?++++++++++++++++++++++++++++I+
28069*/
28070
28071//defs at "_defs.hpp"
28072
28073#if defined(_MSC_VER)
28074 #pragma warning(pop)
28075#endif
28076//#undef suppress_msvc_warning
28077#undef disable_msvc_warning
28078#undef push_msvc_warning
28079#undef pop_msvc_warning
28080#undef push_and_disable_msvc_warning
28081#if defined(_MSC_VER)
28082 #pragma pack(pop)
28083#endif
28084#if defined(__GNUC__)
28085 #pragma GCC diagnostic pop
28086#endif
28087#if defined(_MSC_VER)
28088 #pragma pop_macro("new")
28089 #pragma pop_macro("delete")
28090 #pragma pop_macro("min")
28091 #pragma pop_macro("max")
28092 #pragma pop_macro("abs")
28093 #pragma pop_macro("export")
28094 #pragma pop_macro("rand")
28095 #pragma pop_macro("sqrt")
28096 #pragma pop_macro("type_info")
28097 #pragma pop_macro("elc")
28098#endif
28099
28100//
28101#if defined(ELC_VOID_NAME)
28102 #define void the_void
28103#endif
28104//
28105#if defined(ELC_PUBLIC_ALL)
28106 #undef protected
28107 #undef private
28108#endif
28109//
28110#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
28111 #define rand the_rand
28112#endif
28113
28114// #undef often_noexcept
28115#undef noexcept_as
28116#undef noexcept_as_auto
28117#undef constexpr_as
28118#undef constexpr_as_auto
28119
28120#undef using_method_from_base_t
28121#undef using_method_from_value
28122
28123#undef floop
28124#undef times
28125#undef debug_times
28126#undef enable_adl
28127
28128#undef re_declvalue
28129#undef re_decltype
28130
28131#undef declvalue
28132
28133#undef template_error
28134#undef template_error_of_type
28135#undef template_warning
28136
28137#undef type_info_of
28138#undef type_name_of
28139
28140#undef is_common_attribute
28141#undef is_special_attribute
28142
28143#undef has_attribute
28144#undef not_has_attribute
28145
28146#undef float_size_of
28147#undef bitnum_of
28148
28149#undef def_common_attribute_with_nothing
28150#undef def_special_attribute_with_nothing
28151
28152#undef common_attribute_t
28153#undef special_attribute_t
28154
28155#undef enable_if
28156#undef enabled_by_default
28157#undef disabled_by_default
28158#undef enable_if_not_ill_form
28159#undef enable_flag
28160
28161#undef was_an_ill_form
28162#undef was_an_ill_form_with_parameter
28163#undef was_not_an_ill_form
28164#undef was_not_an_ill_form_and_noexcept
28165#undef was_not_an_ill_form_with_parameter
28166
28167#undef recursive_λ
28168#undef get_recursive_λ_caller
28169#undef λ
28170#undef exλ
28171#undef λ_with_catch
28172#undef self_recursion
28173#undef λ_RLSRRS
28174#undef λ_inline
28175#undef λ_force_inline
28176
28177#undef MAGIC
28178
28179#undef nothing
28180
28181#undef elseif
28182#undef _big_than_
28183#undef _small_than_
28184
28185#if defined(_MSC_VER)
28186 #undef not
28187 #undef and
28188 #undef or
28189#endif
28190
28191#undef INTER_NAMESPACE
28192#undef BREAK_NAMESPACE
28193
28194#undef szie
28195#undef form
28196
28197#undef template_name
28198#undef type_name
28199
28200#undef not_in_debug
28201
28202#undef es
28203#undef ec
28204
28205#undef ELC_TEST_EVENTNAME
28206
28207#undef override_instance_struct
28208
28209#undef distinctive
28210
28211#undef force_inline
28212
28213#undef with_no_vtable
28214
28215#undef in_consteval
28216
28217#undef no_vtable_struct
28218#undef no_vtable_class
28219
28220//#undef get_elc_defs
28221
28222//file_end
28223
28224#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
28225
28226//file_end
28227
28228 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
28229}
28230namespace elc{
28231 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_export.hpp"
28232//_export.hpp
28233//at namespace elc
28234/*
28235未完成的elc解释器base_exception文件
28236由steve02081504与Alex0125设计、编写
28237转载时请在不对此文件做任何修改的同时注明出处
28238项目地址:https://github.com/ELC-lang/ELC
28239*/
28240/*
28241 ,??????????????????????????
28242 ????????????????????????????
28243 ?????????????????????????????+
28244 ?????+++++++++++++++++++++++++
28245 ?????+++++++++++++++++++++++++
28246 ??????++++++++++++++++++++++++
28247 ?????++
28248 ?????+++
28249 ??????+++IIIIIIIIIIIIIIIIII
28250 ?????+++++IIIIIIIIIIIIIIIIII
28251 ?????++++++++++++++++++++++++
28252 ??????+++++++++++++++++++++++:
28253 ?????++
28254 ?????+++
28255 ??????++
28256 ??????????????????????????????II
28257 ??????????????????????????????IIII
28258 ,?????????????????????????????IIIII+
28259 =???++++++++++++++++++++++++++III?
28260 ?++++++++++++++++++++++++++++I+
28261*/
28262#define export using defs::exception_n::
28263export exception;
28264export runtime_exception;
28265#undef export
28266
28267//file_end
28268
28269 #line 52 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_exception/_body.hpp"
28270}
28271
28272//file_end
28273
28274 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
28275#endif
28276
28277//file_end
28278
28279 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
28280 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
28281//base_stream
28282//at namespace ::
28283/*@
28284未完成的elc解释器include文件
28285由steve02081504与Alex0125设计、编写
28286转载时请在不对此文件做任何修改的同时注明出处
28287项目地址:https://github.com/ELC-lang/ELC
28288*/
28289/*
28290 ,??????????????????????????
28291 ????????????????????????????
28292 ?????????????????????????????+
28293 ?????+++++++++++++++++++++++++
28294 ?????+++++++++++++++++++++++++
28295 ??????++++++++++++++++++++++++
28296 ?????++
28297 ?????+++
28298 ??????+++IIIIIIIIIIIIIIIIII
28299 ?????+++++IIIIIIIIIIIIIIIIII
28300 ?????++++++++++++++++++++++++
28301 ??????+++++++++++++++++++++++:
28302 ?????++
28303 ?????+++
28304 ??????++
28305 ??????????????????????????????II
28306 ??????????????????????????????IIII
28307 ,?????????????????????????????IIIII+
28308 =???++++++++++++++++++++++++++III?
28309 ?++++++++++++++++++++++++++++I+
28310*/
28311#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
28312//pre_checks.hpp
28313/*
28314未完成的elc解释器_share文件
28315由steve02081504与Alex0125设计、编写
28316转载时请在不对此文件做任何修改的同时注明出处
28317项目地址:https://github.com/ELC-lang/ELC
28318*/
28319/*
28320 ,??????????????????????????
28321 ????????????????????????????
28322 ?????????????????????????????+
28323 ?????+++++++++++++++++++++++++
28324 ?????+++++++++++++++++++++++++
28325 ??????++++++++++++++++++++++++
28326 ?????++
28327 ?????+++
28328 ??????+++IIIIIIIIIIIIIIIIII
28329 ?????+++++IIIIIIIIIIIIIIIIII
28330 ?????++++++++++++++++++++++++
28331 ??????+++++++++++++++++++++++:
28332 ?????++
28333 ?????+++
28334 ??????++
28335 ??????????????????????????????II
28336 ??????????????????????????????IIII
28337 ,?????????????????????????????IIIII+
28338 =???++++++++++++++++++++++++++III?
28339 ?++++++++++++++++++++++++++++I+
28340*/
28341//__cplusplus needs 20+
28342#if !defined(__cplusplus)||__cplusplus<202002L
28343 //if msvc, check _MSVC_LANG
28344 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
28345 //ok
28346 #else
28347 #error "elc files needs c++20 or higher"
28348 #endif
28349#endif
28350
28351//check if the compiler is msvc
28352#if defined(_MSC_VER)
28353 //check if _CPPRTTI
28354 #if !defined(_CPPRTTI)
28355 #error "elc files needs rtti"
28356 #endif
28357 //check _MSC_VER at last 1932
28358 #if _MSC_VER<1932
28359 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
28360 #endif
28361#endif
28362
28363//file_end
28364
28365#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
28366#if !defined(ELC_BASE_STREAM)
28367 //abstract_base
28368 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
28369//base
28370//at namespace ::
28371/*@
28372未完成的elc解释器include文件
28373由steve02081504与Alex0125设计、编写
28374转载时请在不对此文件做任何修改的同时注明出处
28375项目地址:https://github.com/ELC-lang/ELC
28376*/
28377/*
28378 ,??????????????????????????
28379 ????????????????????????????
28380 ?????????????????????????????+
28381 ?????+++++++++++++++++++++++++
28382 ?????+++++++++++++++++++++++++
28383 ??????++++++++++++++++++++++++
28384 ?????++
28385 ?????+++
28386 ??????+++IIIIIIIIIIIIIIIIII
28387 ?????+++++IIIIIIIIIIIIIIIIII
28388 ?????++++++++++++++++++++++++
28389 ??????+++++++++++++++++++++++:
28390 ?????++
28391 ?????+++
28392 ??????++
28393 ??????????????????????????????II
28394 ??????????????????????????????IIII
28395 ,?????????????????????????????IIIII+
28396 =???++++++++++++++++++++++++++III?
28397 ?++++++++++++++++++++++++++++I+
28398*/
28399#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
28400//pre_checks.hpp
28401/*
28402未完成的elc解释器_share文件
28403由steve02081504与Alex0125设计、编写
28404转载时请在不对此文件做任何修改的同时注明出处
28405项目地址:https://github.com/ELC-lang/ELC
28406*/
28407/*
28408 ,??????????????????????????
28409 ????????????????????????????
28410 ?????????????????????????????+
28411 ?????+++++++++++++++++++++++++
28412 ?????+++++++++++++++++++++++++
28413 ??????++++++++++++++++++++++++
28414 ?????++
28415 ?????+++
28416 ??????+++IIIIIIIIIIIIIIIIII
28417 ?????+++++IIIIIIIIIIIIIIIIII
28418 ?????++++++++++++++++++++++++
28419 ??????+++++++++++++++++++++++:
28420 ?????++
28421 ?????+++
28422 ??????++
28423 ??????????????????????????????II
28424 ??????????????????????????????IIII
28425 ,?????????????????????????????IIIII+
28426 =???++++++++++++++++++++++++++III?
28427 ?++++++++++++++++++++++++++++I+
28428*/
28429//__cplusplus needs 20+
28430#if !defined(__cplusplus)||__cplusplus<202002L
28431 //if msvc, check _MSVC_LANG
28432 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
28433 //ok
28434 #else
28435 #error "elc files needs c++20 or higher"
28436 #endif
28437#endif
28438
28439//check if the compiler is msvc
28440#if defined(_MSC_VER)
28441 //check if _CPPRTTI
28442 #if !defined(_CPPRTTI)
28443 #error "elc files needs rtti"
28444 #endif
28445 //check _MSC_VER at last 1932
28446 #if _MSC_VER<1932
28447 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
28448 #endif
28449#endif
28450
28451//file_end
28452
28453#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
28454#line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
28455
28456//file_end
28457
28458 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
28459 #include <istream>//std::istream for wrap
28460 #include <ostream>//std::ostream for wrap
28461 //do not include <iostream> as it will import some gobal objects like std::cin and std::cout that we may not want to use
28462 #define ELC_BASE_STREAM
28463 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
28464//_body.hpp
28465//at namespace ::
28466/*
28467未完成的elc解释器base_stream文件
28468由steve02081504与Alex0125设计、编写
28469转载时请在不对此文件做任何修改的同时注明出处
28470项目地址:https://github.com/ELC-lang/ELC
28471*/
28472/*
28473 ,??????????????????????????
28474 ????????????????????????????
28475 ?????????????????????????????+
28476 ?????+++++++++++++++++++++++++
28477 ?????+++++++++++++++++++++++++
28478 ??????++++++++++++++++++++++++
28479 ?????++
28480 ?????+++
28481 ??????+++IIIIIIIIIIIIIIIIII
28482 ?????+++++IIIIIIIIIIIIIIIIII
28483 ?????++++++++++++++++++++++++
28484 ??????+++++++++++++++++++++++:
28485 ?????++
28486 ?????+++
28487 ??????++
28488 ??????????????????????????????II
28489 ??????????????????????????????IIII
28490 ,?????????????????????????????IIIII+
28491 =???++++++++++++++++++++++++++III?
28492 ?++++++++++++++++++++++++++++I+
28493*/
28494#if defined(ELC_TEST)
28495 #error "this part cannot be tested."
28496#endif
28497namespace elc::defs{
28498 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
28499//_defs.hpp
28500/*
28501未完成的elc解释器basic文件
28502由steve02081504与Alex0125设计、编写
28503转载时请在不对此文件做任何修改的同时注明出处
28504项目地址:https://github.com/ELC-lang/ELC
28505*/
28506/*
28507 ,??????????????????????????
28508 ????????????????????????????
28509 ?????????????????????????????+
28510 ?????+++++++++++++++++++++++++
28511 ?????+++++++++++++++++++++++++
28512 ??????++++++++++++++++++++++++
28513 ?????++
28514 ?????+++
28515 ??????+++IIIIIIIIIIIIIIIIII
28516 ?????+++++IIIIIIIIIIIIIIIIII
28517 ?????++++++++++++++++++++++++
28518 ??????+++++++++++++++++++++++:
28519 ?????++
28520 ?????+++
28521 ??????++
28522 ??????????????????????????????II
28523 ??????????????????????????????IIII
28524 ,?????????????????????????????IIIII+
28525 =???++++++++++++++++++++++++++III?
28526 ?++++++++++++++++++++++++++++I+
28527*/
28528#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
28529//_defs.hpp
28530/*
28531未完成的elc解释器_share文件
28532由steve02081504与Alex0125设计、编写
28533转载时请在不对此文件做任何修改的同时注明出处
28534项目地址:https://github.com/ELC-lang/ELC
28535*/
28536/*
28537 ,??????????????????????????
28538 ????????????????????????????
28539 ?????????????????????????????+
28540 ?????+++++++++++++++++++++++++
28541 ?????+++++++++++++++++++++++++
28542 ??????++++++++++++++++++++++++
28543 ?????++
28544 ?????+++
28545 ??????+++IIIIIIIIIIIIIIIIII
28546 ?????+++++IIIIIIIIIIIIIIIIII
28547 ?????++++++++++++++++++++++++
28548 ??????+++++++++++++++++++++++:
28549 ?????++
28550 ?????+++
28551 ??????++
28552 ??????????????????????????????II
28553 ??????????????????????????????IIII
28554 ,?????????????????????????????IIIII+
28555 =???++++++++++++++++++++++++++III?
28556 ?++++++++++++++++++++++++++++I+
28557*/
28558
28559//undefs at "_undefs.hpp"
28560
28561#if defined(ELC_CODE_REALM)
28562 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
28563#endif
28564
28565//set ELC_WARNING_LEVEL default to 4(max)
28566#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
28567
28568#if defined(_MSC_VER)
28569 #pragma warning(push,ELC_WARNING_LEVEL)
28570 #pragma warning(disable:4099)//class与struct混用警告diss
28571 #pragma warning(disable:4584)//重复子类警告diss
28572 #pragma warning(disable:4250)//域控制继承警告diss
28573 #pragma warning(disable:26432)//不完全默认方法警告diss
28574 #pragma warning(disable:26435)//virtual override方法警告diss
28575 #pragma warning(disable:26481)//容器安利diss
28576 #pragma warning(disable:26446)//gsl::at安利diss
28577 #pragma warning(disable:26434)//方法覆盖警告diss
28578 #pragma warning(disable:26429)//gsl::not_null安利diss
28579 #pragma warning(disable:26471)//对void*进行static_cast安利diss
28580 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
28581 #pragma warning(disable:26473)//相同指针显式cast警告diss
28582 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
28583 #pragma warning(disable:26485)//数组作指针警告diss
28584 #pragma warning(disable:26490)//reinterpret_cast警告diss
28585 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
28586 #pragma warning(disable:26482)//非常数数组索引警告diss
28587 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
28588#endif
28589#if defined(__GNUC__)
28590 #pragma GCC diagnostic push
28591 #pragma GCC diagnostic warning "-Wall"//开启所有警告
28592 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
28593#endif
28594#if defined(_MSC_VER)
28595 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
28596 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
28597 #define push_msvc_warning() __pragma(warning(push))
28598 #define pop_msvc_warning() __pragma(warning(pop))
28599 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
28600#else
28601 //#define suppress_msvc_warning(...)
28602 #define disable_msvc_warning(...)
28603 #define push_msvc_warning()
28604 #define pop_msvc_warning()
28605 #define push_and_disable_msvc_warning(...)
28606#endif
28607#if defined(_MSC_VER)
28608 //push pack settings
28609 #pragma pack(push)
28610 #pragma pack()
28611#endif
28612#if defined(_MSC_VER)
28613 //push and undef common macros
28614 #pragma push_macro("new")
28615 #undef new
28616 #pragma push_macro("delete")
28617 #undef delete
28618 #pragma push_macro("min")
28619 #undef min
28620 #pragma push_macro("max")
28621 #undef max
28622 #pragma push_macro("abs")
28623 #undef abs
28624 #pragma push_macro("export")
28625 #undef export
28626 #pragma push_macro("rand")
28627 #undef rand
28628 #pragma push_macro("sqrt")
28629 #undef sqrt
28630 #pragma push_macro("type_info")
28631 #undef type_info
28632 #pragma push_macro("elc")
28633 #undef elc
28634#endif
28635//
28636#if defined(ELC_VOID_NAME)
28637 #undef void
28638#endif
28639//
28640#if defined(ELC_PUBLIC_ALL)
28641 #define protected public
28642 #define private public
28643#endif
28644//
28645#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
28646 #undef rand
28647#endif
28648
28649// #define often_noexcept
28650#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
28651#define noexcept_as_auto MAGIC//哦现在有了
28652#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
28653#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
28654
28655#define using_method_from_base_t(name,...) \
28656template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
28657auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
28658{\
28659 return base_t::name(forward<Args>(rest)...);\
28660}\
28661
28662#define using_method_from_value(name,value_name,...) \
28663template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
28664auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
28665{\
28666 return value_name.name(forward<Args>(rest)...);\
28667}\
28668
28669#define floop while(__builtin_is_my_dick_still_there())
28670#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
28671#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
28672#if defined(_MSC_VER) && _MSC_VER>=1935
28673 //@see https://developercommunity.visualstudio.com/t/10193638
28674 #define enable_adl(name) template<typename=void>void name()noexcept=delete
28675#else
28676 #define enable_adl(name) void name()noexcept=delete
28677#endif
28678
28679#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
28680#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
28681
28682#define declvalue(...) (::std::declval<__VA_ARGS__>())
28683
28685#define template_error(reason) static_assert(template_error_helper<T>,reason)
28687#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
28689#define template_warning(reason) template_warning_helper<T>(reason)
28690
28691//for type_info
28692#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
28693#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
28694
28695#define is_common_attribute(name) public attribute<T,name<T>>
28696#define is_special_attribute(name) public attribute<T,name>
28697
28698#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
28699#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
28700
28701//for float_size_t
28702#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
28703//bitnum_of
28704#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
28705
28706//for attribute
28707#define def_common_attribute_with_nothing(name) \
28708template<typename T>\
28709class name{}\
28710
28711#define def_special_attribute_with_nothing(name) \
28712class name{}\
28713
28714#define common_attribute_t template<class>class
28715#define special_attribute_t class
28716
28725#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
28727#define enabled_by_default class enable_state=void
28729#define disabled_by_default class enable_state= ::std::enable_if_t<false>
28731#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
28733#define enable_flag class enable_state
28734
28735#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
28736#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
28737#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
28738#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
28739#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
28740
28742#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
28744#define get_recursive_λ_caller(name,...) \
28745exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
28746 return name(name,Args...);\
28747}
28749#define λ []
28751#define exλ [&]
28753#define λ_with_catch(...) [__VA_ARGS__]
28755#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
28756//recursive_λ_self_referential_reserved_symbolname
28757#define λ_RLSRRS _my_jb_super_sb_name_
28758
28759#if defined(_MSC_VER) && !defined(__clang__)
28760 #define λ_inline [[msvc::forceinline]]
28761 #define λ_force_inline [[msvc::forceinline]]
28762#elif
28763 #define λ_inline [[gnu::always_inline]]
28764 #define λ_force_inline [[gnu::always_inline]]
28765#else
28766 #define λ_inline
28767 #define λ_force_inline
28768#endif
28769
28770#define MAGIC//ahh,ko no tenno da!
28771
28773#define nothing
28774
28776#define elseif else if
28778#define _big_than_ >
28780#define _small_than_ <
28781
28782#if defined(_MSC_VER)
28783 #define not !
28784 #define and &&
28785 #define or ||
28786#endif
28787
28789#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
28791#define BREAK_NAMESPACE }
28792
28794#define template_name template
28796#define type_name class
28797
28798#if defined(DEBUG) || defined(_DEBUG)
28799 #define not_in_debug 0
28800 #define in_debug 1
28801#else
28802 #define not_in_debug 1
28803 #define in_debug 0
28804#endif
28805
28806#define es U""
28807#define ec(ch) U ## ch
28808
28809#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
28810 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
28811#else
28812 #define ELC_TEST_EVENTNAME(name)
28813#endif
28814
28815#define override_instance_struct \
28816protected:\
28817 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
28818 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
28819 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
28820 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
28821 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
28822
28823#if defined(_MSC_VER) && !defined(__clang__)
28824 #define distinctive __declspec(dllexport)
28825#else
28826 #define distinctive
28827#endif
28828
28829#if defined(_MSC_VER) && !defined(__clang__)
28830 #define force_inline __forceinline
28831#elif defined(__GNUC__) || defined(__clang__)
28832 #define force_inline __attribute__((always_inline)) inline
28833#else
28834 #define force_inline inline
28835#endif
28836
28837#if defined(_MSC_VER) && !defined(__clang__)
28838 #define with_no_vtable __declspec(novtable)
28839#else
28840 #define with_no_vtable
28841#endif
28842
28843#define in_consteval (::std::is_constant_evaluated())
28844
28845#define no_vtable_struct struct with_no_vtable
28846#define no_vtable_class class with_no_vtable
28847
28848//#define get_elc_defs using namespace ::elc::defs
28849
28850//file_end
28851
28852#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
28853
28854//file_end
28855
28856 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
28857
28858 namespace stream_n{
28859 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/base_streams/_body.hpp"
28860//_body.hpp
28861//at namespace elc::defs::stream_n
28862/*
28863未完成的elc解释器base_stream文件
28864由steve02081504与Alex0125设计、编写
28865转载时请在不对此文件做任何修改的同时注明出处
28866项目地址:https://github.com/ELC-lang/ELC
28867*/
28868/*
28869 ,??????????????????????????
28870 ????????????????????????????
28871 ?????????????????????????????+
28872 ?????+++++++++++++++++++++++++
28873 ?????+++++++++++++++++++++++++
28874 ??????++++++++++++++++++++++++
28875 ?????++
28876 ?????+++
28877 ??????+++IIIIIIIIIIIIIIIIII
28878 ?????+++++IIIIIIIIIIIIIIIIII
28879 ?????++++++++++++++++++++++++
28880 ??????+++++++++++++++++++++++:
28881 ?????++
28882 ?????+++
28883 ??????++
28884 ??????????????????????????????II
28885 ??????????????????????????????IIII
28886 ,?????????????????????????????IIIII+
28887 =???++++++++++++++++++++++++++III?
28888 ?++++++++++++++++++++++++++++I+
28889*/
28891enum class seek_type{beg,end,cur};
28892using enum seek_type;
28893no_vtable_struct base_stream_t:abstract_base<base_stream_t>{
28894 virtual ~base_stream_t()=default;
28896 virtual int_t tell(){return this->seek(cur,0);}
28897 virtual bool seek_to(int_t)=0;
28898 virtual void sync()=0;
28899 virtual void flush()=0;
28900 virtual void close()=0;
28901};
28902no_vtable_struct base_not_unreadable_istream_t:abstract_base<base_not_unreadable_istream_t>,virtual base_stream_t{
28903 virtual bool is_end()=0;
28904 virtual bool waitting_for_data()=0;
28905 virtual explicit operator bool(){
28906 return !this->is_end();
28907 }
28908};
28909no_vtable_struct base_istream_t:abstract_base<base_istream_t>,virtual base_not_unreadable_istream_t{};
28910no_vtable_struct base_ostream_t:abstract_base<base_ostream_t>,virtual base_stream_t{};
28911no_vtable_struct base_iostream_t:abstract_base<base_iostream_t>,virtual base_ostream_t,virtual base_istream_t{};
28912
28913//concept: any class that base on base_stream_t
28914template<class T>
28915concept stream_class=is_base_of<base_stream_t,T>;
28916template<class T>
28917concept not_unreadable_istream_class=is_base_of<base_not_unreadable_istream_t,T>;
28918template<class T>
28919concept istream_class=is_base_of<base_istream_t,T>;
28920template<class T>
28921concept ostream_class=is_base_of<base_ostream_t,T>;
28922template<class T>
28923concept iostream_class=is_base_of<base_iostream_t,T>;
28924
28925
28926no_vtable_struct noexcept_stream_t:abstract_base<noexcept_stream_t>,virtual base_stream_t{
28927 virtual int_t seek(seek_type,int_t)noexcept override=0;
28928 virtual int_t tell()noexcept override{return this->seek(cur,0);}
28929 virtual bool seek_to(int_t)noexcept override=0;
28930 virtual void sync()noexcept override=0;
28931 virtual void flush()noexcept override=0;
28932 virtual void close()noexcept override=0;
28933};
28935 virtual bool is_end()noexcept override=0;
28936 virtual bool waitting_for_data()noexcept override=0;
28937 virtual explicit operator bool()noexcept override{
28938 return !this->is_end();
28939 }
28940};
28942no_vtable_struct noexcept_ostream_t:abstract_base<noexcept_ostream_t>,virtual base_ostream_t,virtual noexcept_stream_t{};
28943no_vtable_struct noexcept_iostream_t:abstract_base<noexcept_iostream_t>,virtual base_iostream_t,virtual noexcept_ostream_t,virtual noexcept_istream_t{};
28944static_assert(noexcept(((noexcept_iostream_t*)(nullptr))->~noexcept_iostream_t()));
28945static_assert(noexcept(((noexcept_iostream_t*)(nullptr))->sync()));
28946
28947//concept: any class that base on noexcept_stream_t
28948template<class T>
28949concept noexcept_stream_class=is_base_of<noexcept_stream_t,T>;
28950template<class T>
28951concept noexcept_not_unreadable_istream_class=is_base_of<noexcept_not_unreadable_istream_t,T>;
28952template<class T>
28953concept noexcept_istream_class=is_base_of<noexcept_istream_t,T>;
28954template<class T>
28955concept noexcept_ostream_class=is_base_of<noexcept_ostream_t,T>;
28956template<class T>
28957concept noexcept_iostream_class=is_base_of<noexcept_iostream_t,T>;
28958
28959//text streams
28960template<class char_T>
28961no_vtable_struct text_stream_t:abstract_base<text_stream_t<char_T>>,virtual base_stream_t{
28962 typedef char_T char_type;
28964};
28965template<class char_T>
28966no_vtable_struct text_not_unreadable_istream_t:abstract_base<text_not_unreadable_istream_t<char_T>>,virtual base_not_unreadable_istream_t,virtual text_stream_t<char_T>{
28967 virtual size_t read(char_T*buf,size_t size)=0;
28968};
28969template<class char_T>
28970no_vtable_struct text_istream_t:abstract_base<text_istream_t<char_T>>,virtual base_istream_t,virtual text_not_unreadable_istream_t<char_T>{
28971 virtual void unread(const char_T*buf,size_t size)=0;
28972 virtual char_T peek(){
28973 char_T buf;
28974 const size_t size=this->read(&buf,1);
28975 if(size==0)return 0;
28976 this->unread(&buf,1);
28977 return buf;
28978 }
28979 virtual char_T get(){
28980 char_T buf;
28981 const size_t size=this->read(&buf,1);
28982 if(size==0)return 0;
28983 return buf;
28984 }
28985};
28986template<class char_T>
28987no_vtable_struct text_ostream_t:abstract_base<text_ostream_t<char_T>>,virtual base_ostream_t,virtual text_stream_t<char_T>{
28988 virtual void write(const char_T*buf,size_t size)=0;
28989};
28990template<class char_T>
28991no_vtable_struct text_iostream_t:abstract_base<text_iostream_t<char_T>>,virtual base_iostream_t,virtual text_istream_t<char_T>,virtual text_ostream_t<char_T>{};
28992
28993//concept: any class that base on text_stream_t<char_t>
28994template<class T>
28995concept text_stream_class=is_base_of<text_stream_t<typename remove_cvref<T>::char_type>,T>;
28996template<class T>
28997concept text_not_unreadable_istream_class=is_base_of<text_not_unreadable_istream_t<typename remove_cvref<T>::char_type>,T>;
28998template<class T>
28999concept text_istream_class=is_base_of<text_istream_t<typename remove_cvref<T>::char_type>,T>;
29000template<class T>
29001concept text_ostream_class=is_base_of<text_ostream_t<typename remove_cvref<T>::char_type>,T>;
29002template<class T>
29003concept text_iostream_class=is_base_of<text_iostream_t<typename remove_cvref<T>::char_type>,T>;
29004template<class T>
29005concept text_stream=is_base_of<text_stream_t<char_t>,T>;
29006template<class T>
29007concept text_not_unreadable_istream=is_base_of<text_not_unreadable_istream_t<char_t>,T>;
29008template<class T>
29009concept text_istream=is_base_of<text_istream_t<char_t>,T>;
29010template<class T>
29011concept text_ostream=is_base_of<text_ostream_t<char_t>,T>;
29012template<class T>
29013concept text_iostream=is_base_of<text_iostream_t<char_t>,T>;
29014
29015//noexcept_
29016template<class char_T>
29017no_vtable_struct noexcept_text_stream_t:abstract_base<noexcept_text_stream_t<char_T>>,virtual text_stream_t<char_T>,virtual noexcept_stream_t{};
29018template<class char_T>
29020 virtual size_t read(char_T*buf,size_t size)noexcept override=0;
29021};
29022template<class char_T>
29024 virtual void unread(const char_T*buf,size_t size)noexcept override=0;
29025 virtual char_T peek()noexcept override{
29026 char_T buf;
29027 const size_t size=this->read(&buf,1);
29028 if(size==0)return 0;
29029 this->unread(&buf,1);
29030 return buf;
29031 }
29032 virtual char_T get()noexcept override{
29033 char_T buf;
29034 const size_t size=this->read(&buf,1);
29035 if(size==0)return 0;
29036 return buf;
29037 }
29038};
29039template<class char_T>
29040no_vtable_struct noexcept_text_ostream_t:abstract_base<noexcept_text_ostream_t<char_T>>,virtual noexcept_text_stream_t<char_T>,virtual noexcept_ostream_t,virtual text_ostream_t<char_T>{
29041 virtual void write(const char_T*buf,size_t size)noexcept override=0;
29042};
29043template<class char_T>
29044no_vtable_struct noexcept_text_iostream_t:abstract_base<noexcept_text_iostream_t<char_T>>,
29047
29048//concept: any class that base on noexcept_text_stream<char_t>
29049template<class T>
29050concept noexcept_text_stream_class=is_base_of<noexcept_text_stream_t<typename remove_cvref<T>::char_type>,T>;
29051template<class T>
29052concept noexcept_not_unreadable_text_istream_class=is_base_of<noexcept_not_unreadable_text_istream_t<typename remove_cvref<T>::char_type>,T>;
29053template<class T>
29054concept noexcept_text_istream_class=is_base_of<noexcept_text_istream_t<typename remove_cvref<T>::char_type>,T>;
29055template<class T>
29056concept noexcept_text_ostream_class=is_base_of<noexcept_text_ostream_t<typename remove_cvref<T>::char_type>,T>;
29057template<class T>
29058concept noexcept_text_iostream_class=is_base_of<noexcept_text_iostream_t<typename remove_cvref<T>::char_type>,T>;
29059template<class T>
29060concept noexcept_text_not_unreadable_istream=is_base_of<noexcept_not_unreadable_text_istream_t<char_t>,T>;
29061template<class T>
29062concept noexcept_text_istream=is_base_of<noexcept_text_istream_t<char_t>,T>;
29063template<class T>
29064concept noexcept_text_ostream=is_base_of<noexcept_text_ostream_t<char_t>,T>;
29065template<class T>
29066concept noexcept_text_iostream=is_base_of<noexcept_text_iostream_t<char_t>,T>;
29067
29068//data streams
29069no_vtable_struct data_stream_t:abstract_base<data_stream_t>,virtual base_stream_t{
29070 typedef byte data_type;
29071};
29072no_vtable_struct data_not_unreadable_istream_t:abstract_base<data_not_unreadable_istream_t>,virtual data_stream_t,virtual base_not_unreadable_istream_t{
29073 virtual size_t read(byte*buf,size_t size)=0;
29074 template<class T> requires ::std::is_trivially_copyable_v<T>
29075 size_t read(T*v,size_t size=1){
29076 return this->read(cast_to_data(v),size*sizeof(T))/sizeof(T);
29077 }
29078};
29080 virtual void unread(const byte*buf,size_t size)=0;
29081 template<class T> requires ::std::is_trivially_copyable_v<T>
29082 void unread(const T*v,size_t size=1){
29083 this->unread(cast_to_data(v),size*sizeof(T));
29084 }
29085};
29086no_vtable_struct data_ostream_t:abstract_base<data_ostream_t>,virtual data_stream_t,virtual base_ostream_t{
29087 virtual void write(const byte*buf,size_t size)=0;
29088 template<class T> requires ::std::is_trivially_copyable_v<T>
29089 void write(const T*v,size_t size=1){
29090 this->write(cast_to_data(v),size*sizeof(T));
29091 }
29092};
29093no_vtable_struct data_iostream_t:abstract_base<data_iostream_t>,virtual base_iostream_t,virtual data_istream_t,virtual data_ostream_t{};
29094
29095//concept: any class that base on data_stream
29096template<class T>
29097concept data_stream_class=is_base_of<data_stream_t,T>;
29098template<class T>
29099concept data_not_unreadable_istream_class=is_base_of<data_not_unreadable_istream_t,T>;
29100template<class T>
29101concept data_istream_class=is_base_of<data_istream_t,T>;
29102template<class T>
29103concept data_ostream_class=is_base_of<data_ostream_t,T>;
29104template<class T>
29105concept data_iostream_class=is_base_of<data_iostream_t,T>;
29106
29107//noexcept_
29108no_vtable_struct noexcept_data_stream_t:abstract_base<noexcept_stream_t>,virtual noexcept_stream_t,virtual data_stream_t{};
29110 virtual size_t read(byte*buf,size_t size)noexcept override=0;
29111 template<class T> requires ::std::is_trivially_copyable_v<T>
29112 size_t read(T*v,size_t size=1)noexcept{
29113 return this->read(cast_to_data(v),size*sizeof(T))/sizeof(T);
29114 }
29115};
29117 virtual void unread(const byte*buf,size_t size)noexcept override=0;
29118 template<class T> requires ::std::is_trivially_copyable_v<T>
29119 void unread(const T*v,size_t size=1)noexcept{
29120 this->unread(cast_to_data(v),size*sizeof(T));
29121 }
29122};
29123no_vtable_struct noexcept_data_ostream_t:abstract_base<noexcept_data_ostream_t>,virtual noexcept_data_stream_t,virtual noexcept_ostream_t,virtual data_ostream_t{
29124 virtual void write(const byte*buf,size_t size)noexcept override=0;
29125 template<class T> requires ::std::is_trivially_copyable_v<T>
29126 void write(const T*v,size_t size=1)noexcept{
29127 this->write(cast_to_data(v),size*sizeof(T));
29128 }
29129};
29130no_vtable_struct noexcept_data_iostream_t:abstract_base<noexcept_data_iostream_t>,
29131 virtual noexcept_iostream_t,virtual data_iostream_t,
29133
29134//concept: any class that base on noexcept_data_stream
29135template<class T>
29136concept noexcept_data_stream_class=is_base_of<noexcept_data_stream_t,T>;
29137template<class T>
29138concept noexcept_not_unreadable_data_istream_class=is_base_of<noexcept_not_unreadable_data_istream_t,T>;
29139template<class T>
29140concept noexcept_data_istream_class=is_base_of<noexcept_data_istream_t,T>;
29141template<class T>
29142concept noexcept_data_ostream_class=is_base_of<noexcept_data_ostream_t,T>;
29143template<class T>
29144concept noexcept_data_iostream_class=is_base_of<noexcept_data_iostream_t,T>;
29145
29147
29148//special streams
29149template<class char_T>
29150struct null_text_stream:noexcept_text_iostream_t<char_T>,instance_struct<null_text_stream<char_T>>{
29151 virtual int_t seek(seek_type,int_t)noexcept override{return 0;}
29152 virtual int_t tell()noexcept override{return 0;}
29153 virtual bool seek_to(int_t)noexcept override{return true;}
29154 virtual void sync()noexcept override{}
29155 virtual void flush()noexcept override{}
29156 virtual void close()noexcept override{}
29157 virtual void write(const char_T*,size_t)noexcept override{}
29158 virtual size_t read(char_T*,size_t)noexcept override{return 0;}
29159 virtual void unread(const char_T*,size_t)noexcept override{}
29160 virtual bool is_end()noexcept override{return false;}
29161 virtual bool waitting_for_data()noexcept override{return false;}
29162};
29163struct null_data_stream:noexcept_data_iostream_t,instance_struct<null_data_stream>{
29164 virtual int_t seek(seek_type,int_t)noexcept override{return 0;}
29165 virtual int_t tell()noexcept override{return 0;}
29166 virtual bool seek_to(int_t)noexcept override{return true;}
29167 virtual void sync()noexcept override{}
29168 virtual void flush()noexcept override{}
29169 virtual void close()noexcept override{}
29170 virtual void write(const byte*,size_t)noexcept override{}
29171 virtual size_t read(byte*,size_t)noexcept override{return 0;}
29172 virtual void unread(const byte*,size_t)noexcept override{}
29173 virtual bool is_end()noexcept override{return false;}
29174 virtual bool waitting_for_data()noexcept override{return false;}
29175};
29176
29177//file_end
29178
29179 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29180 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/operators/_body.hpp"
29181//_body.hpp
29182//at namespace elc::defs::stream_n
29183/*
29184未完成的elc解释器base_stream文件
29185由steve02081504与Alex0125设计、编写
29186转载时请在不对此文件做任何修改的同时注明出处
29187项目地址:https://github.com/ELC-lang/ELC
29188*/
29189/*
29190 ,??????????????????????????
29191 ????????????????????????????
29192 ?????????????????????????????+
29193 ?????+++++++++++++++++++++++++
29194 ?????+++++++++++++++++++++++++
29195 ??????++++++++++++++++++++++++
29196 ?????++
29197 ?????+++
29198 ??????+++IIIIIIIIIIIIIIIIII
29199 ?????+++++IIIIIIIIIIIIIIIIII
29200 ?????++++++++++++++++++++++++
29201 ??????+++++++++++++++++++++++:
29202 ?????++
29203 ?????+++
29204 ??????++
29205 ??????????????????????????????II
29206 ??????????????????????????????IIII
29207 ,?????????????????????????????IIIII+
29208 =???++++++++++++++++++++++++++III?
29209 ?++++++++++++++++++++++++++++I+
29210*/
29211//text_stream_t
29212
29213//operator<< of template<class char_T>struct text_ostream_t
29214template<text_ostream_class text_ostream_T,class char_T> requires(type_info<char_T> == type_info<typename remove_cvref<text_ostream_T>::char_type>)
29215decltype(auto)operator<<(text_ostream_T&&stream,const char_T ch)noexcept(noexcept_text_ostream_class<text_ostream_T>){
29216 stream.write(&ch,1);
29217 return stream;
29218}
29219template<text_ostream_class text_ostream_T,class char_T> requires(type_info<char_T> == type_info<typename remove_cvref<text_ostream_T>::char_type>)
29221 stream.write(str.data(),str.size());
29222 return stream;
29223}
29224template<text_ostream_class text_ostream_T,class char_T> requires(type_info<char_T> == type_info<typename remove_cvref<text_ostream_T>::char_type>)
29225decltype(auto)operator<<(text_ostream_T&&stream,const char_T*str)noexcept(noexcept_text_ostream_class<text_ostream_T>){
29226 return stream << array_end_by_zero_t<const char_T>{str};
29227}
29228//operator>> of template<class char_T>struct text_istream_t
29229template<text_istream_class text_istream_T,class char_T> requires(type_info<char_T> == type_info<typename remove_cvref<text_istream_T>::char_type>)
29230decltype(auto)operator>>(text_istream_T&stream,char_T&ch)noexcept(noexcept_text_istream_class<text_istream_T>){
29231 stream.read(&ch,1);
29232 return stream;
29233}
29234
29235//data_stream of any is_trivially_copyable
29236
29237//operator<< of template<class T>struct data_ostream_t
29238template<data_ostream_class data_ostream_T,class T> requires ::std::is_trivially_copyable_v<T>
29239decltype(auto)operator<<(data_ostream_T&&stream,const T&data)noexcept(noexcept_data_ostream_class<data_ostream_T>){
29240 stream.write(&data,1);
29241 return stream;
29242}
29243template<data_ostream_class data_ostream_T,class T,size_t N> requires ::std::is_trivially_copyable_v<T>
29244decltype(auto)operator<<(data_ostream_T&&stream,const T(&data)[N])noexcept(noexcept_data_ostream_class<data_ostream_T>){
29245 stream.write(data,N);
29246 return stream;
29247}
29248//operator>> of template<class T>struct data_istream_t
29249template<data_istream_class data_istream_T,class T> requires ::std::is_trivially_copyable_v<T>
29250decltype(auto)operator>>(data_istream_T&&stream,T&data)noexcept(noexcept_data_istream_class<data_istream_T>){
29251 stream.read(&data,1);
29252 return stream;
29253}
29254template<data_istream_class data_istream_T,class T,size_t N> requires ::std::is_trivially_copyable_v<T>
29255decltype(auto)operator>>(data_istream_T&&stream,T(&data)[N])noexcept(noexcept_data_istream_class<data_istream_T>){
29256 stream.read(data,N);
29257 return stream;
29258}
29259
29260//flush
29261inline constexpr struct flush_t{
29262 template<ostream_class ostream_T>
29263 constexpr decltype(auto)operator()(ostream_T&stream)const noexcept(noexcept_ostream_class<ostream_T>){
29264 stream.flush();
29265 return stream;
29266 }
29268
29269//endline
29270inline constexpr struct endline_t{
29271 template<text_ostream_class text_ostream_T,class char_T=typename remove_cvref<text_ostream_T>::char_type>
29272 constexpr decltype(auto)operator()(text_ostream_T& stream)const noexcept(noexcept_text_ostream_class<text_ostream_T>){
29273 stream << char_T{'\n'};
29274 stream.flush();
29275 return stream;
29276 }
29277 //对于换行的读入特殊处理
29278 template<text_istream_class text_istream_T,class char_T=typename remove_cvref<text_istream_T>::char_type>
29279 constexpr decltype(auto)operator()(text_istream_T& stream)const noexcept(noexcept_text_istream_class<text_istream_T>){
29280 char_T ch;
29281 while(stream>>ch){
29282 if(ch==char_T{'\n'})
29283 break;
29284 if(ch==char_T{'\r'}){
29285 if(!stream.waitting_for_data() && stream>>ch)
29286 if(ch!=char_T{'\n'})//可能的\r\n结尾
29287 stream.unread(&ch,1);
29288 break;
29289 }
29290 }
29291 return stream;
29292 }
29294
29295//operator<< of functions
29296template<class callable_T,ostream_class stream_T> requires(invoke<callable_T>.able<stream_T>)
29297decltype(auto)operator<<(stream_T&&stream,callable_T&&callable)noexcept(invoke<callable_T>.nothrow<stream_T>){
29298 return callable(stream);
29299}
29300//operator>> of functions
29301template<class callable_T,istream_class stream_T> requires(invoke<callable_T>.able<stream_T>)
29302decltype(auto)operator>>(stream_T&&stream,callable_T&&callable)noexcept(invoke<callable_T>.nothrow<stream_T>){
29303 return callable(stream);
29304}
29305
29306template<text_ostream_class text_ostream_T,class T>
29307decltype(auto) base_array_output(text_ostream_T&&stream,const T*array,size_t size)noexcept(noexcept_text_ostream_class<text_ostream_T>){
29308 typedef typename remove_cvref<text_ostream_T>::char_type char_T;
29309 stream << char_T{'['};
29310 for(auto i=array;i!=array+size;++i){
29311 if(i!=array)
29312 stream << char_T{','};
29313 stream << *i;
29314 }
29315 return stream << char_T{']'};
29316}
29317//operator<< of array_t with text_stream
29318template<text_ostream_class text_ostream_T,class T>
29319decltype(auto)operator<<(text_ostream_T&&stream,const array_t<T>&array)noexcept(noexcept_text_ostream_class<text_ostream_T>){
29320 return base_array_output(stream,array.data(),array.size());
29321}
29322//operator<< of navie array with text_stream
29323template<text_ostream_class text_ostream_T,class T,size_t N> requires(type_info<typename remove_cvref<text_ostream_T>::char_type> != type_info<T>)
29324decltype(auto)operator<<(text_ostream_T&&stream,const T(&array)[N])noexcept(noexcept_text_ostream_class<text_ostream_T>){
29325 return base_array_output(stream,array,N);
29326}
29327
29328//file_end
29329
29330 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29331
29332 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/unreadable_wrap/_body.hpp"
29333//_body.hpp
29334//at namespace elc::defs::stream_n
29335/*
29336未完成的elc解释器base_stream文件
29337由steve02081504与Alex0125设计、编写
29338转载时请在不对此文件做任何修改的同时注明出处
29339项目地址:https://github.com/ELC-lang/ELC
29340*/
29341/*
29342 ,??????????????????????????
29343 ????????????????????????????
29344 ?????????????????????????????+
29345 ?????+++++++++++++++++++++++++
29346 ?????+++++++++++++++++++++++++
29347 ??????++++++++++++++++++++++++
29348 ?????++
29349 ?????+++
29350 ??????+++IIIIIIIIIIIIIIIIII
29351 ?????+++++IIIIIIIIIIIIIIIIII
29352 ?????++++++++++++++++++++++++
29353 ??????+++++++++++++++++++++++:
29354 ?????++
29355 ?????+++
29356 ??????++
29357 ??????????????????????????????II
29358 ??????????????????????????????IIII
29359 ,?????????????????????????????IIIII+
29360 =???++++++++++++++++++++++++++III?
29361 ?++++++++++++++++++++++++++++I+
29362*/
29363//warp for not_unreadable_istream to make it unreadable
29364template<class stream_T> requires not_unreadable_istream_class<stream_T>
29365struct unreadable_wrap:stream_T,instance_struct<unreadable_wrap<stream_T>>,virtual decltype(λ{
29366 if constexpr(noexcept_stream_class<stream_T>) {
29367 if constexpr(data_stream_class<stream_T>)
29368 return type_info<noexcept_data_istream_t>;
29369 else
29370 return type_info<noexcept_text_istream_t<typename stream_T::char_type>>;
29371 }
29372 else {
29373 if constexpr(data_stream_class<stream_T>)
29374 return type_info<data_istream_t>;
29375 else
29376 return type_info<text_istream_t<typename stream_T::char_type>>;
29377 }
29378}())::type{
29379private:
29380 typedef stream_T base_t;
29383public:
29384 using stream_T::stream_T;
29385 typedef stream_T::data_type data_type;
29386private:
29387 static constexpr size_t default_buffer_size=1<<10;
29388
29389 array_t<data_type> _buffer{note::size(default_buffer_size)};
29390 size_t _using_size=default_buffer_size,_reading_pos=default_buffer_size;
29391protected:
29392 virtual size_t base_read_impl_for_wrapper(data_type*data,size_t size)noexcept_as(stream_T::read(nullptr,0)){
29393 return stream_T::read(data,size);
29394 }
29395 virtual bool base_waitting_for_data_impl_for_wrapper()noexcept_as(stream_T::waitting_for_data()){
29396 return stream_T::waitting_for_data();
29397 }
29398public:
29399 virtual size_t read(data_type*data,size_t size)noexcept_as(stream_T::read(nullptr,0)) override{
29400 if(size==0)return 0;
29401 size_t aret=0;
29402 if(_reading_pos!=_using_size){
29403 const auto read_size=min(size,_using_size-_reading_pos);
29404 copy_assign[read_size](note::from(add_const(_buffer.data()+_reading_pos)),note::to(data));
29405 _reading_pos+=read_size;
29406 size-=read_size;
29407 aret+=read_size;
29408 data+=read_size;
29409 }
29410 aret+=base_read_impl_for_wrapper(data,size);
29411 return aret;
29412 }
29413 virtual void unread(const data_type*data,size_t size)noexcept override{
29414 if(size==0)return;
29415 if(_reading_pos<size){//unread size more than buffer can hold
29416 const auto more_size=size-_reading_pos;
29417 _buffer.forward_resize(more_size);
29418 _using_size+=more_size;
29419 _reading_pos+=more_size;
29420 }
29421 _reading_pos-=size;
29422 copy_assign[size](note::from(data),note::to(_buffer.data()+_reading_pos));
29423 }
29424 virtual bool is_end()noexcept_as(stream_T::is_end())override{
29425 return _reading_pos==_using_size && stream_T::is_end();
29426 }
29427 virtual bool waitting_for_data()noexcept_as(stream_T::waitting_for_data())override{
29428 return _reading_pos==_using_size && stream_T::waitting_for_data();
29429 }
29430};
29431
29432//file_end
29433
29434 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29435 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/std_wrap/_body.hpp"
29436//_body.hpp
29437//at namespace elc::defs::stream_n
29438/*
29439未完成的elc解释器base_stream文件
29440由steve02081504与Alex0125设计、编写
29441转载时请在不对此文件做任何修改的同时注明出处
29442项目地址:https://github.com/ELC-lang/ELC
29443*/
29444/*
29445 ,??????????????????????????
29446 ????????????????????????????
29447 ?????????????????????????????+
29448 ?????+++++++++++++++++++++++++
29449 ?????+++++++++++++++++++++++++
29450 ??????++++++++++++++++++++++++
29451 ?????++
29452 ?????+++
29453 ??????+++IIIIIIIIIIIIIIIIII
29454 ?????+++++IIIIIIIIIIIIIIIIII
29455 ?????++++++++++++++++++++++++
29456 ??????+++++++++++++++++++++++:
29457 ?????++
29458 ?????+++
29459 ??????++
29460 ??????????????????????????????II
29461 ??????????????????????????????IIII
29462 ,?????????????????????????????IIIII+
29463 =???++++++++++++++++++++++++++III?
29464 ?++++++++++++++++++++++++++++I+
29465*/
29466push_and_disable_msvc_warning(26447);//noexcept警告diss
29467//wrap std::istream to elc::noexcept_text_istream_t
29468template<class char_T,class traits=::std::char_traits<char_T>>
29469struct std_istream_wrap:noexcept_text_istream_t<char_T>,instance_struct<std_istream_wrap<char_T,traits>>{
29470 typedef ::std::basic_istream<char_T,traits> stream_t;
29472 std_istream_wrap(stream_t&stream)noexcept:_stream(stream){}
29473private:
29474 void clear_badbit()noexcept{
29475 _stream.clear(_stream.rdstate()&~::std::ios_base::badbit);
29476 }
29477public:
29478 virtual ~std_istream_wrap()noexcept override=default;
29479 virtual int_t seek(seek_type dir,int_t off)noexcept override{
29480 typename stream_t::iostate state = stream_t::goodbit;
29481 const typename stream_t::sentry isok(_stream);
29482
29483 if(!isok)
29484 state |= stream_t::badbit;
29485 else{
29486 try{
29487 switch(dir){
29488 case beg:
29489 _stream.seekg(off);
29490 break;
29491 case cur:
29492 _stream.seekg(off,_stream.cur);
29493 break;
29494 case end:
29495 _stream.seekg(off,_stream.end);
29496 break;
29497 }
29498 return tell();
29499 }catch(...){
29500 state |= stream_t::badbit;
29501 }
29502 }
29503 _stream.setstate(state);
29504 return -1;
29505 }
29506 virtual int_t tell()noexcept override{
29507 typename stream_t::iostate state = stream_t::goodbit;
29508 const typename stream_t::sentry isok(_stream);
29509
29510 if(!isok)
29511 state |= stream_t::badbit;
29512 else{
29513 try{
29514 const typename stream_t::pos_type base_p;
29515 return int_t(_stream.tellg()-base_p);
29516 }catch(...){
29517 state |= stream_t::badbit;
29518 }
29519 }
29520 _stream.setstate(state);
29521 return -1;
29522 }
29523 virtual void seek_to(int_t pos)noexcept override{
29524 const typename stream_t::pos_type base_p;
29525 _stream.seekg(base_p+pos);
29526 }
29527 virtual void sync()noexcept override{
29528 _stream.sync();
29529 }
29530 virtual void flush()noexcept override{
29531 _stream.sync();
29532 }
29533 virtual void close()noexcept override{
29534 _stream.sync();
29535 }
29536 virtual size_t read(char_T*buf,size_t size)noexcept override{
29537 typename stream_t::iostate state = stream_t::goodbit;
29538 const typename stream_t::sentry isok(_stream);
29539
29540 if(!isok)
29541 state |= stream_t::badbit;
29542 else{
29543 try{
29544 _stream.read(buf,size);
29545 return size_t(_stream.gcount());
29546 }catch(...){
29547 state |= stream_t::badbit;
29548 }
29549 }
29550 _stream.setstate(state);
29551 return 0;
29552 }
29553};
29554//wrap std::ostream to elc::noexcept_text_ostream_t
29555template<class char_T,class traits=::std::char_traits<char_T>>
29556struct std_ostream_wrap:noexcept_text_ostream_t<char_T>,instance_struct<std_ostream_wrap<char_T,traits>>{
29557 typedef ::std::basic_ostream<char_T,traits> stream_t;
29559 std_ostream_wrap(stream_t&stream)noexcept:_stream(stream){}
29560private:
29561 void clear_badbit()noexcept{
29562 _stream.clear(_stream.rdstate()&~::std::ios_base::badbit);
29563 }
29564public:
29565 virtual ~std_ostream_wrap()noexcept override=default;
29566 virtual int_t seek(seek_type dir,int_t off)noexcept override{
29567 typename stream_t::iostate state = stream_t::goodbit;
29568 const typename stream_t::sentry isok(_stream);
29569
29570 if(!isok)
29571 state |= stream_t::badbit;
29572 else{
29573 try{
29574 switch(dir){
29575 case beg:
29576 _stream.seekp(off);
29577 break;
29578 case cur:
29579 _stream.seekp(off,_stream.cur);
29580 break;
29581 case end:
29582 _stream.seekp(off,_stream.end);
29583 break;
29584 }
29585 return tell();
29586 }catch(...){
29587 state |= stream_t::badbit;
29588 }
29589 }
29590 _stream.setstate(state);
29591 return -1;
29592 }
29593 virtual int_t tell()noexcept override{
29594 const typename stream_t::pos_type base_p;
29595 return int_t(_stream.tellp()-base_p);
29596 }
29597 virtual void seek_to(int_t pos)noexcept override{
29598 const typename stream_t::pos_type base_p;
29599 _stream.seekp(base_p+pos);
29600 }
29601 virtual void sync()noexcept override{
29602 _stream.flush();
29603 }
29604 virtual void flush()noexcept override{
29605 _stream.flush();
29606 }
29607 virtual void close()noexcept override{
29608 _stream.flush();
29609 }
29610 virtual void write(const char_T*buf,size_t size)noexcept override{
29611 typename stream_t::iostate state = stream_t::goodbit;
29612 const typename stream_t::sentry isok(_stream);
29613
29614 if(!isok)
29615 state |= stream_t::badbit;
29616 else{
29617 try{
29618 _stream.write(buf,size);
29619 }catch(...){
29620 state |= stream_t::badbit;
29621 }
29622 }
29623 _stream.setstate(state);
29624 }
29625};
29627
29628//inject operator<< of elc::array_like_view_t to std::ostream
29629BREAK_NAMESPACE//elc::defs
29630INTER_NAMESPACE(base::array_like_n)//elc::defs::base::array_like_n
29631
29632template<class char_T,class traits>
29634 ::std::basic_ostream<remove_cvref<char_T>,traits>&stream,
29635 const array_like_view_t<char_T>&view
29636)noexcept{
29637 stream_n::std_ostream_wrap wrap(stream);
29638 wrap << view;
29639 return stream;
29640}
29641
29642BREAK_NAMESPACE//elc::defs
29643INTER_NAMESPACE(stream_n)//elc::defs::stream_n
29644
29645//file_end
29646
29647 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29648 }
29649 using namespace stream_n;
29650
29651 #if defined(ELC_TEST_ON)
29652 namespace base_stream_part_test{
29653 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_test.hpp"
29654//_test.hpp
29655/*
29656未完成的elc解释器base_stream文件
29657由steve02081504与Alex0125设计、编写
29658转载时请在不对此文件做任何修改的同时注明出处
29659项目地址:https://github.com/ELC-lang/ELC
29660*/
29661/*
29662 ,??????????????????????????
29663 ????????????????????????????
29664 ?????????????????????????????+
29665 ?????+++++++++++++++++++++++++
29666 ?????+++++++++++++++++++++++++
29667 ??????++++++++++++++++++++++++
29668 ?????++
29669 ?????+++
29670 ??????+++IIIIIIIIIIIIIIIIII
29671 ?????+++++IIIIIIIIIIIIIIIIII
29672 ?????++++++++++++++++++++++++
29673 ??????+++++++++++++++++++++++:
29674 ?????++
29675 ?????+++
29676 ??????++
29677 ??????????????????????????????II
29678 ??????????????????????????????IIII
29679 ,?????????????????????????????IIIII+
29680 =???++++++++++++++++++++++++++III?
29681 ?++++++++++++++++++++++++++++I+
29682*/
29683inline void test(){
29684 ELC_TEST_EVENTNAME("base_stream部分测试");
29685}
29686inline void test_log_out(){
29687}
29688inline void test_end(){
29689}
29690
29691//file_end
29692
29693 #line 48 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29694 }
29695 #endif
29696
29697 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
29698//_undefs.hpp
29699/*
29700未完成的elc解释器basic文件
29701由steve02081504与Alex0125设计、编写
29702转载时请在不对此文件做任何修改的同时注明出处
29703项目地址:https://github.com/ELC-lang/ELC
29704*/
29705/*
29706 ,??????????????????????????
29707 ????????????????????????????
29708 ?????????????????????????????+
29709 ?????+++++++++++++++++++++++++
29710 ?????+++++++++++++++++++++++++
29711 ??????++++++++++++++++++++++++
29712 ?????++
29713 ?????+++
29714 ??????+++IIIIIIIIIIIIIIIIII
29715 ?????+++++IIIIIIIIIIIIIIIIII
29716 ?????++++++++++++++++++++++++
29717 ??????+++++++++++++++++++++++:
29718 ?????++
29719 ?????+++
29720 ??????++
29721 ??????????????????????????????II
29722 ??????????????????????????????IIII
29723 ,?????????????????????????????IIIII+
29724 =???++++++++++++++++++++++++++III?
29725 ?++++++++++++++++++++++++++++I+
29726*/
29727#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
29728//_undefs.hpp
29729/*
29730未完成的elc解释器_share文件
29731由steve02081504与Alex0125设计、编写
29732转载时请在不对此文件做任何修改的同时注明出处
29733项目地址:https://github.com/ELC-lang/ELC
29734*/
29735/*
29736 ,??????????????????????????
29737 ????????????????????????????
29738 ?????????????????????????????+
29739 ?????+++++++++++++++++++++++++
29740 ?????+++++++++++++++++++++++++
29741 ??????++++++++++++++++++++++++
29742 ?????++
29743 ?????+++
29744 ??????+++IIIIIIIIIIIIIIIIII
29745 ?????+++++IIIIIIIIIIIIIIIIII
29746 ?????++++++++++++++++++++++++
29747 ??????+++++++++++++++++++++++:
29748 ?????++
29749 ?????+++
29750 ??????++
29751 ??????????????????????????????II
29752 ??????????????????????????????IIII
29753 ,?????????????????????????????IIIII+
29754 =???++++++++++++++++++++++++++III?
29755 ?++++++++++++++++++++++++++++I+
29756*/
29757
29758//defs at "_defs.hpp"
29759
29760#if defined(_MSC_VER)
29761 #pragma warning(pop)
29762#endif
29763//#undef suppress_msvc_warning
29764#undef disable_msvc_warning
29765#undef push_msvc_warning
29766#undef pop_msvc_warning
29767#undef push_and_disable_msvc_warning
29768#if defined(_MSC_VER)
29769 #pragma pack(pop)
29770#endif
29771#if defined(__GNUC__)
29772 #pragma GCC diagnostic pop
29773#endif
29774#if defined(_MSC_VER)
29775 #pragma pop_macro("new")
29776 #pragma pop_macro("delete")
29777 #pragma pop_macro("min")
29778 #pragma pop_macro("max")
29779 #pragma pop_macro("abs")
29780 #pragma pop_macro("export")
29781 #pragma pop_macro("rand")
29782 #pragma pop_macro("sqrt")
29783 #pragma pop_macro("type_info")
29784 #pragma pop_macro("elc")
29785#endif
29786
29787//
29788#if defined(ELC_VOID_NAME)
29789 #define void the_void
29790#endif
29791//
29792#if defined(ELC_PUBLIC_ALL)
29793 #undef protected
29794 #undef private
29795#endif
29796//
29797#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
29798 #define rand the_rand
29799#endif
29800
29801// #undef often_noexcept
29802#undef noexcept_as
29803#undef noexcept_as_auto
29804#undef constexpr_as
29805#undef constexpr_as_auto
29806
29807#undef using_method_from_base_t
29808#undef using_method_from_value
29809
29810#undef floop
29811#undef times
29812#undef debug_times
29813#undef enable_adl
29814
29815#undef re_declvalue
29816#undef re_decltype
29817
29818#undef declvalue
29819
29820#undef template_error
29821#undef template_error_of_type
29822#undef template_warning
29823
29824#undef type_info_of
29825#undef type_name_of
29826
29827#undef is_common_attribute
29828#undef is_special_attribute
29829
29830#undef has_attribute
29831#undef not_has_attribute
29832
29833#undef float_size_of
29834#undef bitnum_of
29835
29836#undef def_common_attribute_with_nothing
29837#undef def_special_attribute_with_nothing
29838
29839#undef common_attribute_t
29840#undef special_attribute_t
29841
29842#undef enable_if
29843#undef enabled_by_default
29844#undef disabled_by_default
29845#undef enable_if_not_ill_form
29846#undef enable_flag
29847
29848#undef was_an_ill_form
29849#undef was_an_ill_form_with_parameter
29850#undef was_not_an_ill_form
29851#undef was_not_an_ill_form_and_noexcept
29852#undef was_not_an_ill_form_with_parameter
29853
29854#undef recursive_λ
29855#undef get_recursive_λ_caller
29856#undef λ
29857#undef exλ
29858#undef λ_with_catch
29859#undef self_recursion
29860#undef λ_RLSRRS
29861#undef λ_inline
29862#undef λ_force_inline
29863
29864#undef MAGIC
29865
29866#undef nothing
29867
29868#undef elseif
29869#undef _big_than_
29870#undef _small_than_
29871
29872#if defined(_MSC_VER)
29873 #undef not
29874 #undef and
29875 #undef or
29876#endif
29877
29878#undef INTER_NAMESPACE
29879#undef BREAK_NAMESPACE
29880
29881#undef szie
29882#undef form
29883
29884#undef template_name
29885#undef type_name
29886
29887#undef not_in_debug
29888
29889#undef es
29890#undef ec
29891
29892#undef ELC_TEST_EVENTNAME
29893
29894#undef override_instance_struct
29895
29896#undef distinctive
29897
29898#undef force_inline
29899
29900#undef with_no_vtable
29901
29902#undef in_consteval
29903
29904#undef no_vtable_struct
29905#undef no_vtable_class
29906
29907//#undef get_elc_defs
29908
29909//file_end
29910
29911#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
29912
29913//file_end
29914
29915 #line 52 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29916}
29917namespace elc{
29918 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_export.hpp"
29919//_export.hpp
29920//at namespace elc
29921/*
29922未完成的elc解释器base_stream文件
29923由steve02081504与Alex0125设计、编写
29924转载时请在不对此文件做任何修改的同时注明出处
29925项目地址:https://github.com/ELC-lang/ELC
29926*/
29927/*
29928 ,??????????????????????????
29929 ????????????????????????????
29930 ?????????????????????????????+
29931 ?????+++++++++++++++++++++++++
29932 ?????+++++++++++++++++++++++++
29933 ??????++++++++++++++++++++++++
29934 ?????++
29935 ?????+++
29936 ??????+++IIIIIIIIIIIIIIIIII
29937 ?????+++++IIIIIIIIIIIIIIIIII
29938 ?????++++++++++++++++++++++++
29939 ??????+++++++++++++++++++++++:
29940 ?????++
29941 ?????+++
29942 ??????++
29943 ??????????????????????????????II
29944 ??????????????????????????????IIII
29945 ,?????????????????????????????IIIII+
29946 =???++++++++++++++++++++++++++III?
29947 ?++++++++++++++++++++++++++++I+
29948*/
29949#define export using defs::
29950export base_stream_t;
29951export base_ostream_t;
29953export base_istream_t;
29954export base_iostream_t;
29955export noexcept_stream_t;
29956export noexcept_ostream_t;
29958export noexcept_istream_t;
29959export noexcept_iostream_t;
29961export text_stream_t;
29962export text_istream_t;
29963export text_ostream_t;
29964export text_iostream_t;
29970export data_stream_t;
29972export data_istream_t;
29973export data_ostream_t;
29974export data_iostream_t;
29980export null_text_stream;
29981export null_data_stream;
29982export endline;
29983export flush;
29984#undef export
29985
29986//file_end
29987
29988 #line 55 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
29989}
29990#if defined(ELC_STRING)
29991 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/type_or_function_name_test_output.hpp"
29992//type_or_function_name_test_output.hpp
29993//at namespace ::
29994//multi when ELC_STRING & ELC_BASE_STREAM
29995/*
29996未完成的elc解释器base_stream文件
29997由steve02081504与Alex0125设计、编写
29998转载时请在不对此文件做任何修改的同时注明出处
29999项目地址:https://github.com/ELC-lang/ELC
30000*/
30001/*
30002 ,??????????????????????????
30003 ????????????????????????????
30004 ?????????????????????????????+
30005 ?????+++++++++++++++++++++++++
30006 ?????+++++++++++++++++++++++++
30007 ??????++++++++++++++++++++++++
30008 ?????++
30009 ?????+++
30010 ??????+++IIIIIIIIIIIIIIIIII
30011 ?????+++++IIIIIIIIIIIIIIIIII
30012 ?????++++++++++++++++++++++++
30013 ??????+++++++++++++++++++++++:
30014 ?????++
30015 ?????+++
30016 ??????++
30017 ??????????????????????????????II
30018 ??????????????????????????????IIII
30019 ,?????????????????????????????IIIII+
30020 =???++++++++++++++++++++++++++III?
30021 ?++++++++++++++++++++++++++++I+
30022*/
30023#if !defined(ELC_multi_type_or_function_name_test_output)//pls skip define check as this part is muti
30024#define ELC_multi_type_or_function_name_test_output
30025namespace elc::defs{
30026 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
30027//_defs.hpp
30028/*
30029未完成的elc解释器basic文件
30030由steve02081504与Alex0125设计、编写
30031转载时请在不对此文件做任何修改的同时注明出处
30032项目地址:https://github.com/ELC-lang/ELC
30033*/
30034/*
30035 ,??????????????????????????
30036 ????????????????????????????
30037 ?????????????????????????????+
30038 ?????+++++++++++++++++++++++++
30039 ?????+++++++++++++++++++++++++
30040 ??????++++++++++++++++++++++++
30041 ?????++
30042 ?????+++
30043 ??????+++IIIIIIIIIIIIIIIIII
30044 ?????+++++IIIIIIIIIIIIIIIIII
30045 ?????++++++++++++++++++++++++
30046 ??????+++++++++++++++++++++++:
30047 ?????++
30048 ?????+++
30049 ??????++
30050 ??????????????????????????????II
30051 ??????????????????????????????IIII
30052 ,?????????????????????????????IIIII+
30053 =???++++++++++++++++++++++++++III?
30054 ?++++++++++++++++++++++++++++I+
30055*/
30056#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
30057//_defs.hpp
30058/*
30059未完成的elc解释器_share文件
30060由steve02081504与Alex0125设计、编写
30061转载时请在不对此文件做任何修改的同时注明出处
30062项目地址:https://github.com/ELC-lang/ELC
30063*/
30064/*
30065 ,??????????????????????????
30066 ????????????????????????????
30067 ?????????????????????????????+
30068 ?????+++++++++++++++++++++++++
30069 ?????+++++++++++++++++++++++++
30070 ??????++++++++++++++++++++++++
30071 ?????++
30072 ?????+++
30073 ??????+++IIIIIIIIIIIIIIIIII
30074 ?????+++++IIIIIIIIIIIIIIIIII
30075 ?????++++++++++++++++++++++++
30076 ??????+++++++++++++++++++++++:
30077 ?????++
30078 ?????+++
30079 ??????++
30080 ??????????????????????????????II
30081 ??????????????????????????????IIII
30082 ,?????????????????????????????IIIII+
30083 =???++++++++++++++++++++++++++III?
30084 ?++++++++++++++++++++++++++++I+
30085*/
30086
30087//undefs at "_undefs.hpp"
30088
30089#if defined(ELC_CODE_REALM)
30090 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
30091#endif
30092
30093//set ELC_WARNING_LEVEL default to 4(max)
30094#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
30095
30096#if defined(_MSC_VER)
30097 #pragma warning(push,ELC_WARNING_LEVEL)
30098 #pragma warning(disable:4099)//class与struct混用警告diss
30099 #pragma warning(disable:4584)//重复子类警告diss
30100 #pragma warning(disable:4250)//域控制继承警告diss
30101 #pragma warning(disable:26432)//不完全默认方法警告diss
30102 #pragma warning(disable:26435)//virtual override方法警告diss
30103 #pragma warning(disable:26481)//容器安利diss
30104 #pragma warning(disable:26446)//gsl::at安利diss
30105 #pragma warning(disable:26434)//方法覆盖警告diss
30106 #pragma warning(disable:26429)//gsl::not_null安利diss
30107 #pragma warning(disable:26471)//对void*进行static_cast安利diss
30108 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
30109 #pragma warning(disable:26473)//相同指针显式cast警告diss
30110 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
30111 #pragma warning(disable:26485)//数组作指针警告diss
30112 #pragma warning(disable:26490)//reinterpret_cast警告diss
30113 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
30114 #pragma warning(disable:26482)//非常数数组索引警告diss
30115 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
30116#endif
30117#if defined(__GNUC__)
30118 #pragma GCC diagnostic push
30119 #pragma GCC diagnostic warning "-Wall"//开启所有警告
30120 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
30121#endif
30122#if defined(_MSC_VER)
30123 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
30124 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
30125 #define push_msvc_warning() __pragma(warning(push))
30126 #define pop_msvc_warning() __pragma(warning(pop))
30127 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
30128#else
30129 //#define suppress_msvc_warning(...)
30130 #define disable_msvc_warning(...)
30131 #define push_msvc_warning()
30132 #define pop_msvc_warning()
30133 #define push_and_disable_msvc_warning(...)
30134#endif
30135#if defined(_MSC_VER)
30136 //push pack settings
30137 #pragma pack(push)
30138 #pragma pack()
30139#endif
30140#if defined(_MSC_VER)
30141 //push and undef common macros
30142 #pragma push_macro("new")
30143 #undef new
30144 #pragma push_macro("delete")
30145 #undef delete
30146 #pragma push_macro("min")
30147 #undef min
30148 #pragma push_macro("max")
30149 #undef max
30150 #pragma push_macro("abs")
30151 #undef abs
30152 #pragma push_macro("export")
30153 #undef export
30154 #pragma push_macro("rand")
30155 #undef rand
30156 #pragma push_macro("sqrt")
30157 #undef sqrt
30158 #pragma push_macro("type_info")
30159 #undef type_info
30160 #pragma push_macro("elc")
30161 #undef elc
30162#endif
30163//
30164#if defined(ELC_VOID_NAME)
30165 #undef void
30166#endif
30167//
30168#if defined(ELC_PUBLIC_ALL)
30169 #define protected public
30170 #define private public
30171#endif
30172//
30173#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
30174 #undef rand
30175#endif
30176
30177// #define often_noexcept
30178#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
30179#define noexcept_as_auto MAGIC//哦现在有了
30180#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
30181#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
30182
30183#define using_method_from_base_t(name,...) \
30184template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
30185auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
30186{\
30187 return base_t::name(forward<Args>(rest)...);\
30188}\
30189
30190#define using_method_from_value(name,value_name,...) \
30191template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
30192auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
30193{\
30194 return value_name.name(forward<Args>(rest)...);\
30195}\
30196
30197#define floop while(__builtin_is_my_dick_still_there())
30198#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
30199#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
30200#if defined(_MSC_VER) && _MSC_VER>=1935
30201 //@see https://developercommunity.visualstudio.com/t/10193638
30202 #define enable_adl(name) template<typename=void>void name()noexcept=delete
30203#else
30204 #define enable_adl(name) void name()noexcept=delete
30205#endif
30206
30207#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
30208#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
30209
30210#define declvalue(...) (::std::declval<__VA_ARGS__>())
30211
30213#define template_error(reason) static_assert(template_error_helper<T>,reason)
30215#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
30217#define template_warning(reason) template_warning_helper<T>(reason)
30218
30219//for type_info
30220#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
30221#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
30222
30223#define is_common_attribute(name) public attribute<T,name<T>>
30224#define is_special_attribute(name) public attribute<T,name>
30225
30226#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
30227#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
30228
30229//for float_size_t
30230#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
30231//bitnum_of
30232#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
30233
30234//for attribute
30235#define def_common_attribute_with_nothing(name) \
30236template<typename T>\
30237class name{}\
30238
30239#define def_special_attribute_with_nothing(name) \
30240class name{}\
30241
30242#define common_attribute_t template<class>class
30243#define special_attribute_t class
30244
30253#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
30255#define enabled_by_default class enable_state=void
30257#define disabled_by_default class enable_state= ::std::enable_if_t<false>
30259#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
30261#define enable_flag class enable_state
30262
30263#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
30264#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
30265#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
30266#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
30267#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
30268
30270#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
30272#define get_recursive_λ_caller(name,...) \
30273exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
30274 return name(name,Args...);\
30275}
30277#define λ []
30279#define exλ [&]
30281#define λ_with_catch(...) [__VA_ARGS__]
30283#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
30284//recursive_λ_self_referential_reserved_symbolname
30285#define λ_RLSRRS _my_jb_super_sb_name_
30286
30287#if defined(_MSC_VER) && !defined(__clang__)
30288 #define λ_inline [[msvc::forceinline]]
30289 #define λ_force_inline [[msvc::forceinline]]
30290#elif
30291 #define λ_inline [[gnu::always_inline]]
30292 #define λ_force_inline [[gnu::always_inline]]
30293#else
30294 #define λ_inline
30295 #define λ_force_inline
30296#endif
30297
30298#define MAGIC//ahh,ko no tenno da!
30299
30301#define nothing
30302
30304#define elseif else if
30306#define _big_than_ >
30308#define _small_than_ <
30309
30310#if defined(_MSC_VER)
30311 #define not !
30312 #define and &&
30313 #define or ||
30314#endif
30315
30317#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
30319#define BREAK_NAMESPACE }
30320
30322#define template_name template
30324#define type_name class
30325
30326#if defined(DEBUG) || defined(_DEBUG)
30327 #define not_in_debug 0
30328 #define in_debug 1
30329#else
30330 #define not_in_debug 1
30331 #define in_debug 0
30332#endif
30333
30334#define es U""
30335#define ec(ch) U ## ch
30336
30337#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
30338 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
30339#else
30340 #define ELC_TEST_EVENTNAME(name)
30341#endif
30342
30343#define override_instance_struct \
30344protected:\
30345 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
30346 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
30347 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
30348 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
30349 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
30350
30351#if defined(_MSC_VER) && !defined(__clang__)
30352 #define distinctive __declspec(dllexport)
30353#else
30354 #define distinctive
30355#endif
30356
30357#if defined(_MSC_VER) && !defined(__clang__)
30358 #define force_inline __forceinline
30359#elif defined(__GNUC__) || defined(__clang__)
30360 #define force_inline __attribute__((always_inline)) inline
30361#else
30362 #define force_inline inline
30363#endif
30364
30365#if defined(_MSC_VER) && !defined(__clang__)
30366 #define with_no_vtable __declspec(novtable)
30367#else
30368 #define with_no_vtable
30369#endif
30370
30371#define in_consteval (::std::is_constant_evaluated())
30372
30373#define no_vtable_struct struct with_no_vtable
30374#define no_vtable_class class with_no_vtable
30375
30376//#define get_elc_defs using namespace ::elc::defs
30377
30378//file_end
30379
30380#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
30381
30382//file_end
30383
30384 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/type_or_function_name_test_output.hpp"
30385
30386 namespace stream_n{
30387 //typename output only for text_ostream_t<char_t>
30388 template<text_ostream stream_T>
30389 decltype(auto)operator<<(stream_T&&stream,const type_name_t&name)noexcept(noexcept_text_ostream<stream_T>){
30390 return stream << to_char_t_str(name);
30391 }
30392 //output type_info
30393 template<text_ostream stream_T>
30394 decltype(auto)operator<<(stream_T&&stream,const base_type_info_t&info)noexcept(noexcept_text_ostream<stream_T>){
30395 return stream << info.get_name();
30396 }
30397 //output ::std::type_info
30398 template<text_ostream stream_T>
30399 decltype(auto)operator<<(stream_T&&stream,const ::std::type_info&info)noexcept(noexcept_text_ostream<stream_T>){
30400 return stream << type_name_t{info.name()};
30401 }
30402
30403 //function name output only for text_ostream_t<char_t>
30404 template<text_ostream stream_T>
30405 decltype(auto)operator<<(stream_T&&stream,const function_name_t&name)noexcept(noexcept_text_ostream<stream_T>){
30406 return stream << to_char_t_str(name);
30407 }
30408 }
30409
30410 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
30411//_undefs.hpp
30412/*
30413未完成的elc解释器basic文件
30414由steve02081504与Alex0125设计、编写
30415转载时请在不对此文件做任何修改的同时注明出处
30416项目地址:https://github.com/ELC-lang/ELC
30417*/
30418/*
30419 ,??????????????????????????
30420 ????????????????????????????
30421 ?????????????????????????????+
30422 ?????+++++++++++++++++++++++++
30423 ?????+++++++++++++++++++++++++
30424 ??????++++++++++++++++++++++++
30425 ?????++
30426 ?????+++
30427 ??????+++IIIIIIIIIIIIIIIIII
30428 ?????+++++IIIIIIIIIIIIIIIIII
30429 ?????++++++++++++++++++++++++
30430 ??????+++++++++++++++++++++++:
30431 ?????++
30432 ?????+++
30433 ??????++
30434 ??????????????????????????????II
30435 ??????????????????????????????IIII
30436 ,?????????????????????????????IIIII+
30437 =???++++++++++++++++++++++++++III?
30438 ?++++++++++++++++++++++++++++I+
30439*/
30440#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
30441//_undefs.hpp
30442/*
30443未完成的elc解释器_share文件
30444由steve02081504与Alex0125设计、编写
30445转载时请在不对此文件做任何修改的同时注明出处
30446项目地址:https://github.com/ELC-lang/ELC
30447*/
30448/*
30449 ,??????????????????????????
30450 ????????????????????????????
30451 ?????????????????????????????+
30452 ?????+++++++++++++++++++++++++
30453 ?????+++++++++++++++++++++++++
30454 ??????++++++++++++++++++++++++
30455 ?????++
30456 ?????+++
30457 ??????+++IIIIIIIIIIIIIIIIII
30458 ?????+++++IIIIIIIIIIIIIIIIII
30459 ?????++++++++++++++++++++++++
30460 ??????+++++++++++++++++++++++:
30461 ?????++
30462 ?????+++
30463 ??????++
30464 ??????????????????????????????II
30465 ??????????????????????????????IIII
30466 ,?????????????????????????????IIIII+
30467 =???++++++++++++++++++++++++++III?
30468 ?++++++++++++++++++++++++++++I+
30469*/
30470
30471//defs at "_defs.hpp"
30472
30473#if defined(_MSC_VER)
30474 #pragma warning(pop)
30475#endif
30476//#undef suppress_msvc_warning
30477#undef disable_msvc_warning
30478#undef push_msvc_warning
30479#undef pop_msvc_warning
30480#undef push_and_disable_msvc_warning
30481#if defined(_MSC_VER)
30482 #pragma pack(pop)
30483#endif
30484#if defined(__GNUC__)
30485 #pragma GCC diagnostic pop
30486#endif
30487#if defined(_MSC_VER)
30488 #pragma pop_macro("new")
30489 #pragma pop_macro("delete")
30490 #pragma pop_macro("min")
30491 #pragma pop_macro("max")
30492 #pragma pop_macro("abs")
30493 #pragma pop_macro("export")
30494 #pragma pop_macro("rand")
30495 #pragma pop_macro("sqrt")
30496 #pragma pop_macro("type_info")
30497 #pragma pop_macro("elc")
30498#endif
30499
30500//
30501#if defined(ELC_VOID_NAME)
30502 #define void the_void
30503#endif
30504//
30505#if defined(ELC_PUBLIC_ALL)
30506 #undef protected
30507 #undef private
30508#endif
30509//
30510#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
30511 #define rand the_rand
30512#endif
30513
30514// #undef often_noexcept
30515#undef noexcept_as
30516#undef noexcept_as_auto
30517#undef constexpr_as
30518#undef constexpr_as_auto
30519
30520#undef using_method_from_base_t
30521#undef using_method_from_value
30522
30523#undef floop
30524#undef times
30525#undef debug_times
30526#undef enable_adl
30527
30528#undef re_declvalue
30529#undef re_decltype
30530
30531#undef declvalue
30532
30533#undef template_error
30534#undef template_error_of_type
30535#undef template_warning
30536
30537#undef type_info_of
30538#undef type_name_of
30539
30540#undef is_common_attribute
30541#undef is_special_attribute
30542
30543#undef has_attribute
30544#undef not_has_attribute
30545
30546#undef float_size_of
30547#undef bitnum_of
30548
30549#undef def_common_attribute_with_nothing
30550#undef def_special_attribute_with_nothing
30551
30552#undef common_attribute_t
30553#undef special_attribute_t
30554
30555#undef enable_if
30556#undef enabled_by_default
30557#undef disabled_by_default
30558#undef enable_if_not_ill_form
30559#undef enable_flag
30560
30561#undef was_an_ill_form
30562#undef was_an_ill_form_with_parameter
30563#undef was_not_an_ill_form
30564#undef was_not_an_ill_form_and_noexcept
30565#undef was_not_an_ill_form_with_parameter
30566
30567#undef recursive_λ
30568#undef get_recursive_λ_caller
30569#undef λ
30570#undef exλ
30571#undef λ_with_catch
30572#undef self_recursion
30573#undef λ_RLSRRS
30574#undef λ_inline
30575#undef λ_force_inline
30576
30577#undef MAGIC
30578
30579#undef nothing
30580
30581#undef elseif
30582#undef _big_than_
30583#undef _small_than_
30584
30585#if defined(_MSC_VER)
30586 #undef not
30587 #undef and
30588 #undef or
30589#endif
30590
30591#undef INTER_NAMESPACE
30592#undef BREAK_NAMESPACE
30593
30594#undef szie
30595#undef form
30596
30597#undef template_name
30598#undef type_name
30599
30600#undef not_in_debug
30601
30602#undef es
30603#undef ec
30604
30605#undef ELC_TEST_EVENTNAME
30606
30607#undef override_instance_struct
30608
30609#undef distinctive
30610
30611#undef force_inline
30612
30613#undef with_no_vtable
30614
30615#undef in_consteval
30616
30617#undef no_vtable_struct
30618#undef no_vtable_class
30619
30620//#undef get_elc_defs
30621
30622//file_end
30623
30624#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
30625
30626//file_end
30627
30628 #line 61 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/type_or_function_name_test_output.hpp"
30629}
30630#endif
30631
30632//file_end
30633
30634 #line 58 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
30635#endif
30636#if defined(ELC_NUMERICAL_REPRESENTATION)
30637 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/arithmetic_text_io.hpp"
30638//arithmetic_text_io.hpp
30639//at namespace ::
30640//multi when ELC_NUMERICAL_REPRESENTATION & ELC_BASE_STREAM
30641/*
30642未完成的elc解释器base_stream文件
30643由steve02081504与Alex0125设计、编写
30644转载时请在不对此文件做任何修改的同时注明出处
30645项目地址:https://github.com/ELC-lang/ELC
30646*/
30647/*
30648 ,??????????????????????????
30649 ????????????????????????????
30650 ?????????????????????????????+
30651 ?????+++++++++++++++++++++++++
30652 ?????+++++++++++++++++++++++++
30653 ??????++++++++++++++++++++++++
30654 ?????++
30655 ?????+++
30656 ??????+++IIIIIIIIIIIIIIIIII
30657 ?????+++++IIIIIIIIIIIIIIIIII
30658 ?????++++++++++++++++++++++++
30659 ??????+++++++++++++++++++++++:
30660 ?????++
30661 ?????+++
30662 ??????++
30663 ??????????????????????????????II
30664 ??????????????????????????????IIII
30665 ,?????????????????????????????IIIII+
30666 =???++++++++++++++++++++++++++III?
30667 ?++++++++++++++++++++++++++++I+
30668*/
30669#if !defined(ELC_multi_arithmetic_text_io)//pls skip define check as this part is muti
30670#define ELC_multi_arithmetic_text_io
30671namespace elc::defs{
30672 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
30673//_defs.hpp
30674/*
30675未完成的elc解释器basic文件
30676由steve02081504与Alex0125设计、编写
30677转载时请在不对此文件做任何修改的同时注明出处
30678项目地址:https://github.com/ELC-lang/ELC
30679*/
30680/*
30681 ,??????????????????????????
30682 ????????????????????????????
30683 ?????????????????????????????+
30684 ?????+++++++++++++++++++++++++
30685 ?????+++++++++++++++++++++++++
30686 ??????++++++++++++++++++++++++
30687 ?????++
30688 ?????+++
30689 ??????+++IIIIIIIIIIIIIIIIII
30690 ?????+++++IIIIIIIIIIIIIIIIII
30691 ?????++++++++++++++++++++++++
30692 ??????+++++++++++++++++++++++:
30693 ?????++
30694 ?????+++
30695 ??????++
30696 ??????????????????????????????II
30697 ??????????????????????????????IIII
30698 ,?????????????????????????????IIIII+
30699 =???++++++++++++++++++++++++++III?
30700 ?++++++++++++++++++++++++++++I+
30701*/
30702#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
30703//_defs.hpp
30704/*
30705未完成的elc解释器_share文件
30706由steve02081504与Alex0125设计、编写
30707转载时请在不对此文件做任何修改的同时注明出处
30708项目地址:https://github.com/ELC-lang/ELC
30709*/
30710/*
30711 ,??????????????????????????
30712 ????????????????????????????
30713 ?????????????????????????????+
30714 ?????+++++++++++++++++++++++++
30715 ?????+++++++++++++++++++++++++
30716 ??????++++++++++++++++++++++++
30717 ?????++
30718 ?????+++
30719 ??????+++IIIIIIIIIIIIIIIIII
30720 ?????+++++IIIIIIIIIIIIIIIIII
30721 ?????++++++++++++++++++++++++
30722 ??????+++++++++++++++++++++++:
30723 ?????++
30724 ?????+++
30725 ??????++
30726 ??????????????????????????????II
30727 ??????????????????????????????IIII
30728 ,?????????????????????????????IIIII+
30729 =???++++++++++++++++++++++++++III?
30730 ?++++++++++++++++++++++++++++I+
30731*/
30732
30733//undefs at "_undefs.hpp"
30734
30735#if defined(ELC_CODE_REALM)
30736 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
30737#endif
30738
30739//set ELC_WARNING_LEVEL default to 4(max)
30740#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
30741
30742#if defined(_MSC_VER)
30743 #pragma warning(push,ELC_WARNING_LEVEL)
30744 #pragma warning(disable:4099)//class与struct混用警告diss
30745 #pragma warning(disable:4584)//重复子类警告diss
30746 #pragma warning(disable:4250)//域控制继承警告diss
30747 #pragma warning(disable:26432)//不完全默认方法警告diss
30748 #pragma warning(disable:26435)//virtual override方法警告diss
30749 #pragma warning(disable:26481)//容器安利diss
30750 #pragma warning(disable:26446)//gsl::at安利diss
30751 #pragma warning(disable:26434)//方法覆盖警告diss
30752 #pragma warning(disable:26429)//gsl::not_null安利diss
30753 #pragma warning(disable:26471)//对void*进行static_cast安利diss
30754 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
30755 #pragma warning(disable:26473)//相同指针显式cast警告diss
30756 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
30757 #pragma warning(disable:26485)//数组作指针警告diss
30758 #pragma warning(disable:26490)//reinterpret_cast警告diss
30759 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
30760 #pragma warning(disable:26482)//非常数数组索引警告diss
30761 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
30762#endif
30763#if defined(__GNUC__)
30764 #pragma GCC diagnostic push
30765 #pragma GCC diagnostic warning "-Wall"//开启所有警告
30766 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
30767#endif
30768#if defined(_MSC_VER)
30769 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
30770 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
30771 #define push_msvc_warning() __pragma(warning(push))
30772 #define pop_msvc_warning() __pragma(warning(pop))
30773 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
30774#else
30775 //#define suppress_msvc_warning(...)
30776 #define disable_msvc_warning(...)
30777 #define push_msvc_warning()
30778 #define pop_msvc_warning()
30779 #define push_and_disable_msvc_warning(...)
30780#endif
30781#if defined(_MSC_VER)
30782 //push pack settings
30783 #pragma pack(push)
30784 #pragma pack()
30785#endif
30786#if defined(_MSC_VER)
30787 //push and undef common macros
30788 #pragma push_macro("new")
30789 #undef new
30790 #pragma push_macro("delete")
30791 #undef delete
30792 #pragma push_macro("min")
30793 #undef min
30794 #pragma push_macro("max")
30795 #undef max
30796 #pragma push_macro("abs")
30797 #undef abs
30798 #pragma push_macro("export")
30799 #undef export
30800 #pragma push_macro("rand")
30801 #undef rand
30802 #pragma push_macro("sqrt")
30803 #undef sqrt
30804 #pragma push_macro("type_info")
30805 #undef type_info
30806 #pragma push_macro("elc")
30807 #undef elc
30808#endif
30809//
30810#if defined(ELC_VOID_NAME)
30811 #undef void
30812#endif
30813//
30814#if defined(ELC_PUBLIC_ALL)
30815 #define protected public
30816 #define private public
30817#endif
30818//
30819#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
30820 #undef rand
30821#endif
30822
30823// #define often_noexcept
30824#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
30825#define noexcept_as_auto MAGIC//哦现在有了
30826#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
30827#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
30828
30829#define using_method_from_base_t(name,...) \
30830template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
30831auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
30832{\
30833 return base_t::name(forward<Args>(rest)...);\
30834}\
30835
30836#define using_method_from_value(name,value_name,...) \
30837template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
30838auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
30839{\
30840 return value_name.name(forward<Args>(rest)...);\
30841}\
30842
30843#define floop while(__builtin_is_my_dick_still_there())
30844#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
30845#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
30846#if defined(_MSC_VER) && _MSC_VER>=1935
30847 //@see https://developercommunity.visualstudio.com/t/10193638
30848 #define enable_adl(name) template<typename=void>void name()noexcept=delete
30849#else
30850 #define enable_adl(name) void name()noexcept=delete
30851#endif
30852
30853#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
30854#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
30855
30856#define declvalue(...) (::std::declval<__VA_ARGS__>())
30857
30859#define template_error(reason) static_assert(template_error_helper<T>,reason)
30861#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
30863#define template_warning(reason) template_warning_helper<T>(reason)
30864
30865//for type_info
30866#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
30867#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
30868
30869#define is_common_attribute(name) public attribute<T,name<T>>
30870#define is_special_attribute(name) public attribute<T,name>
30871
30872#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
30873#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
30874
30875//for float_size_t
30876#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
30877//bitnum_of
30878#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
30879
30880//for attribute
30881#define def_common_attribute_with_nothing(name) \
30882template<typename T>\
30883class name{}\
30884
30885#define def_special_attribute_with_nothing(name) \
30886class name{}\
30887
30888#define common_attribute_t template<class>class
30889#define special_attribute_t class
30890
30899#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
30901#define enabled_by_default class enable_state=void
30903#define disabled_by_default class enable_state= ::std::enable_if_t<false>
30905#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
30907#define enable_flag class enable_state
30908
30909#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
30910#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
30911#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
30912#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
30913#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
30914
30916#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
30918#define get_recursive_λ_caller(name,...) \
30919exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
30920 return name(name,Args...);\
30921}
30923#define λ []
30925#define exλ [&]
30927#define λ_with_catch(...) [__VA_ARGS__]
30929#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
30930//recursive_λ_self_referential_reserved_symbolname
30931#define λ_RLSRRS _my_jb_super_sb_name_
30932
30933#if defined(_MSC_VER) && !defined(__clang__)
30934 #define λ_inline [[msvc::forceinline]]
30935 #define λ_force_inline [[msvc::forceinline]]
30936#elif
30937 #define λ_inline [[gnu::always_inline]]
30938 #define λ_force_inline [[gnu::always_inline]]
30939#else
30940 #define λ_inline
30941 #define λ_force_inline
30942#endif
30943
30944#define MAGIC//ahh,ko no tenno da!
30945
30947#define nothing
30948
30950#define elseif else if
30952#define _big_than_ >
30954#define _small_than_ <
30955
30956#if defined(_MSC_VER)
30957 #define not !
30958 #define and &&
30959 #define or ||
30960#endif
30961
30963#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
30965#define BREAK_NAMESPACE }
30966
30968#define template_name template
30970#define type_name class
30971
30972#if defined(DEBUG) || defined(_DEBUG)
30973 #define not_in_debug 0
30974 #define in_debug 1
30975#else
30976 #define not_in_debug 1
30977 #define in_debug 0
30978#endif
30979
30980#define es U""
30981#define ec(ch) U ## ch
30982
30983#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
30984 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
30985#else
30986 #define ELC_TEST_EVENTNAME(name)
30987#endif
30988
30989#define override_instance_struct \
30990protected:\
30991 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
30992 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
30993 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
30994 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
30995 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
30996
30997#if defined(_MSC_VER) && !defined(__clang__)
30998 #define distinctive __declspec(dllexport)
30999#else
31000 #define distinctive
31001#endif
31002
31003#if defined(_MSC_VER) && !defined(__clang__)
31004 #define force_inline __forceinline
31005#elif defined(__GNUC__) || defined(__clang__)
31006 #define force_inline __attribute__((always_inline)) inline
31007#else
31008 #define force_inline inline
31009#endif
31010
31011#if defined(_MSC_VER) && !defined(__clang__)
31012 #define with_no_vtable __declspec(novtable)
31013#else
31014 #define with_no_vtable
31015#endif
31016
31017#define in_consteval (::std::is_constant_evaluated())
31018
31019#define no_vtable_struct struct with_no_vtable
31020#define no_vtable_class class with_no_vtable
31021
31022//#define get_elc_defs using namespace ::elc::defs
31023
31024//file_end
31025
31026#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
31027
31028//file_end
31029
31030 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/arithmetic_text_io.hpp"
31031
31032 namespace stream_n{
31033 using namespace numerical_representation_n;
31034
31035 inline const auto&default_numerical_representation=decimal;
31036 inline const auto&default_bool_representation=common_bool_representation;
31037 inline const auto&default_bitset_representation=binary;
31038
31039 template<text_stream stream_T>
31040 inline decltype(auto)get_numerical_representation_of(stream_T&&stream)noexcept{
31041 if constexpr was_not_an_ill_form(stream.get_numerical_representation())
31042 return stream.get_numerical_representation();
31043 else
31044 return default_numerical_representation;
31045 }
31046
31047 template<text_stream stream_T>
31048 inline decltype(auto)get_bool_representation_of(stream_T&&stream)noexcept{
31049 if constexpr was_not_an_ill_form(stream.get_bool_representation())
31050 return stream.get_bool_representation();
31051 else
31052 return default_bool_representation;
31053 }
31054
31055 template<text_stream stream_T>
31056 inline decltype(auto)get_bitset_representation_of(stream_T&&stream)noexcept{
31057 if constexpr was_not_an_ill_form(stream.get_bitset_representation())
31058 return stream.get_bitset_representation();
31059 else
31060 return default_bitset_representation;
31061 }
31062
31063 //arithmetic output only for text_ostream
31064 template<arithmetic_type T,text_ostream stream_T> requires(type_info<remove_cvref<T>> != type_info<char_t> &&
31065 type_info<remove_cvref<T>> != type_info<bool>)
31066 inline decltype(auto)operator<<(stream_T&&stream,T&&data)noexcept(noexcept_text_ostream<stream_T>){
31067 return stream << to_string(forward<T>(data),get_numerical_representation_of(stream));
31068 }
31069
31070 template<typename T,text_ostream stream_T> requires(!::std::is_arithmetic_v<remove_cvref<T>> &&
31072 inline decltype(auto)operator<<(stream_T&&stream,T&&data)noexcept(noexcept_text_ostream<stream_T> && to_arithmetic.nothrow<T>) {
31073 return stream << to_arithmetic(forward<T>(data));
31074 }
31075
31076 template<typename T,text_ostream stream_T> requires(type_info<T> == type_info<bool>)
31077 inline decltype(auto)operator<<(stream_T&&stream,T data)noexcept(noexcept_text_ostream<stream_T>){
31078 const auto&representation=get_bool_representation_of(stream);
31079 if(data==true)
31080 stream << representation.get_true();
31081 elseif(data==false)
31082 stream << representation.get_false();
31083 else
31084 stream << representation.get_other_prefix() << union_cast<unsigned_specific_size_t<sizeof(bool)>>(data) << representation.get_other_suffix();
31085 return stream;
31086 }
31087
31088 //bitset output only for text_ostream
31089 template<size_t bit_num,text_ostream stream_T>
31090 inline decltype(auto)operator<<(stream_T&&stream,const bitset<bit_num>&data)noexcept(noexcept_text_ostream<stream_T>){
31091 return stream << to_string(data,get_bitset_representation_of(stream));
31092 }
31093
31094 //arithmetic input only for text_istream
31095 template<arithmetic_type T,text_istream stream_T> requires(type_info<remove_cvref<T>> != type_info<char_t> &&
31096 type_info<remove_cvref<T>> != type_info<bool>)
31097 inline decltype(auto)operator>>(stream_T&&stream,T&data)noexcept(noexcept_text_istream<stream_T>){
31098 string temp;
31099 stream >> temp;
31100 data=from_string_get<T>(temp,get_numerical_representation_of(stream));
31101 return stream;
31102 }
31103 template<typename T,text_istream stream_T> requires(type_info<T> == type_info<bool>)
31104 inline decltype(auto)operator>>(stream_T&&stream,T&data)noexcept(noexcept_text_istream<stream_T>){
31105 string temp;
31106 stream >> temp;
31107 const auto&representation=get_bool_representation_of(stream);
31108 if(temp==representation.get_true())
31109 data=true;
31110 elseif(temp==representation.get_false())
31111 data=false;
31112 else{
31113 if(temp.starts_with(representation.get_other_prefix())){
31114 temp.remove_front(representation.get_other_prefix().size());
31115 if(temp.ends_with(representation.get_other_suffix())){
31116 temp.remove_back(representation.get_other_suffix().size());
31117 data=union_cast<bool>(from_string_get<unsigned_specific_size_t<sizeof(bool)>>(temp,get_numerical_representation_of(stream)));
31118 }
31119 }
31120 }
31121 return stream;
31122 }
31123
31124 //T* output only for text_ostream
31125 template<typename T,text_ostream stream_T> requires(!::std::is_function_v<T>)
31126 inline decltype(auto)operator<<(stream_T&&stream,T*const&data)noexcept(noexcept_text_ostream<stream_T>){
31127 //output name of type at first
31128 stream << type_info<T>.get_name();
31129 if constexpr(::std::is_polymorphic_v<T> && !::std::is_final_v<T>){//RTTI
31130 const auto typeinfo = type_info_of(*data);
31131 if(typeinfo != type_info<T>)
31132 stream << ec("(") << typeinfo.get_name() << ec(")");
31133 }
31134 //output address
31135 stream << ec("@") << to_string((size_t)data,hexadecimal);
31136 return stream;
31137 }
31138 //function output only for text_ostream
31139 template<typename T,text_ostream stream_T> requires(::std::is_function_v<T>)
31140 inline decltype(auto)operator<<(stream_T&&stream,T*const&data)noexcept(noexcept_text_ostream<stream_T>){
31141 //output name of type at first
31142 stream << get_function_name(data);
31143 //output address
31144 stream << ec("@") << to_string((size_t)data,hexadecimal);
31145 return stream;
31146 }
31147
31148 }
31149
31150 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
31151//_undefs.hpp
31152/*
31153未完成的elc解释器basic文件
31154由steve02081504与Alex0125设计、编写
31155转载时请在不对此文件做任何修改的同时注明出处
31156项目地址:https://github.com/ELC-lang/ELC
31157*/
31158/*
31159 ,??????????????????????????
31160 ????????????????????????????
31161 ?????????????????????????????+
31162 ?????+++++++++++++++++++++++++
31163 ?????+++++++++++++++++++++++++
31164 ??????++++++++++++++++++++++++
31165 ?????++
31166 ?????+++
31167 ??????+++IIIIIIIIIIIIIIIIII
31168 ?????+++++IIIIIIIIIIIIIIIIII
31169 ?????++++++++++++++++++++++++
31170 ??????+++++++++++++++++++++++:
31171 ?????++
31172 ?????+++
31173 ??????++
31174 ??????????????????????????????II
31175 ??????????????????????????????IIII
31176 ,?????????????????????????????IIIII+
31177 =???++++++++++++++++++++++++++III?
31178 ?++++++++++++++++++++++++++++I+
31179*/
31180#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
31181//_undefs.hpp
31182/*
31183未完成的elc解释器_share文件
31184由steve02081504与Alex0125设计、编写
31185转载时请在不对此文件做任何修改的同时注明出处
31186项目地址:https://github.com/ELC-lang/ELC
31187*/
31188/*
31189 ,??????????????????????????
31190 ????????????????????????????
31191 ?????????????????????????????+
31192 ?????+++++++++++++++++++++++++
31193 ?????+++++++++++++++++++++++++
31194 ??????++++++++++++++++++++++++
31195 ?????++
31196 ?????+++
31197 ??????+++IIIIIIIIIIIIIIIIII
31198 ?????+++++IIIIIIIIIIIIIIIIII
31199 ?????++++++++++++++++++++++++
31200 ??????+++++++++++++++++++++++:
31201 ?????++
31202 ?????+++
31203 ??????++
31204 ??????????????????????????????II
31205 ??????????????????????????????IIII
31206 ,?????????????????????????????IIIII+
31207 =???++++++++++++++++++++++++++III?
31208 ?++++++++++++++++++++++++++++I+
31209*/
31210
31211//defs at "_defs.hpp"
31212
31213#if defined(_MSC_VER)
31214 #pragma warning(pop)
31215#endif
31216//#undef suppress_msvc_warning
31217#undef disable_msvc_warning
31218#undef push_msvc_warning
31219#undef pop_msvc_warning
31220#undef push_and_disable_msvc_warning
31221#if defined(_MSC_VER)
31222 #pragma pack(pop)
31223#endif
31224#if defined(__GNUC__)
31225 #pragma GCC diagnostic pop
31226#endif
31227#if defined(_MSC_VER)
31228 #pragma pop_macro("new")
31229 #pragma pop_macro("delete")
31230 #pragma pop_macro("min")
31231 #pragma pop_macro("max")
31232 #pragma pop_macro("abs")
31233 #pragma pop_macro("export")
31234 #pragma pop_macro("rand")
31235 #pragma pop_macro("sqrt")
31236 #pragma pop_macro("type_info")
31237 #pragma pop_macro("elc")
31238#endif
31239
31240//
31241#if defined(ELC_VOID_NAME)
31242 #define void the_void
31243#endif
31244//
31245#if defined(ELC_PUBLIC_ALL)
31246 #undef protected
31247 #undef private
31248#endif
31249//
31250#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
31251 #define rand the_rand
31252#endif
31253
31254// #undef often_noexcept
31255#undef noexcept_as
31256#undef noexcept_as_auto
31257#undef constexpr_as
31258#undef constexpr_as_auto
31259
31260#undef using_method_from_base_t
31261#undef using_method_from_value
31262
31263#undef floop
31264#undef times
31265#undef debug_times
31266#undef enable_adl
31267
31268#undef re_declvalue
31269#undef re_decltype
31270
31271#undef declvalue
31272
31273#undef template_error
31274#undef template_error_of_type
31275#undef template_warning
31276
31277#undef type_info_of
31278#undef type_name_of
31279
31280#undef is_common_attribute
31281#undef is_special_attribute
31282
31283#undef has_attribute
31284#undef not_has_attribute
31285
31286#undef float_size_of
31287#undef bitnum_of
31288
31289#undef def_common_attribute_with_nothing
31290#undef def_special_attribute_with_nothing
31291
31292#undef common_attribute_t
31293#undef special_attribute_t
31294
31295#undef enable_if
31296#undef enabled_by_default
31297#undef disabled_by_default
31298#undef enable_if_not_ill_form
31299#undef enable_flag
31300
31301#undef was_an_ill_form
31302#undef was_an_ill_form_with_parameter
31303#undef was_not_an_ill_form
31304#undef was_not_an_ill_form_and_noexcept
31305#undef was_not_an_ill_form_with_parameter
31306
31307#undef recursive_λ
31308#undef get_recursive_λ_caller
31309#undef λ
31310#undef exλ
31311#undef λ_with_catch
31312#undef self_recursion
31313#undef λ_RLSRRS
31314#undef λ_inline
31315#undef λ_force_inline
31316
31317#undef MAGIC
31318
31319#undef nothing
31320
31321#undef elseif
31322#undef _big_than_
31323#undef _small_than_
31324
31325#if defined(_MSC_VER)
31326 #undef not
31327 #undef and
31328 #undef or
31329#endif
31330
31331#undef INTER_NAMESPACE
31332#undef BREAK_NAMESPACE
31333
31334#undef szie
31335#undef form
31336
31337#undef template_name
31338#undef type_name
31339
31340#undef not_in_debug
31341
31342#undef es
31343#undef ec
31344
31345#undef ELC_TEST_EVENTNAME
31346
31347#undef override_instance_struct
31348
31349#undef distinctive
31350
31351#undef force_inline
31352
31353#undef with_no_vtable
31354
31355#undef in_consteval
31356
31357#undef no_vtable_struct
31358#undef no_vtable_class
31359
31360//#undef get_elc_defs
31361
31362//file_end
31363
31364#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
31365
31366//file_end
31367
31368 #line 155 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/arithmetic_text_io.hpp"
31369}
31370#endif
31371
31372//file_end
31373
31374 #line 61 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/base_stream/_body.hpp"
31375#endif
31376
31377//file_end
31378
31379 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
31380#endif
31381
31382//file_end
31383
31384 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
31385 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
31386//core
31387//at namespace ::
31388/*@
31389未完成的elc解释器include文件
31390由steve02081504与Alex0125设计、编写
31391转载时请在不对此文件做任何修改的同时注明出处
31392项目地址:https://github.com/ELC-lang/ELC
31393*/
31394/*
31395 ,??????????????????????????
31396 ????????????????????????????
31397 ?????????????????????????????+
31398 ?????+++++++++++++++++++++++++
31399 ?????+++++++++++++++++++++++++
31400 ??????++++++++++++++++++++++++
31401 ?????++
31402 ?????+++
31403 ??????+++IIIIIIIIIIIIIIIIII
31404 ?????+++++IIIIIIIIIIIIIIIIII
31405 ?????++++++++++++++++++++++++
31406 ??????+++++++++++++++++++++++:
31407 ?????++
31408 ?????+++
31409 ??????++
31410 ??????????????????????????????II
31411 ??????????????????????????????IIII
31412 ,?????????????????????????????IIIII+
31413 =???++++++++++++++++++++++++++III?
31414 ?++++++++++++++++++++++++++++I+
31415*/
31416#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
31417//pre_checks.hpp
31418/*
31419未完成的elc解释器_share文件
31420由steve02081504与Alex0125设计、编写
31421转载时请在不对此文件做任何修改的同时注明出处
31422项目地址:https://github.com/ELC-lang/ELC
31423*/
31424/*
31425 ,??????????????????????????
31426 ????????????????????????????
31427 ?????????????????????????????+
31428 ?????+++++++++++++++++++++++++
31429 ?????+++++++++++++++++++++++++
31430 ??????++++++++++++++++++++++++
31431 ?????++
31432 ?????+++
31433 ??????+++IIIIIIIIIIIIIIIIII
31434 ?????+++++IIIIIIIIIIIIIIIIII
31435 ?????++++++++++++++++++++++++
31436 ??????+++++++++++++++++++++++:
31437 ?????++
31438 ?????+++
31439 ??????++
31440 ??????????????????????????????II
31441 ??????????????????????????????IIII
31442 ,?????????????????????????????IIIII+
31443 =???++++++++++++++++++++++++++III?
31444 ?++++++++++++++++++++++++++++I+
31445*/
31446//__cplusplus needs 20+
31447#if !defined(__cplusplus)||__cplusplus<202002L
31448 //if msvc, check _MSVC_LANG
31449 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
31450 //ok
31451 #else
31452 #error "elc files needs c++20 or higher"
31453 #endif
31454#endif
31455
31456//check if the compiler is msvc
31457#if defined(_MSC_VER)
31458 //check if _CPPRTTI
31459 #if !defined(_CPPRTTI)
31460 #error "elc files needs rtti"
31461 #endif
31462 //check _MSC_VER at last 1932
31463 #if _MSC_VER<1932
31464 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
31465 #endif
31466#endif
31467
31468//file_end
31469
31470#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
31471#if !defined(ELC_CORE)
31472 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
31473//base
31474//at namespace ::
31475/*@
31476未完成的elc解释器include文件
31477由steve02081504与Alex0125设计、编写
31478转载时请在不对此文件做任何修改的同时注明出处
31479项目地址:https://github.com/ELC-lang/ELC
31480*/
31481/*
31482 ,??????????????????????????
31483 ????????????????????????????
31484 ?????????????????????????????+
31485 ?????+++++++++++++++++++++++++
31486 ?????+++++++++++++++++++++++++
31487 ??????++++++++++++++++++++++++
31488 ?????++
31489 ?????+++
31490 ??????+++IIIIIIIIIIIIIIIIII
31491 ?????+++++IIIIIIIIIIIIIIIIII
31492 ?????++++++++++++++++++++++++
31493 ??????+++++++++++++++++++++++:
31494 ?????++
31495 ?????+++
31496 ??????++
31497 ??????????????????????????????II
31498 ??????????????????????????????IIII
31499 ,?????????????????????????????IIIII+
31500 =???++++++++++++++++++++++++++III?
31501 ?++++++++++++++++++++++++++++I+
31502*/
31503#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
31504//pre_checks.hpp
31505/*
31506未完成的elc解释器_share文件
31507由steve02081504与Alex0125设计、编写
31508转载时请在不对此文件做任何修改的同时注明出处
31509项目地址:https://github.com/ELC-lang/ELC
31510*/
31511/*
31512 ,??????????????????????????
31513 ????????????????????????????
31514 ?????????????????????????????+
31515 ?????+++++++++++++++++++++++++
31516 ?????+++++++++++++++++++++++++
31517 ??????++++++++++++++++++++++++
31518 ?????++
31519 ?????+++
31520 ??????+++IIIIIIIIIIIIIIIIII
31521 ?????+++++IIIIIIIIIIIIIIIIII
31522 ?????++++++++++++++++++++++++
31523 ??????+++++++++++++++++++++++:
31524 ?????++
31525 ?????+++
31526 ??????++
31527 ??????????????????????????????II
31528 ??????????????????????????????IIII
31529 ,?????????????????????????????IIIII+
31530 =???++++++++++++++++++++++++++III?
31531 ?++++++++++++++++++++++++++++I+
31532*/
31533//__cplusplus needs 20+
31534#if !defined(__cplusplus)||__cplusplus<202002L
31535 //if msvc, check _MSVC_LANG
31536 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
31537 //ok
31538 #else
31539 #error "elc files needs c++20 or higher"
31540 #endif
31541#endif
31542
31543//check if the compiler is msvc
31544#if defined(_MSC_VER)
31545 //check if _CPPRTTI
31546 #if !defined(_CPPRTTI)
31547 #error "elc files needs rtti"
31548 #endif
31549 //check _MSC_VER at last 1932
31550 #if _MSC_VER<1932
31551 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
31552 #endif
31553#endif
31554
31555//file_end
31556
31557#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
31558#line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
31559
31560//file_end
31561
31562 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
31563 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
31564//base_exception
31565//at namespace ::
31566/*@
31567未完成的elc解释器include文件
31568由steve02081504与Alex0125设计、编写
31569转载时请在不对此文件做任何修改的同时注明出处
31570项目地址:https://github.com/ELC-lang/ELC
31571*/
31572/*
31573 ,??????????????????????????
31574 ????????????????????????????
31575 ?????????????????????????????+
31576 ?????+++++++++++++++++++++++++
31577 ?????+++++++++++++++++++++++++
31578 ??????++++++++++++++++++++++++
31579 ?????++
31580 ?????+++
31581 ??????+++IIIIIIIIIIIIIIIIII
31582 ?????+++++IIIIIIIIIIIIIIIIII
31583 ?????++++++++++++++++++++++++
31584 ??????+++++++++++++++++++++++:
31585 ?????++
31586 ?????+++
31587 ??????++
31588 ??????????????????????????????II
31589 ??????????????????????????????IIII
31590 ,?????????????????????????????IIIII+
31591 =???++++++++++++++++++++++++++III?
31592 ?++++++++++++++++++++++++++++I+
31593*/
31594#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
31595//pre_checks.hpp
31596/*
31597未完成的elc解释器_share文件
31598由steve02081504与Alex0125设计、编写
31599转载时请在不对此文件做任何修改的同时注明出处
31600项目地址:https://github.com/ELC-lang/ELC
31601*/
31602/*
31603 ,??????????????????????????
31604 ????????????????????????????
31605 ?????????????????????????????+
31606 ?????+++++++++++++++++++++++++
31607 ?????+++++++++++++++++++++++++
31608 ??????++++++++++++++++++++++++
31609 ?????++
31610 ?????+++
31611 ??????+++IIIIIIIIIIIIIIIIII
31612 ?????+++++IIIIIIIIIIIIIIIIII
31613 ?????++++++++++++++++++++++++
31614 ??????+++++++++++++++++++++++:
31615 ?????++
31616 ?????+++
31617 ??????++
31618 ??????????????????????????????II
31619 ??????????????????????????????IIII
31620 ,?????????????????????????????IIIII+
31621 =???++++++++++++++++++++++++++III?
31622 ?++++++++++++++++++++++++++++I+
31623*/
31624//__cplusplus needs 20+
31625#if !defined(__cplusplus)||__cplusplus<202002L
31626 //if msvc, check _MSVC_LANG
31627 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
31628 //ok
31629 #else
31630 #error "elc files needs c++20 or higher"
31631 #endif
31632#endif
31633
31634//check if the compiler is msvc
31635#if defined(_MSC_VER)
31636 //check if _CPPRTTI
31637 #if !defined(_CPPRTTI)
31638 #error "elc files needs rtti"
31639 #endif
31640 //check _MSC_VER at last 1932
31641 #if _MSC_VER<1932
31642 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
31643 #endif
31644#endif
31645
31646//file_end
31647
31648#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
31649#line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_exception"
31650
31651//file_end
31652
31653 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
31654 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
31655//base_stream
31656//at namespace ::
31657/*@
31658未完成的elc解释器include文件
31659由steve02081504与Alex0125设计、编写
31660转载时请在不对此文件做任何修改的同时注明出处
31661项目地址:https://github.com/ELC-lang/ELC
31662*/
31663/*
31664 ,??????????????????????????
31665 ????????????????????????????
31666 ?????????????????????????????+
31667 ?????+++++++++++++++++++++++++
31668 ?????+++++++++++++++++++++++++
31669 ??????++++++++++++++++++++++++
31670 ?????++
31671 ?????+++
31672 ??????+++IIIIIIIIIIIIIIIIII
31673 ?????+++++IIIIIIIIIIIIIIIIII
31674 ?????++++++++++++++++++++++++
31675 ??????+++++++++++++++++++++++:
31676 ?????++
31677 ?????+++
31678 ??????++
31679 ??????????????????????????????II
31680 ??????????????????????????????IIII
31681 ,?????????????????????????????IIIII+
31682 =???++++++++++++++++++++++++++III?
31683 ?++++++++++++++++++++++++++++I+
31684*/
31685#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
31686//pre_checks.hpp
31687/*
31688未完成的elc解释器_share文件
31689由steve02081504与Alex0125设计、编写
31690转载时请在不对此文件做任何修改的同时注明出处
31691项目地址:https://github.com/ELC-lang/ELC
31692*/
31693/*
31694 ,??????????????????????????
31695 ????????????????????????????
31696 ?????????????????????????????+
31697 ?????+++++++++++++++++++++++++
31698 ?????+++++++++++++++++++++++++
31699 ??????++++++++++++++++++++++++
31700 ?????++
31701 ?????+++
31702 ??????+++IIIIIIIIIIIIIIIIII
31703 ?????+++++IIIIIIIIIIIIIIIIII
31704 ?????++++++++++++++++++++++++
31705 ??????+++++++++++++++++++++++:
31706 ?????++
31707 ?????+++
31708 ??????++
31709 ??????????????????????????????II
31710 ??????????????????????????????IIII
31711 ,?????????????????????????????IIIII+
31712 =???++++++++++++++++++++++++++III?
31713 ?++++++++++++++++++++++++++++I+
31714*/
31715//__cplusplus needs 20+
31716#if !defined(__cplusplus)||__cplusplus<202002L
31717 //if msvc, check _MSVC_LANG
31718 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
31719 //ok
31720 #else
31721 #error "elc files needs c++20 or higher"
31722 #endif
31723#endif
31724
31725//check if the compiler is msvc
31726#if defined(_MSC_VER)
31727 //check if _CPPRTTI
31728 #if !defined(_CPPRTTI)
31729 #error "elc files needs rtti"
31730 #endif
31731 //check _MSC_VER at last 1932
31732 #if _MSC_VER<1932
31733 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
31734 #endif
31735#endif
31736
31737//file_end
31738
31739#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
31740#line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
31741
31742//file_end
31743
31744 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
31745 #define ELC_CORE
31746 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
31747//_body.hpp
31748//at namespace ::
31749/*
31750未完成的elc解释器core文件
31751由steve02081504与Alex0125设计、编写
31752转载时请在不对此文件做任何修改的同时注明出处
31753项目地址:https://github.com/ELC-lang/ELC
31754*/
31755/*
31756 ,??????????????????????????
31757 ????????????????????????????
31758 ?????????????????????????????+
31759 ?????+++++++++++++++++++++++++
31760 ?????+++++++++++++++++++++++++
31761 ??????++++++++++++++++++++++++
31762 ?????++
31763 ?????+++
31764 ??????+++IIIIIIIIIIIIIIIIII
31765 ?????+++++IIIIIIIIIIIIIIIIII
31766 ?????++++++++++++++++++++++++
31767 ??????+++++++++++++++++++++++:
31768 ?????++
31769 ?????+++
31770 ??????++
31771 ??????????????????????????????II
31772 ??????????????????????????????IIII
31773 ,?????????????????????????????IIIII+
31774 =???++++++++++++++++++++++++++III?
31775 ?++++++++++++++++++++++++++++I+
31776*/
31777#if defined(ELC_TEST)
31778 #error "this part cannot be tested."
31779#endif
31780namespace elc::defs{
31781 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
31782//_defs.hpp
31783/*
31784未完成的elc解释器basic文件
31785由steve02081504与Alex0125设计、编写
31786转载时请在不对此文件做任何修改的同时注明出处
31787项目地址:https://github.com/ELC-lang/ELC
31788*/
31789/*
31790 ,??????????????????????????
31791 ????????????????????????????
31792 ?????????????????????????????+
31793 ?????+++++++++++++++++++++++++
31794 ?????+++++++++++++++++++++++++
31795 ??????++++++++++++++++++++++++
31796 ?????++
31797 ?????+++
31798 ??????+++IIIIIIIIIIIIIIIIII
31799 ?????+++++IIIIIIIIIIIIIIIIII
31800 ?????++++++++++++++++++++++++
31801 ??????+++++++++++++++++++++++:
31802 ?????++
31803 ?????+++
31804 ??????++
31805 ??????????????????????????????II
31806 ??????????????????????????????IIII
31807 ,?????????????????????????????IIIII+
31808 =???++++++++++++++++++++++++++III?
31809 ?++++++++++++++++++++++++++++I+
31810*/
31811#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
31812//_defs.hpp
31813/*
31814未完成的elc解释器_share文件
31815由steve02081504与Alex0125设计、编写
31816转载时请在不对此文件做任何修改的同时注明出处
31817项目地址:https://github.com/ELC-lang/ELC
31818*/
31819/*
31820 ,??????????????????????????
31821 ????????????????????????????
31822 ?????????????????????????????+
31823 ?????+++++++++++++++++++++++++
31824 ?????+++++++++++++++++++++++++
31825 ??????++++++++++++++++++++++++
31826 ?????++
31827 ?????+++
31828 ??????+++IIIIIIIIIIIIIIIIII
31829 ?????+++++IIIIIIIIIIIIIIIIII
31830 ?????++++++++++++++++++++++++
31831 ??????+++++++++++++++++++++++:
31832 ?????++
31833 ?????+++
31834 ??????++
31835 ??????????????????????????????II
31836 ??????????????????????????????IIII
31837 ,?????????????????????????????IIIII+
31838 =???++++++++++++++++++++++++++III?
31839 ?++++++++++++++++++++++++++++I+
31840*/
31841
31842//undefs at "_undefs.hpp"
31843
31844#if defined(ELC_CODE_REALM)
31845 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
31846#endif
31847
31848//set ELC_WARNING_LEVEL default to 4(max)
31849#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
31850
31851#if defined(_MSC_VER)
31852 #pragma warning(push,ELC_WARNING_LEVEL)
31853 #pragma warning(disable:4099)//class与struct混用警告diss
31854 #pragma warning(disable:4584)//重复子类警告diss
31855 #pragma warning(disable:4250)//域控制继承警告diss
31856 #pragma warning(disable:26432)//不完全默认方法警告diss
31857 #pragma warning(disable:26435)//virtual override方法警告diss
31858 #pragma warning(disable:26481)//容器安利diss
31859 #pragma warning(disable:26446)//gsl::at安利diss
31860 #pragma warning(disable:26434)//方法覆盖警告diss
31861 #pragma warning(disable:26429)//gsl::not_null安利diss
31862 #pragma warning(disable:26471)//对void*进行static_cast安利diss
31863 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
31864 #pragma warning(disable:26473)//相同指针显式cast警告diss
31865 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
31866 #pragma warning(disable:26485)//数组作指针警告diss
31867 #pragma warning(disable:26490)//reinterpret_cast警告diss
31868 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
31869 #pragma warning(disable:26482)//非常数数组索引警告diss
31870 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
31871#endif
31872#if defined(__GNUC__)
31873 #pragma GCC diagnostic push
31874 #pragma GCC diagnostic warning "-Wall"//开启所有警告
31875 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
31876#endif
31877#if defined(_MSC_VER)
31878 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
31879 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
31880 #define push_msvc_warning() __pragma(warning(push))
31881 #define pop_msvc_warning() __pragma(warning(pop))
31882 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
31883#else
31884 //#define suppress_msvc_warning(...)
31885 #define disable_msvc_warning(...)
31886 #define push_msvc_warning()
31887 #define pop_msvc_warning()
31888 #define push_and_disable_msvc_warning(...)
31889#endif
31890#if defined(_MSC_VER)
31891 //push pack settings
31892 #pragma pack(push)
31893 #pragma pack()
31894#endif
31895#if defined(_MSC_VER)
31896 //push and undef common macros
31897 #pragma push_macro("new")
31898 #undef new
31899 #pragma push_macro("delete")
31900 #undef delete
31901 #pragma push_macro("min")
31902 #undef min
31903 #pragma push_macro("max")
31904 #undef max
31905 #pragma push_macro("abs")
31906 #undef abs
31907 #pragma push_macro("export")
31908 #undef export
31909 #pragma push_macro("rand")
31910 #undef rand
31911 #pragma push_macro("sqrt")
31912 #undef sqrt
31913 #pragma push_macro("type_info")
31914 #undef type_info
31915 #pragma push_macro("elc")
31916 #undef elc
31917#endif
31918//
31919#if defined(ELC_VOID_NAME)
31920 #undef void
31921#endif
31922//
31923#if defined(ELC_PUBLIC_ALL)
31924 #define protected public
31925 #define private public
31926#endif
31927//
31928#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
31929 #undef rand
31930#endif
31931
31932// #define often_noexcept
31933#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
31934#define noexcept_as_auto MAGIC//哦现在有了
31935#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
31936#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
31937
31938#define using_method_from_base_t(name,...) \
31939template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
31940auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
31941{\
31942 return base_t::name(forward<Args>(rest)...);\
31943}\
31944
31945#define using_method_from_value(name,value_name,...) \
31946template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
31947auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
31948{\
31949 return value_name.name(forward<Args>(rest)...);\
31950}\
31951
31952#define floop while(__builtin_is_my_dick_still_there())
31953#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
31954#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
31955#if defined(_MSC_VER) && _MSC_VER>=1935
31956 //@see https://developercommunity.visualstudio.com/t/10193638
31957 #define enable_adl(name) template<typename=void>void name()noexcept=delete
31958#else
31959 #define enable_adl(name) void name()noexcept=delete
31960#endif
31961
31962#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
31963#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
31964
31965#define declvalue(...) (::std::declval<__VA_ARGS__>())
31966
31968#define template_error(reason) static_assert(template_error_helper<T>,reason)
31970#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
31972#define template_warning(reason) template_warning_helper<T>(reason)
31973
31974//for type_info
31975#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
31976#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
31977
31978#define is_common_attribute(name) public attribute<T,name<T>>
31979#define is_special_attribute(name) public attribute<T,name>
31980
31981#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
31982#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
31983
31984//for float_size_t
31985#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
31986//bitnum_of
31987#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
31988
31989//for attribute
31990#define def_common_attribute_with_nothing(name) \
31991template<typename T>\
31992class name{}\
31993
31994#define def_special_attribute_with_nothing(name) \
31995class name{}\
31996
31997#define common_attribute_t template<class>class
31998#define special_attribute_t class
31999
32008#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
32010#define enabled_by_default class enable_state=void
32012#define disabled_by_default class enable_state= ::std::enable_if_t<false>
32014#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
32016#define enable_flag class enable_state
32017
32018#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
32019#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
32020#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
32021#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
32022#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
32023
32025#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
32027#define get_recursive_λ_caller(name,...) \
32028exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
32029 return name(name,Args...);\
32030}
32032#define λ []
32034#define exλ [&]
32036#define λ_with_catch(...) [__VA_ARGS__]
32038#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
32039//recursive_λ_self_referential_reserved_symbolname
32040#define λ_RLSRRS _my_jb_super_sb_name_
32041
32042#if defined(_MSC_VER) && !defined(__clang__)
32043 #define λ_inline [[msvc::forceinline]]
32044 #define λ_force_inline [[msvc::forceinline]]
32045#elif
32046 #define λ_inline [[gnu::always_inline]]
32047 #define λ_force_inline [[gnu::always_inline]]
32048#else
32049 #define λ_inline
32050 #define λ_force_inline
32051#endif
32052
32053#define MAGIC//ahh,ko no tenno da!
32054
32056#define nothing
32057
32059#define elseif else if
32061#define _big_than_ >
32063#define _small_than_ <
32064
32065#if defined(_MSC_VER)
32066 #define not !
32067 #define and &&
32068 #define or ||
32069#endif
32070
32072#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
32074#define BREAK_NAMESPACE }
32075
32077#define template_name template
32079#define type_name class
32080
32081#if defined(DEBUG) || defined(_DEBUG)
32082 #define not_in_debug 0
32083 #define in_debug 1
32084#else
32085 #define not_in_debug 1
32086 #define in_debug 0
32087#endif
32088
32089#define es U""
32090#define ec(ch) U ## ch
32091
32092#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
32093 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
32094#else
32095 #define ELC_TEST_EVENTNAME(name)
32096#endif
32097
32098#define override_instance_struct \
32099protected:\
32100 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
32101 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
32102 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
32103 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
32104 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
32105
32106#if defined(_MSC_VER) && !defined(__clang__)
32107 #define distinctive __declspec(dllexport)
32108#else
32109 #define distinctive
32110#endif
32111
32112#if defined(_MSC_VER) && !defined(__clang__)
32113 #define force_inline __forceinline
32114#elif defined(__GNUC__) || defined(__clang__)
32115 #define force_inline __attribute__((always_inline)) inline
32116#else
32117 #define force_inline inline
32118#endif
32119
32120#if defined(_MSC_VER) && !defined(__clang__)
32121 #define with_no_vtable __declspec(novtable)
32122#else
32123 #define with_no_vtable
32124#endif
32125
32126#define in_consteval (::std::is_constant_evaluated())
32127
32128#define no_vtable_struct struct with_no_vtable
32129#define no_vtable_class class with_no_vtable
32130
32131//#define get_elc_defs using namespace ::elc::defs
32132
32133//file_end
32134
32135#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
32136
32137//file_end
32138
32139 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
32140
32141 namespace core{
32142 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/_body.hpp"
32143//_body.hpp
32144//at namespace elc::defs::core
32145/*
32146未完成的elc解释器base文件
32147由steve02081504与Alex0125设计、编写
32148转载时请在不对此文件做任何修改的同时注明出处
32149项目地址:https://github.com/ELC-lang/ELC
32150*/
32151/*
32152 ,??????????????????????????
32153 ????????????????????????????
32154 ?????????????????????????????+
32155 ?????+++++++++++++++++++++++++
32156 ?????+++++++++++++++++++++++++
32157 ??????++++++++++++++++++++++++
32158 ?????++
32159 ?????+++
32160 ??????+++IIIIIIIIIIIIIIIIII
32161 ?????+++++IIIIIIIIIIIIIIIIII
32162 ?????++++++++++++++++++++++++
32163 ??????+++++++++++++++++++++++:
32164 ?????++
32165 ?????+++
32166 ??????++
32167 ??????????????????????????????II
32168 ??????????????????????????????IIII
32169 ,?????????????????????????????IIIII+
32170 =???++++++++++++++++++++++++++III?
32171 ?++++++++++++++++++++++++++++I+
32172*/
32173#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/decl.hpp"
32174//decl.hpp
32175//at namespace elc::defs::core
32176/*
32177未完成的elc解释器core文件
32178由steve02081504与Alex0125设计、编写
32179转载时请在不对此文件做任何修改的同时注明出处
32180项目地址:https://github.com/ELC-lang/ELC
32181*/
32182/*
32183 ,??????????????????????????
32184 ????????????????????????????
32185 ?????????????????????????????+
32186 ?????+++++++++++++++++++++++++
32187 ?????+++++++++++++++++++++++++
32188 ??????++++++++++++++++++++++++
32189 ?????++
32190 ?????+++
32191 ??????+++IIIIIIIIIIIIIIIIII
32192 ?????+++++IIIIIIIIIIIIIIIIII
32193 ?????++++++++++++++++++++++++
32194 ??????+++++++++++++++++++++++:
32195 ?????++
32196 ?????+++
32197 ??????++
32198 ??????????????????????????????II
32199 ??????????????????????????????IIII
32200 ,?????????????????????????????IIIII+
32201 =???++++++++++++++++++++++++++III?
32202 ?++++++++++++++++++++++++++++I+
32203*/
32204struct node_like;
32205typedef comn_ptr_t<node_like>ptr;
32206typedef weak_ptr_t<node_like>weak_ptr;
32207typedef comn_ptr_t<const node_like>const_ptr;
32208typedef weak_ptr_t<const node_like>const_weak_ptr;
32209struct value;
32210
32212namespace string_n{
32213 template<typename char_T>
32214 struct string_t;
32216 template<constexpr_str_n::constexpr_str_t_literal_helper str_helper>
32217 inline constexpr string operator""_elc_string()noexcept;
32218}
32219using string_n::string_t;
32220using string_n::string;
32221INTER_NAMESPACE(core)
32222
32223template<typename T>
32224[[nodiscard]]inline ptr make_long_term_binary_node_from(T a)noexcept;
32225
32226template<typename T>
32227constexpr bool as_ptr_nothrow_helper()noexcept{
32228 if constexpr(was_not_an_ill_form(ptr(&declvalue(T))))
32229 return noexcept(ptr(&declvalue(T)));
32231 return noexcept(const_ptr(&declvalue(T)));
32232 elseif constexpr(was_not_an_ill_form(static_cast<node_like&>(declvalue(T))))
32233 return noexcept(&static_cast<node_like&>(declvalue(T)));
32234 elseif constexpr(was_not_an_ill_form(static_cast<const node_like&>(declvalue(T))))
32235 return noexcept(&static_cast<const node_like&>(declvalue(T)));
32236 elseif constexpr(was_not_an_ill_form(static_cast<value&>(declvalue(T))))
32237 return noexcept(ptr(static_cast<value&>(declvalue(T))));
32238 elseif constexpr(was_not_an_ill_form(static_cast<const value&>(declvalue(T))))
32239 return noexcept(const_ptr(static_cast<value&>(declvalue(T))));
32240 elseif constexpr(was_not_an_ill_form(ptr(declvalue(T))))
32241 return noexcept(ptr(declvalue(T)));
32243 return noexcept(const_ptr(declvalue(T)));
32244 elseif constexpr(type_info<remove_cvref<T>> == type_info<char_t>)
32245 return noexcept(make_long_term_binary_node_from<char_t>(declvalue(T)));
32246 elseif constexpr(basic_integer_type<remove_cvref<T>>){
32247 if constexpr(signed_type<remove_cvref<T>>)
32248 return noexcept(make_long_term_binary_node_from<int_t>(declvalue(T)));
32249 else
32250 return noexcept(make_long_term_binary_node_from<uint_t>(declvalue(T)));
32251 }
32252 elseif constexpr(basic_float_type<remove_cvref<T>>)
32253 return noexcept(make_long_term_binary_node_from<float_t>(declvalue(T)));
32254 elseif constexpr(construct<string>.able<T>){
32255 return noexcept(make_long_term_binary_node_from<string>(declvalue(T)));
32256 }
32257}
32258template<typename T>
32259decltype(auto) as_ptr(T&&a)noexcept(as_ptr_nothrow_helper<T>()){
32260 ELC_TEST_EVENTNAME("as_ptr转换");
32261 if constexpr(was_not_an_ill_form(ptr(&a)))
32262 return ptr(&a);
32263 elseif constexpr(was_not_an_ill_form(const_ptr(&a)))
32264 return const_ptr(&a);
32265 elseif constexpr(was_not_an_ill_form(static_cast<node_like&>(a)))
32266 return &static_cast<node_like&>(a);
32267 elseif constexpr(was_not_an_ill_form(static_cast<const node_like&>(a)))
32268 return &static_cast<const node_like&>(a);
32269 elseif constexpr(was_not_an_ill_form(static_cast<value&>(a)))
32270 return ptr(static_cast<value&>(a));
32271 elseif constexpr(was_not_an_ill_form(static_cast<const value&>(a)))
32272 return const_ptr(static_cast<value&>(a));
32273 elseif constexpr(was_not_an_ill_form(ptr(a)))
32274 return ptr(a);
32275 elseif constexpr(was_not_an_ill_form(const_ptr(a)))
32276 return const_ptr(a);
32277 elseif constexpr(type_info<remove_cvref<T>> == type_info<char_t>)
32278 return make_long_term_binary_node_from<char_t>(a);
32279 elseif constexpr(basic_integer_type<remove_cvref<T>>){
32280 if constexpr(signed_type<remove_cvref<T>>)
32281 return make_long_term_binary_node_from<int_t>(a);
32282 else
32283 return make_long_term_binary_node_from<uint_t>(a);
32284 }
32285 elseif constexpr(basic_float_type<remove_cvref<T>>)
32286 return make_long_term_binary_node_from<float_t>(a);
32287 elseif constexpr(construct<string>.able<T>){
32288 return make_long_term_binary_node_from<string>(a);
32289 }
32290}
32291
32292template<typename T>
32293constexpr bool as_value_nothrow_helper()noexcept{
32294 if constexpr(was_not_an_ill_form(static_cast<value&>(declvalue(T))))
32295 return noexcept(static_cast<value&>(declvalue(T)));
32296 elseif constexpr(was_not_an_ill_form(static_cast<const value&>(declvalue(T))))
32297 return noexcept(static_cast<const value&>(declvalue(T)));
32299 if constexpr(type_info<decltype(as_ptr(declvalue(T)))> == type_info<ptr>)
32300 return noexcept(value(as_ptr(declvalue(T))));
32301 elseif constexpr(type_info<decltype(as_ptr(declvalue(T)))> == type_info<const_ptr>)
32302 return noexcept((const value)remove_const((const node_like*)as_ptr(declvalue(T))));
32303 }
32304}
32305template<typename T>
32306decltype(auto) as_value(T&& a)noexcept(as_value_nothrow_helper<T>()){
32307 ELC_TEST_EVENTNAME("as_value转换");
32308 if constexpr(was_not_an_ill_form(static_cast<value&>(a)))
32309 return static_cast<value&>(a);
32310 elseif constexpr(was_not_an_ill_form(static_cast<const value&>(a)))
32311 return static_cast<const value&>(a);
32313 if constexpr(type_info<decltype(as_ptr(declvalue(T)))> == type_info<ptr>)
32314 return value(as_ptr(forward<T>(a)));
32315 elseif constexpr(type_info<decltype(as_ptr(declvalue(T)))> == type_info<const_ptr>)
32316 return (const value)remove_const((const node_like*)as_ptr(forward<T>(a)));
32317 }
32318}
32319
32320//file_end
32321
32322#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/_body.hpp"
32323
32324#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/node_like.hpp"
32325//defs.hpp
32326//at namespace elc::defs::core
32327/*
32328未完成的elc解释器core文件
32329由steve02081504与Alex0125设计、编写
32330转载时请在不对此文件做任何修改的同时注明出处
32331项目地址:https://github.com/ELC-lang/ELC
32332*/
32333/*
32334 ,??????????????????????????
32335 ????????????????????????????
32336 ?????????????????????????????+
32337 ?????+++++++++++++++++++++++++
32338 ?????+++++++++++++++++++++++++
32339 ??????++++++++++++++++++++++++
32340 ?????++
32341 ?????+++
32342 ??????+++IIIIIIIIIIIIIIIIII
32343 ?????+++++IIIIIIIIIIIIIIIIII
32344 ?????++++++++++++++++++++++++
32345 ??????+++++++++++++++++++++++:
32346 ?????++
32347 ?????+++
32348 ??????++
32349 ??????????????????????????????II
32350 ??????????????????????????????IIII
32351 ,?????????????????????????????IIIII+
32352 =???++++++++++++++++++++++++++III?
32353 ?++++++++++++++++++++++++++++I+
32354*/
32355[[nodiscard]]inline ptr make_list()noexcept;
32356template<typename T,typename...Args>
32357[[nodiscard]]inline ptr make_list(T&&first,Args&&...rest);
32358
32360 with_common_attribute<abstract_base,weak_ref_able,replace_able,ref_able>{
32361public:
32363
32364 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept=0;
32365
32366 [[nodiscard]]virtual value be_eval();
32367 [[nodiscard]]virtual value be_call(ptr);
32368protected:
32369 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr)const noexcept=0;
32370 [[nodiscard]]virtual logical_bool was_eq_with(const_ptr a)const noexcept{return a.get()==this;}//不是a==this:ptr的opertaor==将调用在下方定义的pointer_equal,这会通过eq间接调用eq_with
32371 [[nodiscard]]virtual constexpr size_t equal_level()const noexcept{return 36;}
32372 [[nodiscard]]virtual constexpr size_t eq_level()const noexcept{return 36;}
32373public:
32374 node_like()noexcept=default;
32375 node_like(never_ref_num_zero_t)noexcept{ attribute_ptr_cast<ref_able>(this)->init_never_ref_num_zero(); }
32376 virtual ~node_like()=default;
32377
32378 [[nodiscard]]virtual value arec(const value)=0;
32379
32380 [[nodiscard]]value operator[](const value index);
32381 [[nodiscard]]value operator[](auto&&index){
32382 return operator[](as_value(index));
32383 }
32384
32385 virtual void clear()noexcept=0;
32386
32387 [[nodiscard]]virtual explicit operator hash_t()const noexcept{return hash((void*)this);}
32388 void destroy()noexcept{
32389 this->be_replace_as(null_ptr);
32390 }
32391 virtual void be_replace_as(ptr a)noexcept{
32392 this->clear();
32394 }
32395
32396 [[nodiscard]]virtual explicit operator logical_bool()const noexcept{return true;}
32397 [[nodiscard]]explicit operator bool()const noexcept{return(bool)this->operator logical_bool();}
32398
32399 template<typename...Args>
32400 inline value operator()(Args&&...rest){return this->be_call(make_list(forward<Args>(rest)...));}
32401
32402 [[nodiscard]]logical_bool eq_with(const_ptr a)const noexcept{
32403 const auto this_eqlv = this->eq_level();
32404 const auto arg_eqlv = a->eq_level();
32405 if(this_eqlv _small_than_ arg_eqlv)
32406 return a->was_eq_with(this);
32407 elseif(this_eqlv _big_than_ arg_eqlv)
32408 return this->was_eq_with(a);
32409 else
32410 return this->was_eq_with(a)&&a->was_eq_with(this);
32411 }
32412 [[nodiscard]]logical_bool equal_with(const_ptr a)const noexcept{
32413 const auto this_equlv = this->equal_level();
32414 const auto arg_equlv = a->equal_level();
32415 if(this_equlv _small_than_ arg_equlv)
32416 return a->was_equal_with(this);
32417 elseif(this_equlv _big_than_ arg_equlv)
32418 return this->was_equal_with(a);
32419 else
32420 return this->was_equal_with(a)&&a->was_equal_with(this);
32421 }
32422
32423 [[nodiscard]]ptr operator&()noexcept{return this;}
32424 [[nodiscard]]const_ptr operator&()const noexcept{return this;}
32425 [[nodiscard]]logical_bool operator==(const this_t&a)const noexcept{
32426 return a.equal_with(this);
32427 }
32428protected:
32429 friend void the_waiting_for_destroy(node_like* a)noexcept;
32430 virtual void waiting_for_destroy()noexcept{clear();}
32431};
32432
32433//base中的类型功能适应器
32434[[nodiscard]]inline constexpr node_like*the_get_null_ptr(const node_like*)noexcept;//{return&void;}
32435[[nodiscard]]inline logical_bool the_pointer_to_bool(const node_like*a)noexcept{
32436 return a->operator logical_bool();
32437}
32438[[nodiscard]]inline logical_bool the_pointer_equal(const node_like*a,const node_like*b)noexcept{
32439 return a->eq_with(b);
32440}
32441[[nodiscard]]inline hash_t the_pointer_hash(const node_like*a)noexcept{
32442 return a->operator hash_t();
32443}
32444//ptr中的类型功能适应器
32445inline void the_waiting_for_destroy(node_like*a)noexcept{
32446 a->waiting_for_destroy();
32447}
32448inline void the_destroy_and_free(node_like*a)noexcept{
32449 unget(a);
32450}
32451
32452//gc中的类型功能适应器
32453inline void the_destroy(node_like*a)noexcept{
32454 a->destroy();
32455}
32456
32457//file_end
32458
32459#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/_body.hpp"
32460#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/ptr.hpp"
32461//def.hpp
32462//at namespace elc::defs::core
32463/*
32464未完成的elc解释器core文件
32465由steve02081504与Alex0125设计、编写
32466转载时请在不对此文件做任何修改的同时注明出处
32467项目地址:https://github.com/ELC-lang/ELC
32468*/
32469/*
32470 ,??????????????????????????
32471 ????????????????????????????
32472 ?????????????????????????????+
32473 ?????+++++++++++++++++++++++++
32474 ?????+++++++++++++++++++++++++
32475 ??????++++++++++++++++++++++++
32476 ?????++
32477 ?????+++
32478 ??????+++IIIIIIIIIIIIIIIIII
32479 ?????+++++IIIIIIIIIIIIIIIIII
32480 ?????++++++++++++++++++++++++
32481 ??????+++++++++++++++++++++++:
32482 ?????++
32483 ?????+++
32484 ??????++
32485 ??????????????????????????????II
32486 ??????????????????????????????IIII
32487 ,?????????????????????????????IIIII+
32488 =???++++++++++++++++++++++++++III?
32489 ?++++++++++++++++++++++++++++I+
32490*/
32491typedef comn_ptr_t<node_like>ptr;
32492typedef weak_ptr_t<node_like>weak_ptr;
32493typedef comn_ptr_t<const node_like>const_ptr;
32494typedef weak_ptr_t<const node_like>const_weak_ptr;
32495
32496//file_end
32497
32498#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/_body.hpp"
32499#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/value.hpp"
32500//value.hpp
32501//at namespace elc::defs::core
32502/*
32503未完成的elc解释器core文件
32504由steve02081504与Alex0125设计、编写
32505转载时请在不对此文件做任何修改的同时注明出处
32506项目地址:https://github.com/ELC-lang/ELC
32507*/
32508/*
32509 ,??????????????????????????
32510 ????????????????????????????
32511 ?????????????????????????????+
32512 ?????+++++++++++++++++++++++++
32513 ?????+++++++++++++++++++++++++
32514 ??????++++++++++++++++++++++++
32515 ?????++
32516 ?????+++
32517 ??????+++IIIIIIIIIIIIIIIIII
32518 ?????+++++IIIIIIIIIIIIIIIIII
32519 ?????++++++++++++++++++++++++
32520 ??????+++++++++++++++++++++++:
32521 ?????++
32522 ?????+++
32523 ??????++
32524 ??????????????????????????????II
32525 ??????????????????????????????IIII
32526 ,?????????????????????????????IIIII+
32527 =???++++++++++++++++++++++++++III?
32528 ?++++++++++++++++++++++++++++I+
32529*/
32531 typedef value this_t;
32533 with_common_attribute<abstract_base,ref_able,never_in_array,replace_able>,
32535 /*//COMMIT:
32536 是否应当支持value data的引用计数?
32537 否的原因:
32538 这将导致应当对value的data加入gc机制(否则容易出现闭环value垃圾!)
32539 而这将严重增加elc的运行时时空负担
32540 有人可能得到递归引用的value
32541 是的原因:
32542 防御式编程
32543 更佳多样的value实现
32544 引用计数以降低value的复制开销
32545 对否定想法的驳回:
32546 严重增加elc的运行时时空负担?:value的复制开销可能更大
32547 有人可能得到递归引用的value?这将导致应当对value的data加入gc机制?:
32548 没见哪个语言不允许写while(true)
32549 自定义value的应该都是聪明人,如果真的会出现循环引用那他们自己解决就好
32550 总结:
32551 加引用计数,但不加gc
32552 elc的设计理念包括“不应禁止用户做什么”,所以应当提供高自由度的value定制可能
32553 但出于性能考虑,不加gc
32554 如果真的有需要gc解决的value data那么让那聪明的设计者自己给自己的data类加gc解决这种问题就好
32555 */
32556 base_data_t()noexcept=default;
32557 base_data_t(never_ref_num_zero_t)noexcept{ attribute_ptr_cast<ref_able>(this)->init_never_ref_num_zero(); }
32558 virtual ~base_data_t()noexcept=default;
32559
32560 virtual void be_set(ptr)=0;
32561 [[nodiscard]]virtual ptr get_value()=0;
32562 [[nodiscard]]virtual base_data_t*copy()const noexcept=0;
32563 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept=0;//为什么要加这个?我不知道,万一将来有人用上了呢?
32564 };
32565
32566 distinctive static inline struct null_data_t final:instance_struct<null_data_t>
32568 null_data_t()noexcept:value::base_data_t(never_ref_num_zero){}
32569 virtual ~null_data_t()noexcept override final=default;
32570
32571 virtual void be_set(ptr a)noexcept override final{}
32572 [[nodiscard]]virtual ptr get_value()noexcept override final{return null_ptr;}
32573 [[nodiscard]]virtual base_data_t*copy()const noexcept override final{return remove_const(this);}
32574 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<null_data_t>;}
32575 }null_data{};
32576
32577 struct constexpr_data_t final:instance_struct<constexpr_data_t>
32578 ,base_data_t{
32580 constexpr_data_t(ptr a)noexcept:_m(a){}
32581 constexpr_data_t(const constexpr_data_t&)noexcept=default;
32582 virtual ~constexpr_data_t()noexcept override final=default;
32583
32584 virtual void be_set(ptr)noexcept override final{}
32585 [[nodiscard]]virtual ptr get_value()noexcept override final{return _m;}
32586 [[nodiscard]]virtual base_data_t*copy()const noexcept override final{return get<constexpr_data_t>(_m);}
32587 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<constexpr_data_t>;}
32588 };
32589
32590 struct variable_data_t final:instance_struct<variable_data_t>
32591 ,base_data_t{
32593 variable_data_t(ptr a)noexcept:_m(a){}
32594 variable_data_t(const variable_data_t&)noexcept=default;
32595 virtual ~variable_data_t()noexcept override final=default;
32596
32597 virtual void be_set(ptr a)noexcept override final{_m=a;}
32598 [[nodiscard]]virtual ptr get_value()noexcept override final{return _m;}
32599 [[nodiscard]]virtual base_data_t*copy()const noexcept override final{return get<variable_data_t>(_m);}
32600 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<variable_data_t>;}
32601 };
32602private:
32603 mutable comn_ptr_t<base_data_t> _m;
32604public:
32605 explicit value()noexcept:_m(get<variable_data_t>(null_ptr)){}
32606 constexpr explicit value(special_init_t)noexcept:_m(null_ptr){}
32607 explicit value(ptr a)noexcept:_m(get<constexpr_data_t>(a)){}
32608 explicit value(node_like* a)noexcept:value(ptr(a)){}
32609 value(base_data_t*a)noexcept:_m(a){}
32610
32611 value(const this_t&a)noexcept=default;
32612 value(this_t&&a)noexcept=default;
32613 ~value()noexcept=default;
32614
32615 this_t&operator=(ptr a){
32616 _m->be_set(a);
32617 return *this;
32618 }
32620 return operator=(as_ptr(a));
32621 }
32622
32623 [[nodiscard]]operator ptr(){
32624 return _m->get_value();
32625 }
32626 [[nodiscard]]operator const_ptr()const{
32627 return _m->get_value();
32628 }
32629 [[nodiscard]]ptr operator&(){
32630 return operator ptr();
32631 }
32632 [[nodiscard]]const_ptr operator&()const{
32633 return operator const_ptr();
32634 }
32635 [[nodiscard]]explicit operator bool()const{return bool(_m->get_value());}
32636
32637 void ref_to(this_t a)noexcept{
32638 _m.do_replace(a._m);
32639 }
32640 void un_ref()noexcept{
32641 _m=_m->copy();
32642 }
32643 void re_ref_to(this_t a)noexcept{
32644 _m=a._m;
32645 }
32647 a.ref_to(*this);
32648 return*this;
32649 }
32650
32651 template<typename T>
32652 [[nodiscard]]auto operator[](T&&index){
32653 return (*operator&())[forward<T>(index)];
32654 }
32655 template<typename...Args> requires(invoke<node_like>.able<Args...>)
32656 inline auto operator()(Args&&... rest)noexcept(invoke<node_like>.nothrow<Args...>){return(*operator&())(forward<Args>(rest)...);}
32657 [[nodiscard]]auto operator==(auto&&a)const noexcept{
32658 try{
32659 return const_ptr(*this) == const_ptr(as_value(a));
32660 }
32661 catch(...){
32662 return unknown;
32663 }
32664 }
32665 [[nodiscard]]auto operator!=(auto&&a)const{
32666 return !operator==(a);
32667 }
32668 [[nodiscard]]operator ptr::for_delete_t*(){
32669 return _m->get_value();
32670 }
32671};
32672
32673static value::base_data_t*the_get_null_ptr(const value::base_data_t*)noexcept{
32674 return&value::null_data;
32675}
32676
32678
32679INTER_NAMESPACE(base)
32680template<>
32681distinctive inline core::value const_default_value_of<core::value>{special_init};
32683
32684INTER_NAMESPACE(core)
32685
32686//file_end
32687
32688#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/_body.hpp"
32689
32690#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/node_like_using_value_func_defs.hpp"
32691//defs.hpp
32692//at namespace elc::defs::core
32693/*
32694未完成的elc解释器core文件
32695由steve02081504与Alex0125设计、编写
32696转载时请在不对此文件做任何修改的同时注明出处
32697项目地址:https://github.com/ELC-lang/ELC
32698*/
32699/*
32700 ,??????????????????????????
32701 ????????????????????????????
32702 ?????????????????????????????+
32703 ?????+++++++++++++++++++++++++
32704 ?????+++++++++++++++++++++++++
32705 ??????++++++++++++++++++++++++
32706 ?????++
32707 ?????+++
32708 ??????+++IIIIIIIIIIIIIIIIII
32709 ?????+++++IIIIIIIIIIIIIIIIII
32710 ?????++++++++++++++++++++++++
32711 ??????+++++++++++++++++++++++:
32712 ?????++
32713 ?????+++
32714 ??????++
32715 ??????????????????????????????II
32716 ??????????????????????????????IIII
32717 ,?????????????????????????????IIIII+
32718 =???++++++++++++++++++++++++++III?
32719 ?++++++++++++++++++++++++++++I+
32720*/
32721push_and_disable_msvc_warning(26440);//nothrow警告diss
32722[[nodiscard]]inline value node_like::be_eval(){
32723 return value(this);
32724}
32725[[nodiscard]]inline value node_like::be_call(ptr){
32726 return value(this);
32727}
32729
32730[[nodiscard]]inline value node_like::operator[](const value index){
32731 return arec(index);
32732}
32733
32734//file_end
32735
32736#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/base_def/_body.hpp"
32737
32738//file_end
32739
32740 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
32741 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/runtime_exception/_body.hpp"
32742//_body.hpp
32743//at namespace elc::defs::base
32744/*
32745未完成的elc解释器base文件
32746由steve02081504与Alex0125设计、编写
32747转载时请在不对此文件做任何修改的同时注明出处
32748项目地址:https://github.com/ELC-lang/ELC
32749*/
32750/*
32751 ,??????????????????????????
32752 ????????????????????????????
32753 ?????????????????????????????+
32754 ?????+++++++++++++++++++++++++
32755 ?????+++++++++++++++++++++++++
32756 ??????++++++++++++++++++++++++
32757 ?????++
32758 ?????+++
32759 ??????+++IIIIIIIIIIIIIIIIII
32760 ?????+++++IIIIIIIIIIIIIIIIII
32761 ?????++++++++++++++++++++++++
32762 ??????+++++++++++++++++++++++:
32763 ?????++
32764 ?????+++
32765 ??????++
32766 ??????????????????????????????II
32767 ??????????????????????????????IIII
32768 ,?????????????????????????????IIIII+
32769 =???++++++++++++++++++++++++++III?
32770 ?++++++++++++++++++++++++++++I+
32771*/
32772#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/runtime_exception/base_runtime_exception.hpp"
32773//base_runtime_exception.hpp
32774//at namespace elc::defs::base
32775/*
32776未完成的elc解释器base文件
32777由steve02081504与Alex0125设计、编写
32778转载时请在不对此文件做任何修改的同时注明出处
32779项目地址:https://github.com/ELC-lang/ELC
32780*/
32781/*
32782 ,??????????????????????????
32783 ????????????????????????????
32784 ?????????????????????????????+
32785 ?????+++++++++++++++++++++++++
32786 ?????+++++++++++++++++++++++++
32787 ??????++++++++++++++++++++++++
32788 ?????++
32789 ?????+++
32790 ??????+++IIIIIIIIIIIIIIIIII
32791 ?????+++++IIIIIIIIIIIIIIIIII
32792 ?????++++++++++++++++++++++++
32793 ??????+++++++++++++++++++++++:
32794 ?????++
32795 ?????+++
32796 ??????++
32797 ??????????????????????????????II
32798 ??????????????????????????????IIII
32799 ,?????????????????????????????IIIII+
32800 =???++++++++++++++++++++++++++III?
32801 ?++++++++++++++++++++++++++++I+
32802*/
32803struct base_runtime_exception:runtime_exception{
32804 using runtime_exception::runtime_exception;
32805};
32806
32807//file_end
32808
32809#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/runtime_exception/_body.hpp"
32810#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/runtime_exception/core_runtime_internal_helper.hpp"
32811//_body.hpp
32812//at namespace elc::defs::base
32813/*
32814未完成的elc解释器base文件
32815由steve02081504与Alex0125设计、编写
32816转载时请在不对此文件做任何修改的同时注明出处
32817项目地址:https://github.com/ELC-lang/ELC
32818*/
32819/*
32820 ,??????????????????????????
32821 ????????????????????????????
32822 ?????????????????????????????+
32823 ?????+++++++++++++++++++++++++
32824 ?????+++++++++++++++++++++++++
32825 ??????++++++++++++++++++++++++
32826 ?????++
32827 ?????+++
32828 ??????+++IIIIIIIIIIIIIIIIII
32829 ?????+++++IIIIIIIIIIIIIIIIII
32830 ?????++++++++++++++++++++++++
32831 ??????+++++++++++++++++++++++:
32832 ?????++
32833 ?????+++
32834 ??????++
32835 ??????????????????????????????II
32836 ??????????????????????????????IIII
32837 ,?????????????????????????????IIIII+
32838 =???++++++++++++++++++++++++++III?
32839 ?++++++++++++++++++++++++++++I+
32840*/
32841namespace core_runtime_internal_helper_n{
32843 using base_runtime_exception::base_runtime_exception;
32844 constexpr base_t()noexcept:
32845 base_runtime_exception(locale::str::exception::core_runtime_internal_helper_leak){}
32846 };
32847 //
32850 };
32852}
32853//#include ".hpp"
32854
32855//file_end
32856
32857#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/runtime_exception/_body.hpp"
32858
32859//file_end
32860
32861 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
32862 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/_body.hpp"
32863//_body.hpp
32864//at namespace elc::defs::base
32865/*
32866未完成的elc解释器base文件
32867由steve02081504与Alex0125设计、编写
32868转载时请在不对此文件做任何修改的同时注明出处
32869项目地址:https://github.com/ELC-lang/ELC
32870*/
32871/*
32872 ,??????????????????????????
32873 ????????????????????????????
32874 ?????????????????????????????+
32875 ?????+++++++++++++++++++++++++
32876 ?????+++++++++++++++++++++++++
32877 ??????++++++++++++++++++++++++
32878 ?????++
32879 ?????+++
32880 ??????+++IIIIIIIIIIIIIIIIII
32881 ?????+++++IIIIIIIIIIIIIIIIII
32882 ?????++++++++++++++++++++++++
32883 ??????+++++++++++++++++++++++:
32884 ?????++
32885 ?????+++
32886 ??????++
32887 ??????????????????????????????II
32888 ??????????????????????????????IIII
32889 ,?????????????????????????????IIIII+
32890 =???++++++++++++++++++++++++++III?
32891 ?++++++++++++++++++++++++++++I+
32892*/
32893#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/base_constexpr.hpp"
32894//base_constexpr.hpp
32895//at namespace elc::defs::core
32896/*
32897未完成的elc解释器base文件
32898由steve02081504与Alex0125设计、编写
32899转载时请在不对此文件做任何修改的同时注明出处
32900项目地址:https://github.com/ELC-lang/ELC
32901*/
32902/*
32903 ,??????????????????????????
32904 ????????????????????????????
32905 ?????????????????????????????+
32906 ?????+++++++++++++++++++++++++
32907 ?????+++++++++++++++++++++++++
32908 ??????++++++++++++++++++++++++
32909 ?????++
32910 ?????+++
32911 ??????+++IIIIIIIIIIIIIIIIII
32912 ?????+++++IIIIIIIIIIIIIIIIII
32913 ?????++++++++++++++++++++++++
32914 ??????+++++++++++++++++++++++:
32915 ?????++
32916 ?????+++
32917 ??????++
32918 ??????????????????????????????II
32919 ??????????????????????????????IIII
32920 ,?????????????????????????????IIIII+
32921 =???++++++++++++++++++++++++++III?
32922 ?++++++++++++++++++++++++++++I+
32923*/
32924struct base_constexpr_t:node_like,instance_struct<base_constexpr_t>{
32925 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<base_constexpr_t>;}
32926protected:
32927 [[nodiscard]]virtual constexpr size_t equal_level()const noexcept override{return magic_number::god;}
32928 [[nodiscard]]virtual constexpr size_t eq_level()const noexcept override{return magic_number::god;}
32929public:
32930 base_constexpr_t()noexcept:node_like(never_ref_num_zero){}
32931 constexpr virtual ~base_constexpr_t()noexcept override=default;
32932
32933 [[nodiscard]]virtual value arec(const value)noexcept override{return value(this);}
32934
32935 virtual void clear()noexcept override final{nothing}
32936
32937 virtual void be_replace_as(ptr)noexcept override{nothing}
32938};
32939
32940//file_end
32941
32942#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/_body.hpp"
32943#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/void.hpp"
32944//void.hpp
32945//at namespace elc::defs::core
32946/*
32947未完成的elc解释器base文件
32948由steve02081504与Alex0125设计、编写
32949转载时请在不对此文件做任何修改的同时注明出处
32950项目地址:https://github.com/ELC-lang/ELC
32951*/
32952/*
32953 ,??????????????????????????
32954 ????????????????????????????
32955 ?????????????????????????????+
32956 ?????+++++++++++++++++++++++++
32957 ?????+++++++++++++++++++++++++
32958 ??????++++++++++++++++++++++++
32959 ?????++
32960 ?????+++
32961 ??????+++IIIIIIIIIIIIIIIIII
32962 ?????+++++IIIIIIIIIIIIIIIIII
32963 ?????++++++++++++++++++++++++
32964 ??????+++++++++++++++++++++++:
32965 ?????++
32966 ?????+++
32967 ??????++
32968 ??????????????????????????????II
32969 ??????????????????????????????IIII
32970 ,?????????????????????????????IIIII+
32971 =???++++++++++++++++++++++++++III?
32972 ?++++++++++++++++++++++++++++I+
32973*/
32974/*
32975使用elc::the_void来访问此值
32976或者通过包含<elc/void_name>来使用elc::void访问此值,并使用::void来访问c艹的原生void
32977*/
32979 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<void_t>;}
32980protected:
32981 [[nodiscard]]virtual constexpr size_t equal_level()const noexcept override{return max(type_info<size_t>);}
32982 [[nodiscard]]virtual constexpr size_t eq_level()const noexcept override{return max(type_info<size_t>);}
32983 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{
32984 if(this==a)
32985 return either;//当void是void时,void不是void
32986 else
32987 return neither;//当a不是void时,void是a
32988 }
32989 //我不知道为什么这么写,反正很有趣
32990public:
32991 [[nodiscard]]virtual constexpr explicit operator hash_t()const noexcept override{return hash(nothing);}
32992 [[nodiscard]]virtual constexpr explicit operator logical_bool()const noexcept override{return neither;}//void 应当不真不假
32994
32995[[nodiscard]]constexpr node_like*the_get_null_ptr(const node_like*)noexcept{return addressof((node_like&)the_void);}
32996
32997//file_end
32998
32999#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/_body.hpp"
33000#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/nil.hpp"
33001//nil.hpp
33002//at namespace elc::defs::core
33003/*
33004未完成的elc解释器base文件
33005由steve02081504与Alex0125设计、编写
33006转载时请在不对此文件做任何修改的同时注明出处
33007项目地址:https://github.com/ELC-lang/ELC
33008*/
33009/*
33010 ,??????????????????????????
33011 ????????????????????????????
33012 ?????????????????????????????+
33013 ?????+++++++++++++++++++++++++
33014 ?????+++++++++++++++++++++++++
33015 ??????++++++++++++++++++++++++
33016 ?????++
33017 ?????+++
33018 ??????+++IIIIIIIIIIIIIIIIII
33019 ?????+++++IIIIIIIIIIIIIIIIII
33020 ?????++++++++++++++++++++++++
33021 ??????+++++++++++++++++++++++:
33022 ?????++
33023 ?????+++
33024 ??????++
33025 ??????????????????????????????II
33026 ??????????????????????????????IIII
33027 ,?????????????????????????????IIIII+
33028 =???++++++++++++++++++++++++++III?
33029 ?++++++++++++++++++++++++++++I+
33030*/
33032 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<nil_t>;}
33033protected:
33034 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{return !logical_bool(a);}
33035public:
33036 [[nodiscard]]virtual constexpr explicit operator hash_t()const noexcept override{return hash(false);}
33037 [[nodiscard]]virtual constexpr explicit operator logical_bool()const noexcept override{return false;}
33038}nil{};
33039
33040//file_end
33041
33042#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/_body.hpp"
33043#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/t.hpp"
33044//t.hpp
33045//at namespace elc::defs::core
33046/*
33047未完成的elc解释器base文件
33048由steve02081504与Alex0125设计、编写
33049转载时请在不对此文件做任何修改的同时注明出处
33050项目地址:https://github.com/ELC-lang/ELC
33051*/
33052/*
33053 ,??????????????????????????
33054 ????????????????????????????
33055 ?????????????????????????????+
33056 ?????+++++++++++++++++++++++++
33057 ?????+++++++++++++++++++++++++
33058 ??????++++++++++++++++++++++++
33059 ?????++
33060 ?????+++
33061 ??????+++IIIIIIIIIIIIIIIIII
33062 ?????+++++IIIIIIIIIIIIIIIIII
33063 ?????++++++++++++++++++++++++
33064 ??????+++++++++++++++++++++++:
33065 ?????++
33066 ?????+++
33067 ??????++
33068 ??????????????????????????????II
33069 ??????????????????????????????IIII
33070 ,?????????????????????????????IIIII+
33071 =???++++++++++++++++++++++++++III?
33072 ?++++++++++++++++++++++++++++I+
33073*/
33075 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<t_t>;}
33076protected:
33077 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{return logical_bool(a);}
33078public:
33079 [[nodiscard]]virtual constexpr explicit operator hash_t()const noexcept override{return hash(true);}
33080 [[nodiscard]]virtual constexpr explicit operator logical_bool()const noexcept override{return true;}
33081
33082 //nothing is true,everything is permitted.
33083 [[noreturn]]virtual void be_replace_as(ptr)noexcept override{::std::exit(0);}
33084}t{};
33085
33086//file_end
33087
33088#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/special_values/_body.hpp"
33089
33090//file_end
33091
33092 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
33093 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33094//_body.hpp
33095//at namespace elc::defs::core
33096/*
33097未完成的elc解释器core文件
33098由steve02081504与Alex0125设计、编写
33099转载时请在不对此文件做任何修改的同时注明出处
33100项目地址:https://github.com/ELC-lang/ELC
33101*/
33102/*
33103 ,??????????????????????????
33104 ????????????????????????????
33105 ?????????????????????????????+
33106 ?????+++++++++++++++++++++++++
33107 ?????+++++++++++++++++++++++++
33108 ??????++++++++++++++++++++++++
33109 ?????++
33110 ?????+++
33111 ??????+++IIIIIIIIIIIIIIIIII
33112 ?????+++++IIIIIIIIIIIIIIIIII
33113 ?????++++++++++++++++++++++++
33114 ??????+++++++++++++++++++++++:
33115 ?????++
33116 ?????+++
33117 ??????++
33118 ??????????????????????????????II
33119 ??????????????????????????????IIII
33120 ,?????????????????????????????IIIII+
33121 =???++++++++++++++++++++++++++III?
33122 ?++++++++++++++++++++++++++++I+
33123*/
33124#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/common_node.hpp"
33125//common_node.hpp
33126//at namespace elc::defs::core
33127/*
33128未完成的elc解释器core文件
33129由steve02081504与Alex0125设计、编写
33130转载时请在不对此文件做任何修改的同时注明出处
33131项目地址:https://github.com/ELC-lang/ELC
33132*/
33133/*
33134 ,??????????????????????????
33135 ????????????????????????????
33136 ?????????????????????????????+
33137 ?????+++++++++++++++++++++++++
33138 ?????+++++++++++++++++++++++++
33139 ??????++++++++++++++++++++++++
33140 ?????++
33141 ?????+++
33142 ??????+++IIIIIIIIIIIIIIIIII
33143 ?????+++++IIIIIIIIIIIIIIIIII
33144 ?????++++++++++++++++++++++++
33145 ??????+++++++++++++++++++++++:
33146 ?????++
33147 ?????+++
33148 ??????++
33149 ??????????????????????????????II
33150 ??????????????????????????????IIII
33151 ,?????????????????????????????IIIII+
33152 =???++++++++++++++++++++++++++III?
33153 ?++++++++++++++++++++++++++++I+
33154*/
33155struct common_node:node_like,instance_struct<common_node>{
33157
33158 map_t<value,const_weak_ptr> _m;
33159
33160 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<this_t>;}
33161protected:
33162 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{
33163 if(a->get_type_info() != this->get_type_info())
33164 return false;
33165 const this_t*p=down_cast<const this_t*>(a.get());
33166 return _m==p->_m;
33167 }
33168public:
33169 [[nodiscard]]virtual value arec(const value index)override{return _m[&index];}
33170
33171 virtual void clear()noexcept override{_m.clear();}
33172};
33173
33174//file_end
33175
33176#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33177#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/cons.hpp"
33178//common_node.hpp
33179//at namespace elc::defs::core
33180/*
33181未完成的elc解释器core文件
33182由steve02081504与Alex0125设计、编写
33183转载时请在不对此文件做任何修改的同时注明出处
33184项目地址:https://github.com/ELC-lang/ELC
33185*/
33186/*
33187 ,??????????????????????????
33188 ????????????????????????????
33189 ?????????????????????????????+
33190 ?????+++++++++++++++++++++++++
33191 ?????+++++++++++++++++++++++++
33192 ??????++++++++++++++++++++++++
33193 ?????++
33194 ?????+++
33195 ??????+++IIIIIIIIIIIIIIIIII
33196 ?????+++++IIIIIIIIIIIIIIIIII
33197 ?????++++++++++++++++++++++++
33198 ??????+++++++++++++++++++++++:
33199 ?????++
33200 ?????+++
33201 ??????++
33202 ??????????????????????????????II
33203 ??????????????????????????????IIII
33204 ,?????????????????????????????IIIII+
33205 =???++++++++++++++++++++++++++III?
33206 ?++++++++++++++++++++++++++++I+
33207*/
33208inline value car_of(ptr p){
33209 return (*p)[t];
33210}
33211inline value cdr_of(ptr p){
33212 return (*p)[nil];
33213}
33214inline value car_of(auto&&node){
33215 return car_of(as_ptr(node));
33216}
33217inline value cdr_of(auto&&node){
33218 return cdr_of(as_ptr(node));
33219}
33220
33221struct cons:node_like,instance_struct<cons>{
33222 typedef cons this_t;
33223
33226
33227 cons(ptr car,ptr cdr){
33228 _car = car;
33229 _cdr = cdr;
33230 }
33231
33232 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<cons>;}
33233protected:
33234 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{
33235 if(a->get_type_info() != this->get_type_info())
33236 return false;
33237 const this_t*p=down_cast<const this_t*>(a.get());
33238 return _car==p->_car&&_cdr==p->_cdr;
33239 }
33240public:
33241 [[nodiscard]]virtual value arec(const value index)override{
33242 const_ptr v=index;
33243 if(v==&nil)
33244 return _cdr;
33245 elseif(v==&t)
33246 return _car;
33247 else{
33248 ptr to=get<common_node>();
33249 _car >> car_of(to);
33250 _cdr >> cdr_of(to);
33251 be_replace_as(to);
33252 return (*to)[v];
33253 }
33254 }
33255
33256 virtual void clear()noexcept override{as_value(&the_void)>>_car>>_cdr;}
33257};
33258
33259[[nodiscard]]inline ptr make_list()noexcept{return &nil;}
33260template<typename T,typename...Args>
33261[[nodiscard]]inline ptr make_list(T&&first,Args&&...rest){
33262 ELC_TEST_EVENTNAME("make_list调用");
33263 return get<cons>(as_ptr(first),make_list(forward<Args>(rest)...));
33264}
33265
33266//file_end
33267
33268#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33269#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/expr.hpp"
33270//expr.hpp
33271//at namespace elc::defs::core
33272/*
33273未完成的elc解释器core文件
33274由steve02081504与Alex0125设计、编写
33275转载时请在不对此文件做任何修改的同时注明出处
33276项目地址:https://github.com/ELC-lang/ELC
33277*/
33278/*
33279 ,??????????????????????????
33280 ????????????????????????????
33281 ?????????????????????????????+
33282 ?????+++++++++++++++++++++++++
33283 ?????+++++++++++++++++++++++++
33284 ??????++++++++++++++++++++++++
33285 ?????++
33286 ?????+++
33287 ??????+++IIIIIIIIIIIIIIIIII
33288 ?????+++++IIIIIIIIIIIIIIIIII
33289 ?????++++++++++++++++++++++++
33290 ??????+++++++++++++++++++++++:
33291 ?????++
33292 ?????+++
33293 ??????++
33294 ??????????????????????????????II
33295 ??????????????????????????????IIII
33296 ,?????????????????????????????IIIII+
33297 =???++++++++++++++++++++++++++III?
33298 ?++++++++++++++++++++++++++++I+
33299*/
33300struct expr:cons,instance_struct<expr>{
33301 typedef expr this_t;
33303public:
33304 using cons::_car;
33305 using cons::_cdr;
33306 using cons::cons;
33307
33308 [[nodiscard]]virtual value be_eval()override{
33309 return as_ptr(_car)->be_call(_cdr);
33310 }
33311 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<expr>;}
33312};
33313
33314//file_end
33315
33316#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33317#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/base_binary_function_node.hpp"
33318//base_binary_function_node.hpp
33319//at namespace elc::defs::core
33320/*
33321未完成的elc解释器core文件
33322由steve02081504与Alex0125设计、编写
33323转载时请在不对此文件做任何修改的同时注明出处
33324项目地址:https://github.com/ELC-lang/ELC
33325*/
33326/*
33327 ,??????????????????????????
33328 ????????????????????????????
33329 ?????????????????????????????+
33330 ?????+++++++++++++++++++++++++
33331 ?????+++++++++++++++++++++++++
33332 ??????++++++++++++++++++++++++
33333 ?????++
33334 ?????+++
33335 ??????+++IIIIIIIIIIIIIIIIII
33336 ?????+++++IIIIIIIIIIIIIIIIII
33337 ?????++++++++++++++++++++++++
33338 ??????+++++++++++++++++++++++:
33339 ?????++
33340 ?????+++
33341 ??????++
33342 ??????????????????????????????II
33343 ??????????????????????????????IIII
33344 ,?????????????????????????????IIIII+
33345 =???++++++++++++++++++++++++++III?
33346 ?++++++++++++++++++++++++++++I+
33347*/
33348struct base_binary_function_node:node_like,instance_struct<base_binary_function_node>{
33350
33351 function_t<value(ptr)> _func;
33352
33353 base_binary_function_node(function_t<value(ptr)> func)noexcept:_func(func){}
33354 base_binary_function_node(function_t<void(ptr)> func)noexcept{
33355 _func = λ_with_catch(func)(ptr p)mutable{
33356 func(p);
33357 return as_value(the_void);
33358 };
33359 }
33360 base_binary_function_node(function_t<void()> func)noexcept{
33361 _func = λ_with_catch(func)(ptr)mutable{
33362 func();
33363 return as_value(the_void);
33364 };
33365 }
33366
33367 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<this_t>;}
33368 [[nodiscard]]virtual value be_call(ptr arg_list)override{return _func(arg_list);}
33369protected:
33370 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{
33371 if(a->get_type_info() != this->get_type_info())
33372 return false;
33373 const this_t*p=down_cast<const this_t*>(a.get());
33374 try{
33375 return _func==p->_func;
33376 }
33377 catch(...){
33378 return unknown;
33379 }
33380 }
33381public:
33382 [[nodiscard]]virtual value arec(const value index)override{return the_void[index];}
33383
33384 virtual void clear()noexcept override{_func=nullptr;}
33385};
33386
33387//file_end
33388
33389#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33390#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/binary_node_t.hpp"
33391//binary_node_t.hpp
33392//at namespace elc::defs::core
33393/*
33394未完成的elc解释器core文件
33395由steve02081504与Alex0125设计、编写
33396转载时请在不对此文件做任何修改的同时注明出处
33397项目地址:https://github.com/ELC-lang/ELC
33398*/
33399/*
33400 ,??????????????????????????
33401 ????????????????????????????
33402 ?????????????????????????????+
33403 ?????+++++++++++++++++++++++++
33404 ?????+++++++++++++++++++++++++
33405 ??????++++++++++++++++++++++++
33406 ?????++
33407 ?????+++
33408 ??????+++IIIIIIIIIIIIIIIIII
33409 ?????+++++IIIIIIIIIIIIIIIIII
33410 ?????++++++++++++++++++++++++
33411 ??????+++++++++++++++++++++++:
33412 ?????++
33413 ?????+++
33414 ??????++
33415 ??????????????????????????????II
33416 ??????????????????????????????IIII
33417 ,?????????????????????????????IIIII+
33418 =???++++++++++++++++++++++++++III?
33419 ?++++++++++++++++++++++++++++I+
33420*/
33423
33424 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<this_t>;}
33425 [[nodiscard]]virtual base_type_info_t get_additional_type_info()const noexcept=0;
33426protected:
33427 [[noreturn]] virtual void throw_self_ptr()const=0;
33428 [[noreturn]] virtual void throw_self_ptr()=0;
33429 template<typename T>
33430 friend[[nodiscard]]inline maybe_fail_reference<T> maybe_fail_use_by_ref_as(ptr p)noexcept;
33431 template<typename T>
33432 friend[[nodiscard]]inline maybe_fail_reference<T> maybe_fail_use_by_ref_as(ptr p)noexcept;
33433 template<typename T>
33434 friend[[nodiscard]]inline const T& const_use_by_ref_as(const_ptr p)noexcept;
33435};
33436template<typename T>
33440
33442
33443 binary_node_t(const T&a)noexcept:_m(a){}
33444 binary_node_t(T&&a)noexcept:_m(a){}
33445
33446 [[nodiscard]]virtual base_type_info_t get_additional_type_info()const noexcept override{return type_info<this_t>;}
33447private:
33448 static constexpr bool hash_nothrow_helper=hash.able<T>?
33449 hash.nothrow<T>:1;
33450public:
33451 [[nodiscard]]virtual explicit operator hash_t()const noexcept(hash_nothrow_helper)override{
33452 if constexpr(hash.able<T>)
33453 return hash(_m);
33454 else
33455 #if defined(_MSC_VER)
33456 [[gsl::suppress(f.6)]]
33457 #endif
33458 return node_like::operator hash_t();
33459 }
33460protected:
33461 [[noreturn]] virtual void throw_self_ptr()const override{throw&_m;}
33462 [[noreturn]] virtual void throw_self_ptr()override{throw&_m;}
33463 [[nodiscard]]virtual logical_bool was_eq_with(const_ptr a)const noexcept override{
33464 if constexpr(equal.able<T>){
33465 if(a->get_type_info() != this->get_type_info())
33466 return false;
33467 const base_t*base_p=down_cast<const base_t*>(a.get());
33468 if(base_p->get_type_info() != this->get_type_info())
33469 return false;
33470 const this_t*p=down_cast<const this_t*>(base_p);
33471 return _m==p->_m;
33472 }
33473 else
33474 return node_like::was_eq_with(a);
33475 }
33476 [[nodiscard]]virtual logical_bool was_equal_with(const_ptr a)const noexcept override{
33477 return was_eq_with(a);
33478 }
33479private:
33480 static constexpr bool arec_nothrow_helper=was_not_an_ill_form(arec_as_value(_m,declvalue(const value&)))?
33481 was_not_an_ill_form_and_noexcept(arec_as_value(_m,declvalue(const value&))):1;
33482public:
33483 [[nodiscard]]virtual value arec(const value index)noexcept(arec_nothrow_helper)override{
33484 if constexpr(was_not_an_ill_form(arec_as_value(_m,index)))
33485 return arec_as_value(_m,index);
33486 else
33487 return as_value(this);
33488 }
33489private:
33490 static constexpr bool clear_nothrow_helper= was_not_an_ill_form(declvalue(T).clear())?
33492 re_construct.nothrow<T>;
33493public:
33494 virtual void clear()noexcept(clear_nothrow_helper)override{
33495 if constexpr(was_not_an_ill_form(declvalue(T).clear()))
33496 _m.clear();
33497 else
33498 re_construct(&_m);
33499 }
33500};
33501
33502template<typename T>
33503[[nodiscard]]inline bool was_an(const_ptr p)noexcept{
33504 typedef binary_node_t<T> target_node_t;
33505 if(p->get_type_info() == type_info<binary_node_base_t>){
33506 auto base_p = down_cast<const binary_node_base_t*>(p.get());
33507 if(base_p->get_additional_type_info() == type_info<target_node_t>)
33508 return true;
33509 elseif constexpr(::std::is_class_v<T> && !::std::is_final_v<T>){
33510 try{
33511 base_p->throw_self_ptr();
33512 }
33513 catch(const T*){
33514 return true;
33515 }
33516 catch(const void*){}
33517 }
33518 }
33519 return false;
33520}
33521template<typename T>
33523 typedef binary_node_t<T> target_node_t;
33524 if(p->get_type_info() == type_info<binary_node_base_t>){
33525 auto base_p = down_cast<binary_node_base_t*>(p.get());
33526 if(base_p->get_additional_type_info() == type_info<target_node_t>)
33527 return down_cast<target_node_t*>(base_p)->_m;
33528 elseif constexpr(::std::is_class_v<T> && !::std::is_final_v<T>){
33529 try{
33530 base_p->throw_self_ptr();
33531 }
33532 catch(T*aret){
33533 return*aret;
33534 }
33535 catch(void*){}
33536 }
33537 }
33538 return note::fail;
33539}
33540template<typename T>
33541[[nodiscard]]inline T& use_by_ref_as(ptr p)noexcept{
33542 return maybe_fail_use_by_ref_as<T>(p).get_ref();
33543}
33544template<typename T>
33545[[nodiscard]]inline const T& const_use_by_ref_as(const_ptr p)noexcept{
33546 typedef binary_node_t<T> target_node_t;
33547 if(p->get_type_info() == type_info<binary_node_base_t>){
33548 auto base_p = down_cast<const binary_node_base_t*>(p.get());
33549 if(base_p->get_additional_type_info() == type_info<target_node_t>)
33550 return down_cast<const target_node_t*>(base_p)->_m;
33551 elseif constexpr(::std::is_class_v<T> && !::std::is_final_v<T>){
33552 try{
33553 base_p->throw_self_ptr();
33554 }
33555 catch(const T*aret){
33556 return*aret;
33557 }
33558 catch(const void*){}
33559 }
33560 }
33561 return const_default_value_of<T>;
33562}
33563template<typename T>
33564[[nodiscard]]inline T use_as(const_ptr p)noexcept{
33565 return const_use_by_ref_as<T>(p);
33566}
33567template<typename T>
33568[[nodiscard]]inline const T& use_by_ref_as(const_ptr p)noexcept{
33569 return const_use_by_ref_as<T>(p);
33570}
33571template<typename T>
33572[[nodiscard]]inline const T& use_by_ref_as(auto&&a)noexcept{
33573 return use_by_ref_as<T>(as_ptr(a));
33574}
33575template<typename T>
33576[[nodiscard]]inline ptr make_binary_node_from(T a)noexcept{
33577 return get<binary_node_t<T>>(move(a));
33578}
33579template<typename T>
33581template<typename T>
33582[[nodiscard]]inline ptr make_long_term_binary_node_from(T a)noexcept{
33583 ptr& to = long_term_binary_node_storager<T>[a];
33584 if(!bool(to) || const_use_by_ref_as<T>(to)!=a)
33585 to = make_binary_node_from<T>(move(a));
33586 return to;
33587}
33588
33589//file_end
33590
33591#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33592#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/code_list.hpp"
33593//code_list.hpp
33594//at namespace elc::defs::core
33595/*
33596未完成的elc解释器core文件
33597由steve02081504与Alex0125设计、编写
33598转载时请在不对此文件做任何修改的同时注明出处
33599项目地址:https://github.com/ELC-lang/ELC
33600*/
33601/*
33602 ,??????????????????????????
33603 ????????????????????????????
33604 ?????????????????????????????+
33605 ?????+++++++++++++++++++++++++
33606 ?????+++++++++++++++++++++++++
33607 ??????++++++++++++++++++++++++
33608 ?????++
33609 ?????+++
33610 ??????+++IIIIIIIIIIIIIIIIII
33611 ?????+++++IIIIIIIIIIIIIIIIII
33612 ?????++++++++++++++++++++++++
33613 ??????+++++++++++++++++++++++:
33614 ?????++
33615 ?????+++
33616 ??????++
33617 ??????????????????????????????II
33618 ??????????????????????????????IIII
33619 ,?????????????????????????????IIIII+
33620 =???++++++++++++++++++++++++++III?
33621 ?++++++++++++++++++++++++++++I+
33622*/
33623inline value eval(ptr p){
33624 return p->be_eval();
33625}
33626inline value eval(auto&&node){
33627 return eval(as_ptr(node));
33628}
33629struct code_list:cons,instance_struct<code_list>{
33632public:
33633 using cons::cons;
33634
33635 [[nodiscard]]virtual value be_eval()override{
33636 ptr self = this;
33637 value aret{special_init};
33638 from_goto:
33639 try{
33640 do{
33641 eval(car_of(self)) >> aret;
33642 self=cdr_of(self);
33643 }while(self);
33644 }
33646 self=info.to;
33647 goto from_goto;
33648 }
33650 }
33651 return aret;
33652 }
33653 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override{return type_info<code_list>;}
33654};
33655
33656//file_end
33657
33658#line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/nodes/_body.hpp"
33659
33660//file_end
33661
33662 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
33663 }
33664
33665 #if defined(ELC_TEST_ON)
33666 namespace core_part_test{
33667 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_test.hpp"
33668//_test.hpp
33669/*
33670未完成的elc解释器core文件
33671由steve02081504与Alex0125设计、编写
33672转载时请在不对此文件做任何修改的同时注明出处
33673项目地址:https://github.com/ELC-lang/ELC
33674*/
33675/*
33676 ,??????????????????????????
33677 ????????????????????????????
33678 ?????????????????????????????+
33679 ?????+++++++++++++++++++++++++
33680 ?????+++++++++++++++++++++++++
33681 ??????++++++++++++++++++++++++
33682 ?????++
33683 ?????+++
33684 ??????+++IIIIIIIIIIIIIIIIII
33685 ?????+++++IIIIIIIIIIIIIIIIII
33686 ?????++++++++++++++++++++++++
33687 ??????+++++++++++++++++++++++:
33688 ?????++
33689 ?????+++
33690 ??????++
33691 ??????????????????????????????II
33692 ??????????????????????????????IIII
33693 ,?????????????????????????????IIIII+
33694 =???++++++++++++++++++++++++++III?
33695 ?++++++++++++++++++++++++++++I+
33696*/
33697inline void test(){
33698 ELC_TEST_EVENTNAME("core部分测试");
33699}
33700inline void test_log_out(){
33701}
33702inline void test_end(){
33703}
33704
33705//file_end
33706
33707 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
33708 }
33709 #endif
33710
33711 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
33712//_undefs.hpp
33713/*
33714未完成的elc解释器basic文件
33715由steve02081504与Alex0125设计、编写
33716转载时请在不对此文件做任何修改的同时注明出处
33717项目地址:https://github.com/ELC-lang/ELC
33718*/
33719/*
33720 ,??????????????????????????
33721 ????????????????????????????
33722 ?????????????????????????????+
33723 ?????+++++++++++++++++++++++++
33724 ?????+++++++++++++++++++++++++
33725 ??????++++++++++++++++++++++++
33726 ?????++
33727 ?????+++
33728 ??????+++IIIIIIIIIIIIIIIIII
33729 ?????+++++IIIIIIIIIIIIIIIIII
33730 ?????++++++++++++++++++++++++
33731 ??????+++++++++++++++++++++++:
33732 ?????++
33733 ?????+++
33734 ??????++
33735 ??????????????????????????????II
33736 ??????????????????????????????IIII
33737 ,?????????????????????????????IIIII+
33738 =???++++++++++++++++++++++++++III?
33739 ?++++++++++++++++++++++++++++I+
33740*/
33741#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
33742//_undefs.hpp
33743/*
33744未完成的elc解释器_share文件
33745由steve02081504与Alex0125设计、编写
33746转载时请在不对此文件做任何修改的同时注明出处
33747项目地址:https://github.com/ELC-lang/ELC
33748*/
33749/*
33750 ,??????????????????????????
33751 ????????????????????????????
33752 ?????????????????????????????+
33753 ?????+++++++++++++++++++++++++
33754 ?????+++++++++++++++++++++++++
33755 ??????++++++++++++++++++++++++
33756 ?????++
33757 ?????+++
33758 ??????+++IIIIIIIIIIIIIIIIII
33759 ?????+++++IIIIIIIIIIIIIIIIII
33760 ?????++++++++++++++++++++++++
33761 ??????+++++++++++++++++++++++:
33762 ?????++
33763 ?????+++
33764 ??????++
33765 ??????????????????????????????II
33766 ??????????????????????????????IIII
33767 ,?????????????????????????????IIIII+
33768 =???++++++++++++++++++++++++++III?
33769 ?++++++++++++++++++++++++++++I+
33770*/
33771
33772//defs at "_defs.hpp"
33773
33774#if defined(_MSC_VER)
33775 #pragma warning(pop)
33776#endif
33777//#undef suppress_msvc_warning
33778#undef disable_msvc_warning
33779#undef push_msvc_warning
33780#undef pop_msvc_warning
33781#undef push_and_disable_msvc_warning
33782#if defined(_MSC_VER)
33783 #pragma pack(pop)
33784#endif
33785#if defined(__GNUC__)
33786 #pragma GCC diagnostic pop
33787#endif
33788#if defined(_MSC_VER)
33789 #pragma pop_macro("new")
33790 #pragma pop_macro("delete")
33791 #pragma pop_macro("min")
33792 #pragma pop_macro("max")
33793 #pragma pop_macro("abs")
33794 #pragma pop_macro("export")
33795 #pragma pop_macro("rand")
33796 #pragma pop_macro("sqrt")
33797 #pragma pop_macro("type_info")
33798 #pragma pop_macro("elc")
33799#endif
33800
33801//
33802#if defined(ELC_VOID_NAME)
33803 #define void the_void
33804#endif
33805//
33806#if defined(ELC_PUBLIC_ALL)
33807 #undef protected
33808 #undef private
33809#endif
33810//
33811#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
33812 #define rand the_rand
33813#endif
33814
33815// #undef often_noexcept
33816#undef noexcept_as
33817#undef noexcept_as_auto
33818#undef constexpr_as
33819#undef constexpr_as_auto
33820
33821#undef using_method_from_base_t
33822#undef using_method_from_value
33823
33824#undef floop
33825#undef times
33826#undef debug_times
33827#undef enable_adl
33828
33829#undef re_declvalue
33830#undef re_decltype
33831
33832#undef declvalue
33833
33834#undef template_error
33835#undef template_error_of_type
33836#undef template_warning
33837
33838#undef type_info_of
33839#undef type_name_of
33840
33841#undef is_common_attribute
33842#undef is_special_attribute
33843
33844#undef has_attribute
33845#undef not_has_attribute
33846
33847#undef float_size_of
33848#undef bitnum_of
33849
33850#undef def_common_attribute_with_nothing
33851#undef def_special_attribute_with_nothing
33852
33853#undef common_attribute_t
33854#undef special_attribute_t
33855
33856#undef enable_if
33857#undef enabled_by_default
33858#undef disabled_by_default
33859#undef enable_if_not_ill_form
33860#undef enable_flag
33861
33862#undef was_an_ill_form
33863#undef was_an_ill_form_with_parameter
33864#undef was_not_an_ill_form
33865#undef was_not_an_ill_form_and_noexcept
33866#undef was_not_an_ill_form_with_parameter
33867
33868#undef recursive_λ
33869#undef get_recursive_λ_caller
33870#undef λ
33871#undef exλ
33872#undef λ_with_catch
33873#undef self_recursion
33874#undef λ_RLSRRS
33875#undef λ_inline
33876#undef λ_force_inline
33877
33878#undef MAGIC
33879
33880#undef nothing
33881
33882#undef elseif
33883#undef _big_than_
33884#undef _small_than_
33885
33886#if defined(_MSC_VER)
33887 #undef not
33888 #undef and
33889 #undef or
33890#endif
33891
33892#undef INTER_NAMESPACE
33893#undef BREAK_NAMESPACE
33894
33895#undef szie
33896#undef form
33897
33898#undef template_name
33899#undef type_name
33900
33901#undef not_in_debug
33902
33903#undef es
33904#undef ec
33905
33906#undef ELC_TEST_EVENTNAME
33907
33908#undef override_instance_struct
33909
33910#undef distinctive
33911
33912#undef force_inline
33913
33914#undef with_no_vtable
33915
33916#undef in_consteval
33917
33918#undef no_vtable_struct
33919#undef no_vtable_class
33920
33921//#undef get_elc_defs
33922
33923//file_end
33924
33925#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
33926
33927//file_end
33928
33929 #line 50 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
33930}
33931namespace elc{
33932 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_export.hpp"
33933//_export.hpp
33934//at namespace elc
33935/*
33936未完成的elc解释器core文件
33937由steve02081504与Alex0125设计、编写
33938转载时请在不对此文件做任何修改的同时注明出处
33939项目地址:https://github.com/ELC-lang/ELC
33940*/
33941/*
33942 ,??????????????????????????
33943 ????????????????????????????
33944 ?????????????????????????????+
33945 ?????+++++++++++++++++++++++++
33946 ?????+++++++++++++++++++++++++
33947 ??????++++++++++++++++++++++++
33948 ?????++
33949 ?????+++
33950 ??????+++IIIIIIIIIIIIIIIIII
33951 ?????+++++IIIIIIIIIIIIIIIIII
33952 ?????++++++++++++++++++++++++
33953 ??????+++++++++++++++++++++++:
33954 ?????++
33955 ?????+++
33956 ??????++
33957 ??????????????????????????????II
33958 ??????????????????????????????IIII
33959 ,?????????????????????????????IIIII+
33960 =???++++++++++++++++++++++++++III?
33961 ?++++++++++++++++++++++++++++I+
33962*/
33963#define export using defs::core::
33964export node_like;
33965export ptr;
33966export const_ptr;
33967export weak_ptr;
33968export const_weak_ptr;
33969export value;
33970
33971export nil;
33972export t;
33973export the_void;
33974
33975export as_value;
33976export as_ptr;
33977export common_node;
33978#undef export
33979
33980//file_end
33981
33982 #line 53 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
33983}
33984#if defined(ELC_STRING)
33985 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/string_arec_as_value.hpp"
33986//string_arec_as_value.hpp
33987//at namespace ::
33988//multi when ELC_STRING & ELC_CORE
33989/*
33990未完成的elc解释器string文件
33991由steve02081504与Alex0125设计、编写
33992转载时请在不对此文件做任何修改的同时注明出处
33993项目地址:https://github.com/ELC-lang/ELC
33994*/
33995/*
33996 ,??????????????????????????
33997 ????????????????????????????
33998 ?????????????????????????????+
33999 ?????+++++++++++++++++++++++++
34000 ?????+++++++++++++++++++++++++
34001 ??????++++++++++++++++++++++++
34002 ?????++
34003 ?????+++
34004 ??????+++IIIIIIIIIIIIIIIIII
34005 ?????+++++IIIIIIIIIIIIIIIIII
34006 ?????++++++++++++++++++++++++
34007 ??????+++++++++++++++++++++++:
34008 ?????++
34009 ?????+++
34010 ??????++
34011 ??????????????????????????????II
34012 ??????????????????????????????IIII
34013 ,?????????????????????????????IIIII+
34014 =???++++++++++++++++++++++++++III?
34015 ?++++++++++++++++++++++++++++I+
34016*/
34017#if !defined(ELC_multi_string_arec_as_value)//pls skip define check as this part is muti
34018#define ELC_multi_string_arec_as_value
34019namespace elc::defs{
34020 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
34021//_defs.hpp
34022/*
34023未完成的elc解释器basic文件
34024由steve02081504与Alex0125设计、编写
34025转载时请在不对此文件做任何修改的同时注明出处
34026项目地址:https://github.com/ELC-lang/ELC
34027*/
34028/*
34029 ,??????????????????????????
34030 ????????????????????????????
34031 ?????????????????????????????+
34032 ?????+++++++++++++++++++++++++
34033 ?????+++++++++++++++++++++++++
34034 ??????++++++++++++++++++++++++
34035 ?????++
34036 ?????+++
34037 ??????+++IIIIIIIIIIIIIIIIII
34038 ?????+++++IIIIIIIIIIIIIIIIII
34039 ?????++++++++++++++++++++++++
34040 ??????+++++++++++++++++++++++:
34041 ?????++
34042 ?????+++
34043 ??????++
34044 ??????????????????????????????II
34045 ??????????????????????????????IIII
34046 ,?????????????????????????????IIIII+
34047 =???++++++++++++++++++++++++++III?
34048 ?++++++++++++++++++++++++++++I+
34049*/
34050#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
34051//_defs.hpp
34052/*
34053未完成的elc解释器_share文件
34054由steve02081504与Alex0125设计、编写
34055转载时请在不对此文件做任何修改的同时注明出处
34056项目地址:https://github.com/ELC-lang/ELC
34057*/
34058/*
34059 ,??????????????????????????
34060 ????????????????????????????
34061 ?????????????????????????????+
34062 ?????+++++++++++++++++++++++++
34063 ?????+++++++++++++++++++++++++
34064 ??????++++++++++++++++++++++++
34065 ?????++
34066 ?????+++
34067 ??????+++IIIIIIIIIIIIIIIIII
34068 ?????+++++IIIIIIIIIIIIIIIIII
34069 ?????++++++++++++++++++++++++
34070 ??????+++++++++++++++++++++++:
34071 ?????++
34072 ?????+++
34073 ??????++
34074 ??????????????????????????????II
34075 ??????????????????????????????IIII
34076 ,?????????????????????????????IIIII+
34077 =???++++++++++++++++++++++++++III?
34078 ?++++++++++++++++++++++++++++I+
34079*/
34080
34081//undefs at "_undefs.hpp"
34082
34083#if defined(ELC_CODE_REALM)
34084 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
34085#endif
34086
34087//set ELC_WARNING_LEVEL default to 4(max)
34088#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
34089
34090#if defined(_MSC_VER)
34091 #pragma warning(push,ELC_WARNING_LEVEL)
34092 #pragma warning(disable:4099)//class与struct混用警告diss
34093 #pragma warning(disable:4584)//重复子类警告diss
34094 #pragma warning(disable:4250)//域控制继承警告diss
34095 #pragma warning(disable:26432)//不完全默认方法警告diss
34096 #pragma warning(disable:26435)//virtual override方法警告diss
34097 #pragma warning(disable:26481)//容器安利diss
34098 #pragma warning(disable:26446)//gsl::at安利diss
34099 #pragma warning(disable:26434)//方法覆盖警告diss
34100 #pragma warning(disable:26429)//gsl::not_null安利diss
34101 #pragma warning(disable:26471)//对void*进行static_cast安利diss
34102 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
34103 #pragma warning(disable:26473)//相同指针显式cast警告diss
34104 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
34105 #pragma warning(disable:26485)//数组作指针警告diss
34106 #pragma warning(disable:26490)//reinterpret_cast警告diss
34107 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
34108 #pragma warning(disable:26482)//非常数数组索引警告diss
34109 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
34110#endif
34111#if defined(__GNUC__)
34112 #pragma GCC diagnostic push
34113 #pragma GCC diagnostic warning "-Wall"//开启所有警告
34114 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
34115#endif
34116#if defined(_MSC_VER)
34117 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
34118 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
34119 #define push_msvc_warning() __pragma(warning(push))
34120 #define pop_msvc_warning() __pragma(warning(pop))
34121 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
34122#else
34123 //#define suppress_msvc_warning(...)
34124 #define disable_msvc_warning(...)
34125 #define push_msvc_warning()
34126 #define pop_msvc_warning()
34127 #define push_and_disable_msvc_warning(...)
34128#endif
34129#if defined(_MSC_VER)
34130 //push pack settings
34131 #pragma pack(push)
34132 #pragma pack()
34133#endif
34134#if defined(_MSC_VER)
34135 //push and undef common macros
34136 #pragma push_macro("new")
34137 #undef new
34138 #pragma push_macro("delete")
34139 #undef delete
34140 #pragma push_macro("min")
34141 #undef min
34142 #pragma push_macro("max")
34143 #undef max
34144 #pragma push_macro("abs")
34145 #undef abs
34146 #pragma push_macro("export")
34147 #undef export
34148 #pragma push_macro("rand")
34149 #undef rand
34150 #pragma push_macro("sqrt")
34151 #undef sqrt
34152 #pragma push_macro("type_info")
34153 #undef type_info
34154 #pragma push_macro("elc")
34155 #undef elc
34156#endif
34157//
34158#if defined(ELC_VOID_NAME)
34159 #undef void
34160#endif
34161//
34162#if defined(ELC_PUBLIC_ALL)
34163 #define protected public
34164 #define private public
34165#endif
34166//
34167#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
34168 #undef rand
34169#endif
34170
34171// #define often_noexcept
34172#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
34173#define noexcept_as_auto MAGIC//哦现在有了
34174#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
34175#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
34176
34177#define using_method_from_base_t(name,...) \
34178template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
34179auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
34180{\
34181 return base_t::name(forward<Args>(rest)...);\
34182}\
34183
34184#define using_method_from_value(name,value_name,...) \
34185template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
34186auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
34187{\
34188 return value_name.name(forward<Args>(rest)...);\
34189}\
34190
34191#define floop while(__builtin_is_my_dick_still_there())
34192#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
34193#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
34194#if defined(_MSC_VER) && _MSC_VER>=1935
34195 //@see https://developercommunity.visualstudio.com/t/10193638
34196 #define enable_adl(name) template<typename=void>void name()noexcept=delete
34197#else
34198 #define enable_adl(name) void name()noexcept=delete
34199#endif
34200
34201#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
34202#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
34203
34204#define declvalue(...) (::std::declval<__VA_ARGS__>())
34205
34207#define template_error(reason) static_assert(template_error_helper<T>,reason)
34209#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
34211#define template_warning(reason) template_warning_helper<T>(reason)
34212
34213//for type_info
34214#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
34215#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
34216
34217#define is_common_attribute(name) public attribute<T,name<T>>
34218#define is_special_attribute(name) public attribute<T,name>
34219
34220#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
34221#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
34222
34223//for float_size_t
34224#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
34225//bitnum_of
34226#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
34227
34228//for attribute
34229#define def_common_attribute_with_nothing(name) \
34230template<typename T>\
34231class name{}\
34232
34233#define def_special_attribute_with_nothing(name) \
34234class name{}\
34235
34236#define common_attribute_t template<class>class
34237#define special_attribute_t class
34238
34247#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
34249#define enabled_by_default class enable_state=void
34251#define disabled_by_default class enable_state= ::std::enable_if_t<false>
34253#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
34255#define enable_flag class enable_state
34256
34257#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
34258#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
34259#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
34260#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
34261#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
34262
34264#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
34266#define get_recursive_λ_caller(name,...) \
34267exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
34268 return name(name,Args...);\
34269}
34271#define λ []
34273#define exλ [&]
34275#define λ_with_catch(...) [__VA_ARGS__]
34277#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
34278//recursive_λ_self_referential_reserved_symbolname
34279#define λ_RLSRRS _my_jb_super_sb_name_
34280
34281#if defined(_MSC_VER) && !defined(__clang__)
34282 #define λ_inline [[msvc::forceinline]]
34283 #define λ_force_inline [[msvc::forceinline]]
34284#elif
34285 #define λ_inline [[gnu::always_inline]]
34286 #define λ_force_inline [[gnu::always_inline]]
34287#else
34288 #define λ_inline
34289 #define λ_force_inline
34290#endif
34291
34292#define MAGIC//ahh,ko no tenno da!
34293
34295#define nothing
34296
34298#define elseif else if
34300#define _big_than_ >
34302#define _small_than_ <
34303
34304#if defined(_MSC_VER)
34305 #define not !
34306 #define and &&
34307 #define or ||
34308#endif
34309
34311#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
34313#define BREAK_NAMESPACE }
34314
34316#define template_name template
34318#define type_name class
34319
34320#if defined(DEBUG) || defined(_DEBUG)
34321 #define not_in_debug 0
34322 #define in_debug 1
34323#else
34324 #define not_in_debug 1
34325 #define in_debug 0
34326#endif
34327
34328#define es U""
34329#define ec(ch) U ## ch
34330
34331#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
34332 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
34333#else
34334 #define ELC_TEST_EVENTNAME(name)
34335#endif
34336
34337#define override_instance_struct \
34338protected:\
34339 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
34340 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
34341 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
34342 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
34343 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
34344
34345#if defined(_MSC_VER) && !defined(__clang__)
34346 #define distinctive __declspec(dllexport)
34347#else
34348 #define distinctive
34349#endif
34350
34351#if defined(_MSC_VER) && !defined(__clang__)
34352 #define force_inline __forceinline
34353#elif defined(__GNUC__) || defined(__clang__)
34354 #define force_inline __attribute__((always_inline)) inline
34355#else
34356 #define force_inline inline
34357#endif
34358
34359#if defined(_MSC_VER) && !defined(__clang__)
34360 #define with_no_vtable __declspec(novtable)
34361#else
34362 #define with_no_vtable
34363#endif
34364
34365#define in_consteval (::std::is_constant_evaluated())
34366
34367#define no_vtable_struct struct with_no_vtable
34368#define no_vtable_class class with_no_vtable
34369
34370//#define get_elc_defs using namespace ::elc::defs
34371
34372//file_end
34373
34374#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
34375
34376//file_end
34377
34378 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/string_arec_as_value.hpp"
34379
34380 namespace string_n{
34381 template<class char_T>
34382 value arec_as_value(string_t<char_T>&str,const value index){
34383 size_t i=size_t(use_as<int_t>(index));
34384 if(!i)
34385 i=size_t(use_as<uint_t>(index));
34386 struct arec_data_t final:instance_struct<arec_data_t>
34387 ,value::base_data_t{
34389 arec_data_t(string_t<char_T>&str,size_t index)noexcept:_m(&str,index){};
34390 arec_data_t(const arec_data_t&ref)noexcept:_m(special_init,ref._m){}
34391 virtual ~arec_data_t()noexcept override final=default;
34392
34393 virtual void be_set(ptr a)noexcept override final{move(_m)=use_as<char_T>(a);}
34394 [[nodiscard]]virtual ptr get_value()noexcept override final{return core::make_binary_node_from<char_T>(move(_m));}
34395 [[nodiscard]]virtual base_data_t*copy()const noexcept override final{return get<arec_data_t>(*this);}
34396 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<arec_data_t>;}
34397 };
34398 return get<arec_data_t>(str,i);
34399 }
34400 }
34401
34402 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
34403//_undefs.hpp
34404/*
34405未完成的elc解释器basic文件
34406由steve02081504与Alex0125设计、编写
34407转载时请在不对此文件做任何修改的同时注明出处
34408项目地址:https://github.com/ELC-lang/ELC
34409*/
34410/*
34411 ,??????????????????????????
34412 ????????????????????????????
34413 ?????????????????????????????+
34414 ?????+++++++++++++++++++++++++
34415 ?????+++++++++++++++++++++++++
34416 ??????++++++++++++++++++++++++
34417 ?????++
34418 ?????+++
34419 ??????+++IIIIIIIIIIIIIIIIII
34420 ?????+++++IIIIIIIIIIIIIIIIII
34421 ?????++++++++++++++++++++++++
34422 ??????+++++++++++++++++++++++:
34423 ?????++
34424 ?????+++
34425 ??????++
34426 ??????????????????????????????II
34427 ??????????????????????????????IIII
34428 ,?????????????????????????????IIIII+
34429 =???++++++++++++++++++++++++++III?
34430 ?++++++++++++++++++++++++++++I+
34431*/
34432#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
34433//_undefs.hpp
34434/*
34435未完成的elc解释器_share文件
34436由steve02081504与Alex0125设计、编写
34437转载时请在不对此文件做任何修改的同时注明出处
34438项目地址:https://github.com/ELC-lang/ELC
34439*/
34440/*
34441 ,??????????????????????????
34442 ????????????????????????????
34443 ?????????????????????????????+
34444 ?????+++++++++++++++++++++++++
34445 ?????+++++++++++++++++++++++++
34446 ??????++++++++++++++++++++++++
34447 ?????++
34448 ?????+++
34449 ??????+++IIIIIIIIIIIIIIIIII
34450 ?????+++++IIIIIIIIIIIIIIIIII
34451 ?????++++++++++++++++++++++++
34452 ??????+++++++++++++++++++++++:
34453 ?????++
34454 ?????+++
34455 ??????++
34456 ??????????????????????????????II
34457 ??????????????????????????????IIII
34458 ,?????????????????????????????IIIII+
34459 =???++++++++++++++++++++++++++III?
34460 ?++++++++++++++++++++++++++++I+
34461*/
34462
34463//defs at "_defs.hpp"
34464
34465#if defined(_MSC_VER)
34466 #pragma warning(pop)
34467#endif
34468//#undef suppress_msvc_warning
34469#undef disable_msvc_warning
34470#undef push_msvc_warning
34471#undef pop_msvc_warning
34472#undef push_and_disable_msvc_warning
34473#if defined(_MSC_VER)
34474 #pragma pack(pop)
34475#endif
34476#if defined(__GNUC__)
34477 #pragma GCC diagnostic pop
34478#endif
34479#if defined(_MSC_VER)
34480 #pragma pop_macro("new")
34481 #pragma pop_macro("delete")
34482 #pragma pop_macro("min")
34483 #pragma pop_macro("max")
34484 #pragma pop_macro("abs")
34485 #pragma pop_macro("export")
34486 #pragma pop_macro("rand")
34487 #pragma pop_macro("sqrt")
34488 #pragma pop_macro("type_info")
34489 #pragma pop_macro("elc")
34490#endif
34491
34492//
34493#if defined(ELC_VOID_NAME)
34494 #define void the_void
34495#endif
34496//
34497#if defined(ELC_PUBLIC_ALL)
34498 #undef protected
34499 #undef private
34500#endif
34501//
34502#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
34503 #define rand the_rand
34504#endif
34505
34506// #undef often_noexcept
34507#undef noexcept_as
34508#undef noexcept_as_auto
34509#undef constexpr_as
34510#undef constexpr_as_auto
34511
34512#undef using_method_from_base_t
34513#undef using_method_from_value
34514
34515#undef floop
34516#undef times
34517#undef debug_times
34518#undef enable_adl
34519
34520#undef re_declvalue
34521#undef re_decltype
34522
34523#undef declvalue
34524
34525#undef template_error
34526#undef template_error_of_type
34527#undef template_warning
34528
34529#undef type_info_of
34530#undef type_name_of
34531
34532#undef is_common_attribute
34533#undef is_special_attribute
34534
34535#undef has_attribute
34536#undef not_has_attribute
34537
34538#undef float_size_of
34539#undef bitnum_of
34540
34541#undef def_common_attribute_with_nothing
34542#undef def_special_attribute_with_nothing
34543
34544#undef common_attribute_t
34545#undef special_attribute_t
34546
34547#undef enable_if
34548#undef enabled_by_default
34549#undef disabled_by_default
34550#undef enable_if_not_ill_form
34551#undef enable_flag
34552
34553#undef was_an_ill_form
34554#undef was_an_ill_form_with_parameter
34555#undef was_not_an_ill_form
34556#undef was_not_an_ill_form_and_noexcept
34557#undef was_not_an_ill_form_with_parameter
34558
34559#undef recursive_λ
34560#undef get_recursive_λ_caller
34561#undef λ
34562#undef exλ
34563#undef λ_with_catch
34564#undef self_recursion
34565#undef λ_RLSRRS
34566#undef λ_inline
34567#undef λ_force_inline
34568
34569#undef MAGIC
34570
34571#undef nothing
34572
34573#undef elseif
34574#undef _big_than_
34575#undef _small_than_
34576
34577#if defined(_MSC_VER)
34578 #undef not
34579 #undef and
34580 #undef or
34581#endif
34582
34583#undef INTER_NAMESPACE
34584#undef BREAK_NAMESPACE
34585
34586#undef szie
34587#undef form
34588
34589#undef template_name
34590#undef type_name
34591
34592#undef not_in_debug
34593
34594#undef es
34595#undef ec
34596
34597#undef ELC_TEST_EVENTNAME
34598
34599#undef override_instance_struct
34600
34601#undef distinctive
34602
34603#undef force_inline
34604
34605#undef with_no_vtable
34606
34607#undef in_consteval
34608
34609#undef no_vtable_struct
34610#undef no_vtable_class
34611
34612//#undef get_elc_defs
34613
34614//file_end
34615
34616#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
34617
34618//file_end
34619
34620 #line 59 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/string_arec_as_value.hpp"
34621}
34622#endif
34623
34624//file_end
34625
34626 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/core/_body.hpp"
34627#endif
34628
34629//file_end
34630
34631 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
34632#endif
34633
34634//file_end
34635
34636 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
34637 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
34638//lib_loader
34639//at namespace ::
34640/*@
34641未完成的elc解释器include文件
34642由steve02081504与Alex0125设计、编写
34643转载时请在不对此文件做任何修改的同时注明出处
34644项目地址:https://github.com/ELC-lang/ELC
34645*/
34646/*
34647 ,??????????????????????????
34648 ????????????????????????????
34649 ?????????????????????????????+
34650 ?????+++++++++++++++++++++++++
34651 ?????+++++++++++++++++++++++++
34652 ??????++++++++++++++++++++++++
34653 ?????++
34654 ?????+++
34655 ??????+++IIIIIIIIIIIIIIIIII
34656 ?????+++++IIIIIIIIIIIIIIIIII
34657 ?????++++++++++++++++++++++++
34658 ??????+++++++++++++++++++++++:
34659 ?????++
34660 ?????+++
34661 ??????++
34662 ??????????????????????????????II
34663 ??????????????????????????????IIII
34664 ,?????????????????????????????IIIII+
34665 =???++++++++++++++++++++++++++III?
34666 ?++++++++++++++++++++++++++++I+
34667*/
34668#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
34669//pre_checks.hpp
34670/*
34671未完成的elc解释器_share文件
34672由steve02081504与Alex0125设计、编写
34673转载时请在不对此文件做任何修改的同时注明出处
34674项目地址:https://github.com/ELC-lang/ELC
34675*/
34676/*
34677 ,??????????????????????????
34678 ????????????????????????????
34679 ?????????????????????????????+
34680 ?????+++++++++++++++++++++++++
34681 ?????+++++++++++++++++++++++++
34682 ??????++++++++++++++++++++++++
34683 ?????++
34684 ?????+++
34685 ??????+++IIIIIIIIIIIIIIIIII
34686 ?????+++++IIIIIIIIIIIIIIIIII
34687 ?????++++++++++++++++++++++++
34688 ??????+++++++++++++++++++++++:
34689 ?????++
34690 ?????+++
34691 ??????++
34692 ??????????????????????????????II
34693 ??????????????????????????????IIII
34694 ,?????????????????????????????IIIII+
34695 =???++++++++++++++++++++++++++III?
34696 ?++++++++++++++++++++++++++++I+
34697*/
34698//__cplusplus needs 20+
34699#if !defined(__cplusplus)||__cplusplus<202002L
34700 //if msvc, check _MSVC_LANG
34701 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
34702 //ok
34703 #else
34704 #error "elc files needs c++20 or higher"
34705 #endif
34706#endif
34707
34708//check if the compiler is msvc
34709#if defined(_MSC_VER)
34710 //check if _CPPRTTI
34711 #if !defined(_CPPRTTI)
34712 #error "elc files needs rtti"
34713 #endif
34714 //check _MSC_VER at last 1932
34715 #if _MSC_VER<1932
34716 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
34717 #endif
34718#endif
34719
34720//file_end
34721
34722#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
34723#if !defined(ELC_LIB_LOADER)
34724 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
34725//string
34726//at namespace ::
34727/*@
34728未完成的elc解释器include文件
34729由steve02081504与Alex0125设计、编写
34730转载时请在不对此文件做任何修改的同时注明出处
34731项目地址:https://github.com/ELC-lang/ELC
34732*/
34733/*
34734 ,??????????????????????????
34735 ????????????????????????????
34736 ?????????????????????????????+
34737 ?????+++++++++++++++++++++++++
34738 ?????+++++++++++++++++++++++++
34739 ??????++++++++++++++++++++++++
34740 ?????++
34741 ?????+++
34742 ??????+++IIIIIIIIIIIIIIIIII
34743 ?????+++++IIIIIIIIIIIIIIIIII
34744 ?????++++++++++++++++++++++++
34745 ??????+++++++++++++++++++++++:
34746 ?????++
34747 ?????+++
34748 ??????++
34749 ??????????????????????????????II
34750 ??????????????????????????????IIII
34751 ,?????????????????????????????IIIII+
34752 =???++++++++++++++++++++++++++III?
34753 ?++++++++++++++++++++++++++++I+
34754*/
34755#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
34756//pre_checks.hpp
34757/*
34758未完成的elc解释器_share文件
34759由steve02081504与Alex0125设计、编写
34760转载时请在不对此文件做任何修改的同时注明出处
34761项目地址:https://github.com/ELC-lang/ELC
34762*/
34763/*
34764 ,??????????????????????????
34765 ????????????????????????????
34766 ?????????????????????????????+
34767 ?????+++++++++++++++++++++++++
34768 ?????+++++++++++++++++++++++++
34769 ??????++++++++++++++++++++++++
34770 ?????++
34771 ?????+++
34772 ??????+++IIIIIIIIIIIIIIIIII
34773 ?????+++++IIIIIIIIIIIIIIIIII
34774 ?????++++++++++++++++++++++++
34775 ??????+++++++++++++++++++++++:
34776 ?????++
34777 ?????+++
34778 ??????++
34779 ??????????????????????????????II
34780 ??????????????????????????????IIII
34781 ,?????????????????????????????IIIII+
34782 =???++++++++++++++++++++++++++III?
34783 ?++++++++++++++++++++++++++++I+
34784*/
34785//__cplusplus needs 20+
34786#if !defined(__cplusplus)||__cplusplus<202002L
34787 //if msvc, check _MSVC_LANG
34788 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
34789 //ok
34790 #else
34791 #error "elc files needs c++20 or higher"
34792 #endif
34793#endif
34794
34795//check if the compiler is msvc
34796#if defined(_MSC_VER)
34797 //check if _CPPRTTI
34798 #if !defined(_CPPRTTI)
34799 #error "elc files needs rtti"
34800 #endif
34801 //check _MSC_VER at last 1932
34802 #if _MSC_VER<1932
34803 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
34804 #endif
34805#endif
34806
34807//file_end
34808
34809#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
34810#if !defined(ELC_STRING)
34811 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
34812//base
34813//at namespace ::
34814/*@
34815未完成的elc解释器include文件
34816由steve02081504与Alex0125设计、编写
34817转载时请在不对此文件做任何修改的同时注明出处
34818项目地址:https://github.com/ELC-lang/ELC
34819*/
34820/*
34821 ,??????????????????????????
34822 ????????????????????????????
34823 ?????????????????????????????+
34824 ?????+++++++++++++++++++++++++
34825 ?????+++++++++++++++++++++++++
34826 ??????++++++++++++++++++++++++
34827 ?????++
34828 ?????+++
34829 ??????+++IIIIIIIIIIIIIIIIII
34830 ?????+++++IIIIIIIIIIIIIIIIII
34831 ?????++++++++++++++++++++++++
34832 ??????+++++++++++++++++++++++:
34833 ?????++
34834 ?????+++
34835 ??????++
34836 ??????????????????????????????II
34837 ??????????????????????????????IIII
34838 ,?????????????????????????????IIIII+
34839 =???++++++++++++++++++++++++++III?
34840 ?++++++++++++++++++++++++++++I+
34841*/
34842#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
34843//pre_checks.hpp
34844/*
34845未完成的elc解释器_share文件
34846由steve02081504与Alex0125设计、编写
34847转载时请在不对此文件做任何修改的同时注明出处
34848项目地址:https://github.com/ELC-lang/ELC
34849*/
34850/*
34851 ,??????????????????????????
34852 ????????????????????????????
34853 ?????????????????????????????+
34854 ?????+++++++++++++++++++++++++
34855 ?????+++++++++++++++++++++++++
34856 ??????++++++++++++++++++++++++
34857 ?????++
34858 ?????+++
34859 ??????+++IIIIIIIIIIIIIIIIII
34860 ?????+++++IIIIIIIIIIIIIIIIII
34861 ?????++++++++++++++++++++++++
34862 ??????+++++++++++++++++++++++:
34863 ?????++
34864 ?????+++
34865 ??????++
34866 ??????????????????????????????II
34867 ??????????????????????????????IIII
34868 ,?????????????????????????????IIIII+
34869 =???++++++++++++++++++++++++++III?
34870 ?++++++++++++++++++++++++++++I+
34871*/
34872//__cplusplus needs 20+
34873#if !defined(__cplusplus)||__cplusplus<202002L
34874 //if msvc, check _MSVC_LANG
34875 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
34876 //ok
34877 #else
34878 #error "elc files needs c++20 or higher"
34879 #endif
34880#endif
34881
34882//check if the compiler is msvc
34883#if defined(_MSC_VER)
34884 //check if _CPPRTTI
34885 #if !defined(_CPPRTTI)
34886 #error "elc files needs rtti"
34887 #endif
34888 //check _MSC_VER at last 1932
34889 #if _MSC_VER<1932
34890 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
34891 #endif
34892#endif
34893
34894//file_end
34895
34896#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
34897#line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
34898
34899//file_end
34900
34901 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
34902 //operator<< & operator>>
34903 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
34904//base_stream
34905//at namespace ::
34906/*@
34907未完成的elc解释器include文件
34908由steve02081504与Alex0125设计、编写
34909转载时请在不对此文件做任何修改的同时注明出处
34910项目地址:https://github.com/ELC-lang/ELC
34911*/
34912/*
34913 ,??????????????????????????
34914 ????????????????????????????
34915 ?????????????????????????????+
34916 ?????+++++++++++++++++++++++++
34917 ?????+++++++++++++++++++++++++
34918 ??????++++++++++++++++++++++++
34919 ?????++
34920 ?????+++
34921 ??????+++IIIIIIIIIIIIIIIIII
34922 ?????+++++IIIIIIIIIIIIIIIIII
34923 ?????++++++++++++++++++++++++
34924 ??????+++++++++++++++++++++++:
34925 ?????++
34926 ?????+++
34927 ??????++
34928 ??????????????????????????????II
34929 ??????????????????????????????IIII
34930 ,?????????????????????????????IIIII+
34931 =???++++++++++++++++++++++++++III?
34932 ?++++++++++++++++++++++++++++I+
34933*/
34934#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
34935//pre_checks.hpp
34936/*
34937未完成的elc解释器_share文件
34938由steve02081504与Alex0125设计、编写
34939转载时请在不对此文件做任何修改的同时注明出处
34940项目地址:https://github.com/ELC-lang/ELC
34941*/
34942/*
34943 ,??????????????????????????
34944 ????????????????????????????
34945 ?????????????????????????????+
34946 ?????+++++++++++++++++++++++++
34947 ?????+++++++++++++++++++++++++
34948 ??????++++++++++++++++++++++++
34949 ?????++
34950 ?????+++
34951 ??????+++IIIIIIIIIIIIIIIIII
34952 ?????+++++IIIIIIIIIIIIIIIIII
34953 ?????++++++++++++++++++++++++
34954 ??????+++++++++++++++++++++++:
34955 ?????++
34956 ?????+++
34957 ??????++
34958 ??????????????????????????????II
34959 ??????????????????????????????IIII
34960 ,?????????????????????????????IIIII+
34961 =???++++++++++++++++++++++++++III?
34962 ?++++++++++++++++++++++++++++I+
34963*/
34964//__cplusplus needs 20+
34965#if !defined(__cplusplus)||__cplusplus<202002L
34966 //if msvc, check _MSVC_LANG
34967 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
34968 //ok
34969 #else
34970 #error "elc files needs c++20 or higher"
34971 #endif
34972#endif
34973
34974//check if the compiler is msvc
34975#if defined(_MSC_VER)
34976 //check if _CPPRTTI
34977 #if !defined(_CPPRTTI)
34978 #error "elc files needs rtti"
34979 #endif
34980 //check _MSC_VER at last 1932
34981 #if _MSC_VER<1932
34982 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
34983 #endif
34984#endif
34985
34986//file_end
34987
34988#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
34989#line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
34990
34991//file_end
34992
34993 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
34994 #define ELC_STRING
34995 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
34996//_body.hpp
34997//at namespace ::
34998/*
34999未完成的elc解释器string文件
35000由steve02081504与Alex0125设计、编写
35001转载时请在不对此文件做任何修改的同时注明出处
35002项目地址:https://github.com/ELC-lang/ELC
35003*/
35004/*
35005 ,??????????????????????????
35006 ????????????????????????????
35007 ?????????????????????????????+
35008 ?????+++++++++++++++++++++++++
35009 ?????+++++++++++++++++++++++++
35010 ??????++++++++++++++++++++++++
35011 ?????++
35012 ?????+++
35013 ??????+++IIIIIIIIIIIIIIIIII
35014 ?????+++++IIIIIIIIIIIIIIIIII
35015 ?????++++++++++++++++++++++++
35016 ??????+++++++++++++++++++++++:
35017 ?????++
35018 ?????+++
35019 ??????++
35020 ??????????????????????????????II
35021 ??????????????????????????????IIII
35022 ,?????????????????????????????IIIII+
35023 =???++++++++++++++++++++++++++III?
35024 ?++++++++++++++++++++++++++++I+
35025*/
35026#if defined(ELC_TEST)
35027 #error "this part cannot be tested."
35028#endif
35029namespace elc::defs{
35030 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
35031//_defs.hpp
35032/*
35033未完成的elc解释器basic文件
35034由steve02081504与Alex0125设计、编写
35035转载时请在不对此文件做任何修改的同时注明出处
35036项目地址:https://github.com/ELC-lang/ELC
35037*/
35038/*
35039 ,??????????????????????????
35040 ????????????????????????????
35041 ?????????????????????????????+
35042 ?????+++++++++++++++++++++++++
35043 ?????+++++++++++++++++++++++++
35044 ??????++++++++++++++++++++++++
35045 ?????++
35046 ?????+++
35047 ??????+++IIIIIIIIIIIIIIIIII
35048 ?????+++++IIIIIIIIIIIIIIIIII
35049 ?????++++++++++++++++++++++++
35050 ??????+++++++++++++++++++++++:
35051 ?????++
35052 ?????+++
35053 ??????++
35054 ??????????????????????????????II
35055 ??????????????????????????????IIII
35056 ,?????????????????????????????IIIII+
35057 =???++++++++++++++++++++++++++III?
35058 ?++++++++++++++++++++++++++++I+
35059*/
35060#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
35061//_defs.hpp
35062/*
35063未完成的elc解释器_share文件
35064由steve02081504与Alex0125设计、编写
35065转载时请在不对此文件做任何修改的同时注明出处
35066项目地址:https://github.com/ELC-lang/ELC
35067*/
35068/*
35069 ,??????????????????????????
35070 ????????????????????????????
35071 ?????????????????????????????+
35072 ?????+++++++++++++++++++++++++
35073 ?????+++++++++++++++++++++++++
35074 ??????++++++++++++++++++++++++
35075 ?????++
35076 ?????+++
35077 ??????+++IIIIIIIIIIIIIIIIII
35078 ?????+++++IIIIIIIIIIIIIIIIII
35079 ?????++++++++++++++++++++++++
35080 ??????+++++++++++++++++++++++:
35081 ?????++
35082 ?????+++
35083 ??????++
35084 ??????????????????????????????II
35085 ??????????????????????????????IIII
35086 ,?????????????????????????????IIIII+
35087 =???++++++++++++++++++++++++++III?
35088 ?++++++++++++++++++++++++++++I+
35089*/
35090
35091//undefs at "_undefs.hpp"
35092
35093#if defined(ELC_CODE_REALM)
35094 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
35095#endif
35096
35097//set ELC_WARNING_LEVEL default to 4(max)
35098#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
35099
35100#if defined(_MSC_VER)
35101 #pragma warning(push,ELC_WARNING_LEVEL)
35102 #pragma warning(disable:4099)//class与struct混用警告diss
35103 #pragma warning(disable:4584)//重复子类警告diss
35104 #pragma warning(disable:4250)//域控制继承警告diss
35105 #pragma warning(disable:26432)//不完全默认方法警告diss
35106 #pragma warning(disable:26435)//virtual override方法警告diss
35107 #pragma warning(disable:26481)//容器安利diss
35108 #pragma warning(disable:26446)//gsl::at安利diss
35109 #pragma warning(disable:26434)//方法覆盖警告diss
35110 #pragma warning(disable:26429)//gsl::not_null安利diss
35111 #pragma warning(disable:26471)//对void*进行static_cast安利diss
35112 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
35113 #pragma warning(disable:26473)//相同指针显式cast警告diss
35114 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
35115 #pragma warning(disable:26485)//数组作指针警告diss
35116 #pragma warning(disable:26490)//reinterpret_cast警告diss
35117 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
35118 #pragma warning(disable:26482)//非常数数组索引警告diss
35119 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
35120#endif
35121#if defined(__GNUC__)
35122 #pragma GCC diagnostic push
35123 #pragma GCC diagnostic warning "-Wall"//开启所有警告
35124 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
35125#endif
35126#if defined(_MSC_VER)
35127 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
35128 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
35129 #define push_msvc_warning() __pragma(warning(push))
35130 #define pop_msvc_warning() __pragma(warning(pop))
35131 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
35132#else
35133 //#define suppress_msvc_warning(...)
35134 #define disable_msvc_warning(...)
35135 #define push_msvc_warning()
35136 #define pop_msvc_warning()
35137 #define push_and_disable_msvc_warning(...)
35138#endif
35139#if defined(_MSC_VER)
35140 //push pack settings
35141 #pragma pack(push)
35142 #pragma pack()
35143#endif
35144#if defined(_MSC_VER)
35145 //push and undef common macros
35146 #pragma push_macro("new")
35147 #undef new
35148 #pragma push_macro("delete")
35149 #undef delete
35150 #pragma push_macro("min")
35151 #undef min
35152 #pragma push_macro("max")
35153 #undef max
35154 #pragma push_macro("abs")
35155 #undef abs
35156 #pragma push_macro("export")
35157 #undef export
35158 #pragma push_macro("rand")
35159 #undef rand
35160 #pragma push_macro("sqrt")
35161 #undef sqrt
35162 #pragma push_macro("type_info")
35163 #undef type_info
35164 #pragma push_macro("elc")
35165 #undef elc
35166#endif
35167//
35168#if defined(ELC_VOID_NAME)
35169 #undef void
35170#endif
35171//
35172#if defined(ELC_PUBLIC_ALL)
35173 #define protected public
35174 #define private public
35175#endif
35176//
35177#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
35178 #undef rand
35179#endif
35180
35181// #define often_noexcept
35182#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
35183#define noexcept_as_auto MAGIC//哦现在有了
35184#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
35185#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
35186
35187#define using_method_from_base_t(name,...) \
35188template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
35189auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
35190{\
35191 return base_t::name(forward<Args>(rest)...);\
35192}\
35193
35194#define using_method_from_value(name,value_name,...) \
35195template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
35196auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
35197{\
35198 return value_name.name(forward<Args>(rest)...);\
35199}\
35200
35201#define floop while(__builtin_is_my_dick_still_there())
35202#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
35203#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
35204#if defined(_MSC_VER) && _MSC_VER>=1935
35205 //@see https://developercommunity.visualstudio.com/t/10193638
35206 #define enable_adl(name) template<typename=void>void name()noexcept=delete
35207#else
35208 #define enable_adl(name) void name()noexcept=delete
35209#endif
35210
35211#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
35212#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
35213
35214#define declvalue(...) (::std::declval<__VA_ARGS__>())
35215
35217#define template_error(reason) static_assert(template_error_helper<T>,reason)
35219#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
35221#define template_warning(reason) template_warning_helper<T>(reason)
35222
35223//for type_info
35224#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
35225#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
35226
35227#define is_common_attribute(name) public attribute<T,name<T>>
35228#define is_special_attribute(name) public attribute<T,name>
35229
35230#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
35231#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
35232
35233//for float_size_t
35234#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
35235//bitnum_of
35236#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
35237
35238//for attribute
35239#define def_common_attribute_with_nothing(name) \
35240template<typename T>\
35241class name{}\
35242
35243#define def_special_attribute_with_nothing(name) \
35244class name{}\
35245
35246#define common_attribute_t template<class>class
35247#define special_attribute_t class
35248
35257#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
35259#define enabled_by_default class enable_state=void
35261#define disabled_by_default class enable_state= ::std::enable_if_t<false>
35263#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
35265#define enable_flag class enable_state
35266
35267#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
35268#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
35269#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
35270#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
35271#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
35272
35274#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
35276#define get_recursive_λ_caller(name,...) \
35277exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
35278 return name(name,Args...);\
35279}
35281#define λ []
35283#define exλ [&]
35285#define λ_with_catch(...) [__VA_ARGS__]
35287#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
35288//recursive_λ_self_referential_reserved_symbolname
35289#define λ_RLSRRS _my_jb_super_sb_name_
35290
35291#if defined(_MSC_VER) && !defined(__clang__)
35292 #define λ_inline [[msvc::forceinline]]
35293 #define λ_force_inline [[msvc::forceinline]]
35294#elif
35295 #define λ_inline [[gnu::always_inline]]
35296 #define λ_force_inline [[gnu::always_inline]]
35297#else
35298 #define λ_inline
35299 #define λ_force_inline
35300#endif
35301
35302#define MAGIC//ahh,ko no tenno da!
35303
35305#define nothing
35306
35308#define elseif else if
35310#define _big_than_ >
35312#define _small_than_ <
35313
35314#if defined(_MSC_VER)
35315 #define not !
35316 #define and &&
35317 #define or ||
35318#endif
35319
35321#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
35323#define BREAK_NAMESPACE }
35324
35326#define template_name template
35328#define type_name class
35329
35330#if defined(DEBUG) || defined(_DEBUG)
35331 #define not_in_debug 0
35332 #define in_debug 1
35333#else
35334 #define not_in_debug 1
35335 #define in_debug 0
35336#endif
35337
35338#define es U""
35339#define ec(ch) U ## ch
35340
35341#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
35342 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
35343#else
35344 #define ELC_TEST_EVENTNAME(name)
35345#endif
35346
35347#define override_instance_struct \
35348protected:\
35349 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
35350 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
35351 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
35352 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
35353 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
35354
35355#if defined(_MSC_VER) && !defined(__clang__)
35356 #define distinctive __declspec(dllexport)
35357#else
35358 #define distinctive
35359#endif
35360
35361#if defined(_MSC_VER) && !defined(__clang__)
35362 #define force_inline __forceinline
35363#elif defined(__GNUC__) || defined(__clang__)
35364 #define force_inline __attribute__((always_inline)) inline
35365#else
35366 #define force_inline inline
35367#endif
35368
35369#if defined(_MSC_VER) && !defined(__clang__)
35370 #define with_no_vtable __declspec(novtable)
35371#else
35372 #define with_no_vtable
35373#endif
35374
35375#define in_consteval (::std::is_constant_evaluated())
35376
35377#define no_vtable_struct struct with_no_vtable
35378#define no_vtable_class class with_no_vtable
35379
35380//#define get_elc_defs using namespace ::elc::defs
35381
35382//file_end
35383
35384#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
35385
35386//file_end
35387
35388 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
35389
35390 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/defs.hpp"
35391//defs.hpp
35392//at namespace elc::defs
35393/*
35394未完成的elc解释器string文件
35395由steve02081504与Alex0125设计、编写
35396转载时请在不对此文件做任何修改的同时注明出处
35397项目地址:https://github.com/ELC-lang/ELC
35398*/
35399/*
35400 ,??????????????????????????
35401 ????????????????????????????
35402 ?????????????????????????????+
35403 ?????+++++++++++++++++++++++++
35404 ?????+++++++++++++++++++++++++
35405 ??????++++++++++++++++++++++++
35406 ?????++
35407 ?????+++
35408 ??????+++IIIIIIIIIIIIIIIIII
35409 ?????+++++IIIIIIIIIIIIIIIIII
35410 ?????++++++++++++++++++++++++
35411 ??????+++++++++++++++++++++++:
35412 ?????++
35413 ?????+++
35414 ??????++
35415 ??????????????????????????????II
35416 ??????????????????????????????IIII
35417 ,?????????????????????????????IIIII+
35418 =???++++++++++++++++++++++++++III?
35419 ?++++++++++++++++++++++++++++I+
35420*/
35421namespace string_n{
35422 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
35423//_body.hpp
35424//at namespace elc::defs::string_n
35425/*
35426未完成的elc解释器string文件
35427由steve02081504与Alex0125设计、编写
35428转载时请在不对此文件做任何修改的同时注明出处
35429项目地址:https://github.com/ELC-lang/ELC
35430*/
35431/*
35432 ,??????????????????????????
35433 ????????????????????????????
35434 ?????????????????????????????+
35435 ?????+++++++++++++++++++++++++
35436 ?????+++++++++++++++++++++++++
35437 ??????++++++++++++++++++++++++
35438 ?????++
35439 ?????+++
35440 ??????+++IIIIIIIIIIIIIIIIII
35441 ?????+++++IIIIIIIIIIIIIIIIII
35442 ?????++++++++++++++++++++++++
35443 ??????+++++++++++++++++++++++:
35444 ?????++
35445 ?????+++
35446 ??????++
35447 ??????????????????????????????II
35448 ??????????????????????????????IIII
35449 ,?????????????????????????????IIIII+
35450 =???++++++++++++++++++++++++++III?
35451 ?++++++++++++++++++++++++++++I+
35452*/
35453inline namespace string_data_n{
35454 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_decl.hpp"
35455//_decl.hpp
35456//at namespace elc::defs::string_n::string_data_n
35457/*
35458未完成的elc解释器string文件
35459由steve02081504与Alex0125设计、编写
35460转载时请在不对此文件做任何修改的同时注明出处
35461项目地址:https://github.com/ELC-lang/ELC
35462*/
35463/*
35464 ,??????????????????????????
35465 ????????????????????????????
35466 ?????????????????????????????+
35467 ?????+++++++++++++++++++++++++
35468 ?????+++++++++++++++++++++++++
35469 ??????++++++++++++++++++++++++
35470 ?????++
35471 ?????+++
35472 ??????+++IIIIIIIIIIIIIIIIII
35473 ?????+++++IIIIIIIIIIIIIIIIII
35474 ?????++++++++++++++++++++++++
35475 ??????+++++++++++++++++++++++:
35476 ?????++
35477 ?????+++
35478 ??????++
35479 ??????????????????????????????II
35480 ??????????????????????????????IIII
35481 ,?????????????????????????????IIIII+
35482 =???++++++++++++++++++++++++++III?
35483 ?++++++++++++++++++++++++++++I+
35484*/
35485template<typename char_T>
35486struct base_string_data_t;
35487
35488template<typename char_T>
35489struct null_string_data_t;
35490template<typename char_T>
35492
35493template<typename char_T>
35494struct comn_string_data_t;
35495
35496template<typename char_T>
35498
35499template<typename char_T>
35501template<typename char_T>
35503
35504template<typename char_T>
35505struct sum_string_data_t;
35506
35507template<typename char_T>
35509template<typename char_T>
35511
35512//template<typename char_T>
35513//struct replaced_string_data_t;
35514
35515template<typename char_T>
35517
35518//file_end
35519
35520 #line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
35521
35522 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/base_string_data_t.hpp"
35523//base_string_data_t.hpp
35524//at namespace elc::defs::string_n::string_data_n
35525/*
35526未完成的elc解释器string文件
35527由steve02081504与Alex0125设计、编写
35528转载时请在不对此文件做任何修改的同时注明出处
35529项目地址:https://github.com/ELC-lang/ELC
35530*/
35531/*
35532 ,??????????????????????????
35533 ????????????????????????????
35534 ?????????????????????????????+
35535 ?????+++++++++++++++++++++++++
35536 ?????+++++++++++++++++++++++++
35537 ??????++++++++++++++++++++++++
35538 ?????++
35539 ?????+++
35540 ??????+++IIIIIIIIIIIIIIIIII
35541 ?????+++++IIIIIIIIIIIIIIIIII
35542 ?????++++++++++++++++++++++++
35543 ??????+++++++++++++++++++++++:
35544 ?????++
35545 ?????+++
35546 ??????++
35547 ??????????????????????????????II
35548 ??????????????????????????????IIII
35549 ,?????????????????????????????IIIII+
35550 =???++++++++++++++++++++++++++III?
35551 ?++++++++++++++++++++++++++++I+
35552*/
35553template<typename char_T>
35555 with_common_attribute<abstract_base,never_in_array,replace_able,ref_able>,build_by_get_only{
35557 typedef comn_ptr_t<this_t> ptr_t;
35559 typedef char_T*string_ptr_t;
35560 typedef const char_T*const_string_ptr_t;
35561
35562 static_assert(noexcept(declvalue(ptr_t).operator*()));//貌似msvc在这里有bug
35563
35564 static constexpr bool copy_assign_nothrow=copy_assign.nothrow<char_T>;
35565 static constexpr bool copy_construct_nothrow=copy_construct.nothrow<char_T>;
35566 static constexpr bool move_construct_nothrow=move_construct.nothrow<char_T>;
35567 static constexpr bool construct_nothrow=construct<char_T>.nothrow<>;
35568 static constexpr bool destruct_nothrow=destruct.nothrow<char_T>;
35569 static constexpr bool clear_nothrow=destruct_nothrow;
35570 static constexpr bool ptr_reset_nothrow=destruct_nothrow;
35571 static constexpr bool hash_nothrow=hash.nothrow<char_T>;
35572 static constexpr bool get_data_nothrow=copy_construct_nothrow&&destruct_nothrow;
35573 static constexpr bool apply_data_nothrow=construct_nothrow&&copy_assign_nothrow;
35574
35575 friend class null_string_data_t<char_T>;
35576 friend class constexpr_string_data_t<char_T>;
35577 friend class comn_string_data_t<char_T>;
35578 friend class substr_string_data_t<char_T>;
35579 friend class head_apply_string_data_t<char_T>;
35580 friend class end_apply_string_data_t<char_T>;
35581 friend class sum_string_data_t<char_T>;
35582 friend class erased_string_data_t<char_T>;
35583 friend class inserted_string_data_t<char_T>;
35584 //friend class replaced_string_data_t<char_T>;
35585 friend class same_value_compress_string_data_t<char_T>;
35586
35587 base_string_data_t()noexcept=default;
35588 base_string_data_t(never_ref_num_zero_t)noexcept{ attribute_ptr_cast<ref_able>(this)->init_never_ref_num_zero(); }
35589
35590 [[nodiscard]]bool is_unique()noexcept{ return get_ref_num(this)==1; }
35591 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)=0;
35592
35593 virtual ~base_string_data_t()noexcept(destruct_nothrow)=default;
35594
35595 [[nodiscard]]virtual string_ptr_t get_c_str(ptr_t&)noexcept(get_data_nothrow);
35596 [[nodiscard]]virtual const_string_ptr_t get_const_c_str(ptr_t&p)noexcept(get_data_nothrow){return get_c_str(p);}
35597 [[nodiscard]]virtual const char_T* get_data(ptr_t&p)noexcept(get_data_nothrow){return get_c_str(p);}//不要求以0结尾
35598 [[nodiscard]]virtual string_ptr_t get_unique_c_str(ptr_t&)noexcept(get_data_nothrow);
35599 [[nodiscard]]virtual size_t get_size()noexcept=0;
35600 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept;
35601 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow);
35602 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow);
35603 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow);
35604 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow);
35605
35606 [[nodiscard]]virtual ptr_t do_insert(size_t pos,string_view_t str)noexcept(copy_construct_nothrow);
35607 [[nodiscard]]virtual ptr_t do_insert(size_t pos,ptr_t str)noexcept;
35608 [[nodiscard]]virtual ptr_t do_erase(size_t pos,size_t size)noexcept;
35609
35610 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow){
35611 if(size==0)return this;
35612 const auto pos = this->get_size()-size;
35613 const auto before = get_substr_data(0,pos);
35614 return before;
35615 }
35616 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow){
35617 if(size==0)return this;
35618 const auto pos = size;
35619 const auto after = get_substr_data(pos,this->get_size()-size);
35620 return after;
35621 }
35622 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow){
35623 if(size==0)return null_ptr;
35624 const auto pos = this->get_size()-size;
35625 const auto before = get_substr_data(0,pos);
35626 const auto after = get_substr_data(pos,size);
35627 self = before;
35628 return after;
35629 }
35630 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow){
35631 if(size==0)return null_ptr;
35632 const auto pos = size;
35633 const auto before = get_substr_data(0,pos);
35634 const auto after = get_substr_data(pos,this->get_size()-size);
35635 self = after;
35636 return before;
35637 }
35638 /*
35639 TODO:
35640
35641 find
35642 rfind
35643 find_first_of
35644 find_first_not_of
35645 find_last_of
35646 find_last_not_of
35647
35648 starts_with
35649 ends_with
35650 contains
35651 replace
35652 */
35654protected:
35655 bool same_type(ptr_t a)noexcept{return typeid(*this)==typeid(*a);}
35656 [[nodiscard]]virtual bool same_struct(ptr_t)noexcept=0;
35657 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)=0;
35658 [[nodiscard]]virtual compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)=0;
35659protected:
35661private:
35662 [[nodiscard]]bool base_equal_with(ptr_t with)noexcept(equal.nothrow<char_T>){
35663 push_and_disable_msvc_warning(26494);//未初始化警告diss
35664 bool aret;
35665 {
35666 //同结构比较优化比较方式
35667 if(same_type(with)&&same_struct(with))
35668 aret=same_struct_equal(with);
35669 //否则默认比较
35670 else
35671 aret=default_equal_method(with);
35672 }
35674 //如果equal,则eq处理
35675 if(aret)
35676 equivalent_optimization(this,with);
35677 return aret;
35678 }
35679public:
35680 [[nodiscard]]bool equal_with(ptr_t with)noexcept(equal.nothrow<char_T>){
35681 //eq->equal优化
35682 if(this==with)
35683 return true;
35684 //hash_diff->not_equal优化
35685 if(this->has_hash_cache()&&with->has_hash_cache())
35686 if(this->get_hash_cache()!=with->get_hash_cache())
35687 return false;
35688 //size比较优化
35689 if(this->get_size()!=with->get_size())
35690 return false;
35691 //快速比较结束,实际比较段
35692 return base_equal_with(with);
35693 }
35694 [[nodiscard]]bool equal_with_same_size(ptr_t with)noexcept(equal.nothrow<char_T>){
35695 //eq->equal优化
35696 if(this==with)
35697 return true;
35698 //hash_diff->not_equal优化
35699 if(this->has_hash_cache()&&with->has_hash_cache())
35700 if(this->get_hash_cache()!=with->get_hash_cache())
35701 return false;
35702 //size比较优化被移除
35703 //快速比较结束,实际比较段
35704 return base_equal_with(with);
35705 }
35706protected:
35707 [[nodiscard]]bool default_equal_method(ptr_t with)noexcept(equal.nothrow<char_T>){
35708 const size_t self_size=get_size();
35709 return equal_with(with,0,self_size);
35710 }
35711public:
35712 [[nodiscard]]bool equal_with(ptr_t with,size_t pos,size_t size)noexcept(equal.nothrow<char_T>){
35713 //eq->equal优化
35714 if(this==with)
35715 return true;
35716 size_t index=pos;
35717 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35718 auto b=with->get_the_largest_complete_data_block_begin_form(index);
35719 while(size){
35720 const size_t step=min({a.size(),b.size(),size});
35721 if(a.begin()!=b.begin())//起始地址不同时才需要真的比较
35722 if(!equal(a.begin(),b.begin(),step))
35723 return false;
35724 index+=step;
35725 size-=step;
35726 if(a.size()==step)
35727 a=this->get_the_largest_complete_data_block_begin_form(index);
35728 else
35729 a={a.begin()+step,note::size(a.size()-step)};
35730 if(b.size()==step)
35731 b=with->get_the_largest_complete_data_block_begin_form(index);
35732 else
35733 b={b.begin()+step,note::size(b.size()-step)};
35734 if(!a.size()&&!b.size())
35735 return a.size()==b.size();
35736 }
35737 return true;
35738 }
35739 [[nodiscard]]bool equal_with(string_view_t with)noexcept(equal.nothrow<char_T>){
35740 size_t size=with.size();
35741 size_t index=0;
35742 if(this->get_size()!=with.size())
35743 return false;
35744 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35745 if(a.begin()==with.begin() && a.size()==with.size())
35746 return true;
35747 floop{
35748 auto b=with.begin()+index;
35749 const size_t step=min({a.size(),with.size()-index,size});
35750 if(!equal(a.begin(),b,step))
35751 return false;
35752 index+=step;
35753 size-=step;
35754 if(a.size()==step)
35755 a=this->get_the_largest_complete_data_block_begin_form(index);
35756 else
35757 a={a.begin()+step,note::size(a.size()-step)};
35758 if(!a.size()||!size)
35759 return a.size()==size;
35760 }
35761 }
35762 [[nodiscard]]bool equal_with(const_string_ptr_t with)noexcept(equal.nothrow<char_T>){
35763 size_t size=get_size();
35764 size_t index=0;
35765 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35766 if(a.begin()==with && with[a.size()]==char_T{})
35767 return true;
35768 floop{
35769 auto b=with+index;
35770 if(!*b)
35771 return false;
35772 const size_t step=min({a.size(),size});
35773 if(!equal(a.begin(),step,just_an_part,b,end_by_zero))
35774 return false;
35775 index+=step;
35776 size-=step;
35777 if(a.size()==step)
35778 a=this->get_the_largest_complete_data_block_begin_form(index);
35779 else
35780 a={a.begin()+step,note::size(a.size()-step)};
35781 if(!*(b+step))
35782 return !a.size();
35783 if(!a.size())
35784 return !*(b+step);
35785 }
35786 }
35787private:
35788 [[nodiscard]]compare_type base_compare_with(ptr_t with)noexcept(compare.nothrow<char_T>){
35789 push_and_disable_msvc_warning(26494);//未初始化警告diss
35790 compare_type aret;
35791 {
35792 //同结构比较优化比较方式
35793 if(same_type(with)&&same_struct(with))
35794 aret=same_struct_compare(with);
35795 //否则默认比较
35796 else
35797 aret=default_compare_method(with);
35798 }
35800 //如果equal,则eq处理
35801 if(aret==0)
35802 equivalent_optimization(this,with);
35803 return aret;
35804 }
35805public:
35806 [[nodiscard]]compare_type compare_with(ptr_t with)noexcept(compare.nothrow<char_T>){
35807 //eq->equal优化
35808 if(this==with)
35809 return strong_ordering::equivalent;
35810 //size比较优化
35811 {
35812 auto scom=compare(this->get_size(),with->get_size());
35813 if(scom!=0)
35814 return scom;
35815 }
35816 //快速比较结束,实际比较段
35817 return base_compare_with(with);
35818 }
35819 [[nodiscard]]compare_type compare_with_same_size(ptr_t with)noexcept(compare.nothrow<char_T>){
35820 //eq->equal优化
35821 if(this==with)
35822 return strong_ordering::equivalent;
35823 //size比较优化被移除
35824 //快速比较结束,实际比较段
35825 return base_compare_with(with);
35826 }
35827protected:
35828 [[nodiscard]]compare_type default_compare_method(ptr_t with)noexcept(compare.nothrow<char_T>){
35829 const size_t self_size=get_size();
35830 return compare_with(with,0,self_size);
35831 }
35832public:
35833 [[nodiscard]]compare_type compare_with(ptr_t with,size_t pos,size_t size)noexcept(compare.nothrow<char_T>){
35834 //eq->equal优化
35835 if(this==with)
35836 return strong_ordering::equivalent;
35837 size_t index=pos;
35838 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35839 auto b=with->get_the_largest_complete_data_block_begin_form(index);
35840 while(size){
35841 const size_t step=min({a.size(),b.size(),size});
35842 if(a.begin()!=b.begin())//起始地址不同时才需要真的比较
35843 if(auto tmp=compare(a.begin(),b.begin(),step); tmp!=0)
35844 return tmp;
35845 index+=step;
35846 size-=step;
35847 if(a.size()==step)
35848 a=this->get_the_largest_complete_data_block_begin_form(index);
35849 else
35850 a={a.begin()+step,note::size(a.size()-step)};
35851 if(b.size()==step)
35852 b=with->get_the_largest_complete_data_block_begin_form(index);
35853 else
35854 b={b.begin()+step,note::size(b.size()-step)};
35855 if(!a.size()||!b.size())
35856 return a.size()<=>b.size();
35857 }
35858 return strong_ordering::equivalent;
35859 }
35860 [[nodiscard]]compare_type compare_with(string_view_t with)noexcept(compare.nothrow<char_T>){
35861 size_t size=with.size();
35862 size_t index=0;
35863 {
35864 auto scom=compare(this->get_size(),size);
35865 if(scom!=0)
35866 return scom;
35867 }
35868 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35869 if(a.begin()==with.begin() && a.size()==with.size())
35870 return strong_ordering::equivalent;
35871 floop{
35872 auto b=with.begin()+index;
35873 size_t step=min({a.size(),with.size()-index,size});
35874 if(auto tmp=compare(a.begin(),b,step); tmp!=0)
35875 return tmp;
35876 index+=step;
35877 size-=step;
35878 if(a.size()==step)
35879 a=this->get_the_largest_complete_data_block_begin_form(index);
35880 else
35881 a={a.begin()+step,note::size(a.size()-step)};
35882 if(!a.size()||!size)
35883 return a.size()<=>size;
35884 }
35885 }
35886 [[nodiscard]]compare_type compare_with(const_string_ptr_t with)noexcept(compare.nothrow<char_T>){
35887 size_t size=get_size();
35888 size_t index=0;
35889 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35890 if(a.begin()==with && with[a.size()]==char_T{})
35891 return strong_ordering::equivalent;
35892 floop{
35893 auto b=with+index;
35894 if(!*b)
35895 return strong_ordering::greater;
35896 size_t step=min({a.size(),size});
35897 if(auto tmp=compare(a.begin(),step,just_an_part,b,end_by_zero); tmp!=0)
35898 return tmp;
35899 index+=step;
35900 size-=step;
35901 if(a.size()==step)
35902 a=this->get_the_largest_complete_data_block_begin_form(index);
35903 else
35904 a={a.begin()+step,note::size(a.size()-step)};
35905 if(!a.size())
35906 return *(with+index)==char_T{}? strong_ordering::equivalent:
35907 strong_ordering::less;
35908 if(!*(with+index))
35909 return strong_ordering::greater;
35910 }
35911 }
35912protected:
35913 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)=0;
35914public:
35915 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)=0;
35916 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)=0;
35917protected:
35918 hash_t _hash_cache{};
35919 bool _has_hash_cache=false;
35920 bool has_hash_cache()noexcept{return _has_hash_cache;}
35921 void reset_hash_cache()noexcept{_has_hash_cache=false;}
35922 hash_t get_hash_cache()noexcept{return _hash_cache;}
35923 hash_t set_hash_cache(hash_t value)noexcept{_has_hash_cache=true;return _hash_cache=value;}
35924public:
35925 hash_t get_hash(ptr_t&p)noexcept(hash_nothrow){
35926 if(has_hash_cache())
35927 return get_hash_cache();
35928 else{
35929 const auto tmp=this->get_hash_detail(p);
35930 return p->set_hash_cache(tmp);
35931 }
35932 }
35933protected:
35934 virtual hash_t get_hash_detail(ptr_t&p)noexcept(hash_nothrow){
35935 const auto size=get_size();
35936 const auto data=get_data(p);
35937 return hash(data,size);
35938 }
35939public:
35940 hash_t get_others_hash_with_calculated_before(hash_t before,size_t before_size,ptr_t&p,size_t pos,size_t size)noexcept(hash_nothrow){
35941 if(pos==0&&size==get_size())
35942 return hash.merge_array_hash_results(before,before_size,get_hash(p),size);
35943 return this->get_others_hash_with_calculated_before_detail(before,before_size,p,pos,size);
35944 }
35945protected:
35946 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&p,size_t pos,size_t size)noexcept(hash_nothrow){
35947 return hash.with_calculated_before(before,before_size,get_data(p)+pos,size);
35948 }
35949protected:
35950 void self_changed()noexcept{
35951 reset_hash_cache();
35952 }
35953 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept=0;
35954public:
35955 [[nodiscard]]float_size_t get_memory_cost()noexcept{
35956 return get_base_memory_cost()/get_ref_num(this);
35957 }
35958 [[nodiscard]]float_size_t get_memory_cost_after_gc()noexcept;
35959 [[nodiscard]]float_size_t get_gc_profit()noexcept{return get_memory_cost()-get_memory_cost_after_gc();}
35960 [[nodiscard]]bool positive_gc_profit()noexcept{return get_gc_profit() > 0;}
35961 //for gc:
35962 /*
35963 [[nodiscard]]virtual bool gc()=0{
35964 bool need_be_replace=get_gc_profit()>=0
35965 if(need_be_replace)
35966 this->be_replace_as(get<comn_string_data_t>(this));
35967 return need_be_replace;
35968 }
35969 */
35970
35971 [[nodiscard]]virtual const range_n::match_pattern<const char_T>& get_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow);
35972 [[nodiscard]]virtual const range_n::reverse_match_pattern<const char_T>& get_reverse_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow);
35973
35974protected:
35975 static inline void be_replace(this_t* a,ptr_t b)noexcept(ptr_reset_nothrow){
35976 a->be_replace_as(b);
35977 }
35978 static inline void be_replace(ptr_t& a,ptr_t b)noexcept(ptr_reset_nothrow){
35979 a.do_replace(b);
35980 }
35981 static inline void equivalent_optimization(auto&& a,auto&& b)noexcept(ptr_reset_nothrow){
35982 if(a->get_memory_cost() >= b->get_memory_cost())
35983 be_replace(a,b);
35984 else
35985 be_replace(b,a);
35986 }
35987public:
35988 //Pre-alloc before begin memory
35989 [[nodiscard]]virtual ptr_t pre_alloc_before_begin(size_t size)noexcept;
35990 //Pre-alloc after end memory
35991 [[nodiscard]]virtual ptr_t pre_alloc_after_end(size_t size)noexcept;
35992
35993 //io
35995 size_t index=0;
35996 auto a=this->get_the_largest_complete_data_block_begin_form(index);
35997 while(a.size()){
35998 os.write(a.begin(),a.size());
35999 index+=a.size();
36000 a=this->get_the_largest_complete_data_block_begin_form(index);
36001 }
36002 }
36003};
36004template<typename char_T>
36007}
36008
36009//file_end
36010
36011 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
36012
36013 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/null_string_data_t.hpp"
36014//null_string_data_t.hpp
36015//at namespace elc::defs::string_n::string_data_n
36016/*
36017未完成的elc解释器string文件
36018由steve02081504与Alex0125设计、编写
36019转载时请在不对此文件做任何修改的同时注明出处
36020项目地址:https://github.com/ELC-lang/ELC
36021*/
36022/*
36023 ,??????????????????????????
36024 ????????????????????????????
36025 ?????????????????????????????+
36026 ?????+++++++++++++++++++++++++
36027 ?????+++++++++++++++++++++++++
36028 ??????++++++++++++++++++++++++
36029 ?????++
36030 ?????+++
36031 ??????+++IIIIIIIIIIIIIIIIII
36032 ?????+++++IIIIIIIIIIIIIIIIII
36033 ?????++++++++++++++++++++++++
36034 ??????+++++++++++++++++++++++:
36035 ?????++
36036 ?????+++
36037 ??????++
36038 ??????????????????????????????II
36039 ??????????????????????????????IIII
36040 ,?????????????????????????????IIIII+
36041 =???++++++++++++++++++++++++++III?
36042 ?++++++++++++++++++++++++++++I+
36043*/
36044template<typename char_T>
36045struct null_string_data_t final:base_string_data_t<char_T>,instance_struct<null_string_data_t<char_T>>{
36048 using base_t::ptr_t;
36052
36053 using base_t::copy_assign_nothrow;
36054 using base_t::copy_construct_nothrow;
36055 using base_t::move_construct_nothrow;
36056 using base_t::construct_nothrow;
36057 using base_t::destruct_nothrow;
36058 using base_t::clear_nothrow;
36059 using base_t::ptr_reset_nothrow;
36060 using base_t::hash_nothrow;
36061 using base_t::get_data_nothrow;
36062 using base_t::apply_data_nothrow;
36063 using base_t::set_hash_cache;
36064
36065 null_string_data_t()noexcept:base_t(never_ref_num_zero){}
36066
36067 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{nothing;}
36068 [[nodiscard]]virtual string_ptr_t get_c_str(ptr_t&)noexcept override final{
36069 static char_T data[1]{};
36070 return data;
36071 }
36072 [[nodiscard]]virtual size_t get_size()noexcept override final{ return 0; }
36073 [[nodiscard]]virtual ptr_t get_substr_data([[maybe_unused]]size_t begin,[[maybe_unused]]size_t size)noexcept override final{ return this; }
36074 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{ return get<comn_string_data_t<char_T>>(str); }
36075 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{ return str; }
36076 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{ return get<comn_string_data_t<char_T>>(str); }
36077 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept override final{ return str; }
36078
36079 [[nodiscard]]virtual ptr_t do_insert([[maybe_unused]]size_t pos,[[maybe_unused]]string_view_t str)noexcept(construct_nothrow&&copy_assign_nothrow)override final{ return get<comn_string_data_t<char_T>>(str); }
36080 [[nodiscard]]virtual ptr_t do_insert([[maybe_unused]]size_t pos,[[maybe_unused]]ptr_t str)noexcept override final{ return str; }
36081 [[nodiscard]]virtual ptr_t do_erase([[maybe_unused]]size_t pos,[[maybe_unused]]size_t size)noexcept override final{ return this; }
36082protected:
36083 virtual void copy_part_data_to([[maybe_unused]]char_T* to,[[maybe_unused]]size_t pos,[[maybe_unused]]size_t size)noexcept override final{ return; }
36084public:
36085 [[nodiscard]]virtual char_T arec([[maybe_unused]]size_t index)noexcept override final{ return char_T{}; }
36086 virtual void arec_set([[maybe_unused]]size_t index,[[maybe_unused]]char_T a,[[maybe_unused]]ptr_t& p)noexcept override final{ nothing; }
36087 [[nodiscard]]virtual ptr_t do_remove_front([[maybe_unused]]size_t size)noexcept override final{ return this; }
36088 [[nodiscard]]virtual ptr_t do_remove_back([[maybe_unused]]size_t size)noexcept override final{ return this; }
36089 [[nodiscard]]virtual ptr_t do_pop_back([[maybe_unused]]size_t size,[[maybe_unused]]ptr_t& self)noexcept override final{ return this; }
36090 [[nodiscard]]virtual ptr_t do_pop_front([[maybe_unused]]size_t size,[[maybe_unused]]ptr_t& self)noexcept override final{ return this; }
36091protected:
36092 virtual hash_t get_hash_detail([[maybe_unused]]ptr_t&p)noexcept override final{ return hash(nothing); }
36093 virtual hash_t get_others_hash_with_calculated_before_detail([[maybe_unused]]hash_t before,[[maybe_unused]]size_t before_size,[[maybe_unused]]ptr_t&p,[[maybe_unused]]size_t pos,[[maybe_unused]]size_t size)noexcept override final{ return before; }
36094protected:
36095 [[nodiscard]]virtual bool same_struct(ptr_t)noexcept override final{return false;}
36096 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form([[maybe_unused]]size_t begin)noexcept override final{return{0,0};}
36097 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept override final{return false;}
36098 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept override final{return strong_ordering::equivalent;}
36099 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{return 0;}
36100};
36101template<typename char_T>
36103template<typename char_T>
36104base_string_data_t<char_T>* the_get_null_ptr(const base_string_data_t<char_T>*)noexcept{ return&null_string_data<char_T>; }
36105
36106//file_end
36107
36108 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
36109 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/constexpr_string_data_t.hpp"
36110//constexpr_string_data_t.hpp
36111//at namespace elc::defs::string_n::string_data_n
36112/*
36113未完成的elc解释器string文件
36114由steve02081504与Alex0125设计、编写
36115转载时请在不对此文件做任何修改的同时注明出处
36116项目地址:https://github.com/ELC-lang/ELC
36117*/
36118/*
36119 ,??????????????????????????
36120 ????????????????????????????
36121 ?????????????????????????????+
36122 ?????+++++++++++++++++++++++++
36123 ?????+++++++++++++++++++++++++
36124 ??????++++++++++++++++++++++++
36125 ?????++
36126 ?????+++
36127 ??????+++IIIIIIIIIIIIIIIIII
36128 ?????+++++IIIIIIIIIIIIIIIIII
36129 ?????++++++++++++++++++++++++
36130 ??????+++++++++++++++++++++++:
36131 ?????++
36132 ?????+++
36133 ??????++
36134 ??????????????????????????????II
36135 ??????????????????????????????IIII
36136 ,?????????????????????????????IIIII+
36137 =???++++++++++++++++++++++++++III?
36138 ?++++++++++++++++++++++++++++I+
36139*/
36140template<typename char_T>
36141struct constexpr_string_data_t final:base_string_data_t<char_T>,instance_struct<constexpr_string_data_t<char_T>>{
36144 using base_t::ptr_t;
36148
36149 using base_t::copy_assign_nothrow;
36150 using base_t::copy_construct_nothrow;
36151 using base_t::move_construct_nothrow;
36152 using base_t::construct_nothrow;
36153 using base_t::destruct_nothrow;
36154 using base_t::clear_nothrow;
36155 using base_t::ptr_reset_nothrow;
36156 using base_t::hash_nothrow;
36157 using base_t::get_data_nothrow;
36158 using base_t::apply_data_nothrow;
36159 using base_t::set_hash_cache;
36160
36161 const char_T* _m;
36162 size_t _size;
36163
36164 const range_n::match_pattern<const char_T>* _p_match_pattern = nullptr;
36165 const range_n::reverse_match_pattern<const char_T>* _p_reverse_match_pattern = nullptr;
36166 bool match_pattern_by_get = 0;
36167
36168 void clear_match_pattern()noexcept{
36169 if(match_pattern_by_get){
36170 unget(remove_const(_p_match_pattern));
36171 unget(remove_const(_p_reverse_match_pattern));
36172 _p_match_pattern = nullptr;
36173 _p_reverse_match_pattern = nullptr;
36174 }
36175 }
36176
36178 _m=str.begin();
36179 _size=str.size();
36180 set_hash_cache(hash(str));
36181 _p_match_pattern=&str.match_pattern;
36182 _p_reverse_match_pattern=&str.reverse_match_pattern;
36183 match_pattern_by_get=0;
36184 }
36186 _m=str.begin();
36187 _size=str.size();
36188 if(!_size)
36189 be_replace_as(null_ptr);
36190 }
36191 virtual ~constexpr_string_data_t()noexcept(destruct_nothrow)override final{
36192 clear_match_pattern();
36193 }
36194
36195 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{
36196 return get<this_t>(string_view_t{_m+begin,size});
36197 }
36198 [[nodiscard]]virtual const char_T* get_data(ptr_t&)noexcept(get_data_nothrow)override final{return _m;}
36199 [[nodiscard]]virtual const_string_ptr_t get_const_c_str(ptr_t&p)noexcept(get_data_nothrow)override final{
36200 if(!_m[_size])
36201 return _m;
36202 else
36203 return base_t::get_const_c_str(p);
36204 }
36205 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _size; }
36206protected:
36207 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{ copy_assign[size](note::from(_m+pos),note::to(to)); }
36208public:
36209 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{ return _m[index]; }
36210
36211 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{base_t::be_replace_as(a);}
36212 virtual void arec_set(size_t index,char_T a,ptr_t&p)noexcept override final{base_t::arec_set(index,a,p);}
36213
36214 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
36215 return true;//总size被保证一样
36216 }
36217 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{return{&_m[begin],note::size(_size-begin)};}
36218 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
36219 auto wp=down_cast<this_t*>(with.get());
36220 if(_m==wp->_m)
36221 return true;
36222 return equal(_m,wp->_m,_size);
36223 }
36224 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
36225 auto wp=down_cast<this_t*>(with.get());
36226 if(_m==wp->_m)
36227 return strong_ordering::equivalent;
36228 return compare(_m,wp->_m,_size);
36229 }
36230protected:
36231 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
36232 return float_size_of(*this);
36233 }
36234public:
36235 [[nodiscard]]virtual const range_n::match_pattern<const char_T>& get_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36236 if(!_p_match_pattern){
36237 _p_match_pattern=get<range_n::match_pattern<const char_T>>(array_like_view_t{this->get_data(self),this->get_size()});
36238 match_pattern_by_get = 1;
36239 }
36240 return *_p_match_pattern;
36241 }
36242 [[nodiscard]]virtual const range_n::reverse_match_pattern<const char_T>&get_reverse_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36243 if(!_p_reverse_match_pattern){
36244 _p_reverse_match_pattern=get<range_n::reverse_match_pattern<const char_T>>(array_like_view_t{this->get_data(self),this->get_size()});
36245 match_pattern_by_get = 1;
36246 }
36247 return *_p_reverse_match_pattern;
36248 }
36249};
36250
36251//file_end
36252
36253 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
36254
36255 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/comn_string_data_t.hpp"
36256//comn_string_data_t.hpp
36257//at namespace elc::defs::string_n::string_data_n
36258/*
36259未完成的elc解释器string文件
36260由steve02081504与Alex0125设计、编写
36261转载时请在不对此文件做任何修改的同时注明出处
36262项目地址:https://github.com/ELC-lang/ELC
36263*/
36264/*
36265 ,??????????????????????????
36266 ????????????????????????????
36267 ?????????????????????????????+
36268 ?????+++++++++++++++++++++++++
36269 ?????+++++++++++++++++++++++++
36270 ??????++++++++++++++++++++++++
36271 ?????++
36272 ?????+++
36273 ??????+++IIIIIIIIIIIIIIIIII
36274 ?????+++++IIIIIIIIIIIIIIIIII
36275 ?????++++++++++++++++++++++++
36276 ??????+++++++++++++++++++++++:
36277 ?????++
36278 ?????+++
36279 ??????++
36280 ??????????????????????????????II
36281 ??????????????????????????????IIII
36282 ,?????????????????????????????IIIII+
36283 =???++++++++++++++++++++++++++III?
36284 ?++++++++++++++++++++++++++++I+
36285*/
36286template<typename char_T>
36287struct comn_string_data_t final:base_string_data_t<char_T>,instance_struct<comn_string_data_t<char_T>>{
36290 using base_t::ptr_t;
36294 using base_t::self_changed;
36295
36296 using base_t::copy_assign_nothrow;
36297 using base_t::copy_construct_nothrow;
36298 using base_t::move_construct_nothrow;
36299 using base_t::construct_nothrow;
36300 using base_t::destruct_nothrow;
36301 using base_t::clear_nothrow;
36302 using base_t::ptr_reset_nothrow;
36303 using base_t::hash_nothrow;
36304 using base_t::get_data_nothrow;
36305 using base_t::apply_data_nothrow;
36306 using base_t::set_hash_cache;
36307
36308 array_t<char_T> _m;
36309 range_n::match_pattern<const char_T>* _p_match_pattern = nullptr;
36310 range_n::reverse_match_pattern<const char_T>* _p_reverse_match_pattern = nullptr;
36311 void clear_match_pattern()noexcept{
36312 unget(_p_match_pattern);
36313 unget(_p_reverse_match_pattern);
36314 _p_match_pattern=nullptr;
36315 _p_reverse_match_pattern=nullptr;
36316 }
36317 void self_changed()noexcept{
36318 #if defined(_MSC_VER) && defined(ELC_STRING_CHECKING_NOT_INITED_CHARS)
36319 push_and_disable_msvc_warning(4310);//截断常量警告diss
36320 for(size_t i=0;i<_m.size();i++)
36321 if(_m[i]==char_T(0xCDCDCDCD))
36322 __debugbreak();
36324 #endif
36325 clear_match_pattern();
36326 base_t::self_changed();
36327 }
36328
36329 comn_string_data_t(string_view_t str)noexcept(construct_nothrow&&copy_assign_nothrow):_m(note::size(str.size()+1)){
36330 copy_assign[str.size()](note::from(str.begin()),note::to(_m.data()));
36331 _m[str.size()]=zero;
36332 }
36333 comn_string_data_t(ptr_t str)noexcept(construct_nothrow&&copy_assign_nothrow):_m(note::size(str->get_size()+1)){
36334 const auto size=this->get_size();
36335 str->copy_part_data_to(_m.data(),0,size);
36336 _m[size]=zero;
36337 }
36338 comn_string_data_t(ptr_t str,size_t pos,size_t size)noexcept(construct_nothrow&&copy_assign_nothrow):_m(note::size(size+1)){
36339 str->copy_part_data_to(_m.data(),pos,size);
36340 _m[size]=zero;
36341 }
36342 comn_string_data_t(size_t size,char_T ch)noexcept(construct_nothrow&&copy_assign_nothrow):_m(note::size(size+1),ch){
36343 _m[size]=zero;
36344 }
36345 comn_string_data_t(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow):_m(note::size(size+1)){
36346 _m[size]=zero;
36347 }
36348 comn_string_data_t(array_t<char_T> base)noexcept(construct_nothrow&&copy_assign_nothrow):_m(move(base)){
36349 _m.push_back(zero);
36350 }
36351
36352 virtual ~comn_string_data_t()noexcept(destruct_nothrow)override final{
36353 clear_match_pattern();
36354 }
36355
36356 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
36357 _m.clear();
36358 base_t::be_replace_as(a);
36359 }
36360 [[nodiscard]]virtual string_ptr_t get_c_str(ptr_t&)noexcept override final{ return _m.data(); }
36361 [[nodiscard]]virtual string_ptr_t get_unique_c_str(ptr_t&p)noexcept(get_data_nothrow)override final{
36362 if(this->is_unique())
36363 return _m.data();
36364 else
36365 return base_t::get_unique_c_str(p);
36366 }
36367 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _m.size()-1; }
36368protected:
36369 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{ copy_assign[size](note::from((const char_T*)_m+pos),note::to(to)); }
36370public:
36371 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{ return _m[index]; }
36372 virtual void arec_set(size_t index,char_T a,ptr_t&p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36373 if(this->is_unique()){
36374 copy_assign(_m[index],a);
36375 self_changed();
36376 }
36377 else
36378 base_t::arec_set(index,a,p);
36379 }
36380
36381 [[nodiscard]]virtual bool same_struct(ptr_t)noexcept override final{
36382 return true;//总size被保证一样
36383 }
36384 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{return{&_m[begin],note::size(get_size()-begin)};}
36385 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
36386 auto wp=down_cast<this_t*>(with.get());
36387 return equal(_m, wp->_m);
36388 }
36389 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
36390 auto wp=down_cast<this_t*>(with.get());
36391 return compare(_m, wp->_m);
36392 }
36393protected:
36394 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
36395 return float_size_of(*this) + _m.size_in_byte();
36396 }
36397public:
36398 [[nodiscard]]virtual const range_n::match_pattern<const char_T>& get_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36399 if(!_p_match_pattern)
36400 _p_match_pattern=get<range_n::match_pattern<const char_T>>(array_like_view_t{this->get_data(self),this->get_size()});
36401 return *_p_match_pattern;
36402 }
36403 [[nodiscard]]virtual const range_n::reverse_match_pattern<const char_T>&get_reverse_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36404 if(!_p_reverse_match_pattern)
36405 _p_reverse_match_pattern=get<range_n::reverse_match_pattern<const char_T>>(array_like_view_t{this->get_data(self),this->get_size()});
36406 return *_p_reverse_match_pattern;
36407 }
36408};
36409template<typename char_T>
36411 auto comn_data=get<comn_string_data_t<char_T>>(this);
36412 if(positive_gc_profit())
36413 a.do_replace(comn_data);
36414 else
36415 a=comn_data;
36416 return comn_data->get_c_str(a);
36417}
36418template<typename char_T>
36420 auto comn_data=get<comn_string_data_t<char_T>>(this);
36421 a=comn_data;
36422 return comn_data->get_c_str(a);
36423}
36424template<typename char_T>
36425void base_string_data_t<char_T>::arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow){
36426 copy_assign(this->get_unique_c_str(p)[index],a);
36427}
36428template<typename char_T>
36430 const auto size_of_base_array=this->get_size()*sizeof(char_T);
36431 const auto size=float_size_of(comn_string_data_t<char_T>)+size_of_base_array;
36432 return size/get_ref_num(this);
36433}
36434template<typename char_T>
36435[[nodiscard]]const range_n::match_pattern<const char_T>& base_string_data_t<char_T>::get_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow){
36436 auto comn_data=get<comn_string_data_t<char_T>>(this);
36437 self=comn_data;
36438 return comn_data->get_match_pattern_from_self(self);
36439}
36440template<typename char_T>
36441[[nodiscard]]const range_n::reverse_match_pattern<const char_T>& base_string_data_t<char_T>::get_reverse_match_pattern_from_self(ptr_t&self)noexcept(copy_assign_nothrow&&move_construct_nothrow){
36442 auto comn_data=get<comn_string_data_t<char_T>>(this);
36443 self=comn_data;
36444 return comn_data->get_reverse_match_pattern_from_self(self);
36445}
36446
36447//file_end
36448
36449 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
36450
36451 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/substr_string_data_t.hpp"
36452//substr_string_data_t.hpp
36453//at namespace elc::defs::string_n::string_data_n
36454/*
36455未完成的elc解释器string文件
36456由steve02081504与Alex0125设计、编写
36457转载时请在不对此文件做任何修改的同时注明出处
36458项目地址:https://github.com/ELC-lang/ELC
36459*/
36460/*
36461 ,??????????????????????????
36462 ????????????????????????????
36463 ?????????????????????????????+
36464 ?????+++++++++++++++++++++++++
36465 ?????+++++++++++++++++++++++++
36466 ??????++++++++++++++++++++++++
36467 ?????++
36468 ?????+++
36469 ??????+++IIIIIIIIIIIIIIIIII
36470 ?????+++++IIIIIIIIIIIIIIIIII
36471 ?????++++++++++++++++++++++++
36472 ??????+++++++++++++++++++++++:
36473 ?????++
36474 ?????+++
36475 ??????++
36476 ??????????????????????????????II
36477 ??????????????????????????????IIII
36478 ,?????????????????????????????IIIII+
36479 =???++++++++++++++++++++++++++III?
36480 ?++++++++++++++++++++++++++++I+
36481*/
36482template<typename char_T>
36483struct substr_string_data_t final:base_string_data_t<char_T>,instance_struct<substr_string_data_t<char_T>>{
36486 using base_t::ptr_t;
36490 using base_t::self_changed;
36491
36492 using base_t::copy_assign_nothrow;
36493 using base_t::copy_construct_nothrow;
36494 using base_t::move_construct_nothrow;
36495 using base_t::construct_nothrow;
36496 using base_t::destruct_nothrow;
36497 using base_t::clear_nothrow;
36498 using base_t::ptr_reset_nothrow;
36499 using base_t::hash_nothrow;
36500 using base_t::get_data_nothrow;
36501 using base_t::apply_data_nothrow;
36502 using base_t::set_hash_cache;
36503
36507
36509 if(!_sub_size)
36510 be_replace_as(null_ptr);
36511 }
36512
36513 substr_string_data_t(ptr_t str,size_t sub_begin,size_t sub_size)noexcept:_to(str),_sub_begin(sub_begin),_sub_size(sub_size){
36514 null_equivalent_check();
36515 }
36516
36517 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
36518 _to.reset();
36519 base_t::be_replace_as(a);
36520 }
36521 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{ return get<substr_string_data_t<char_T>>(_to,begin+_sub_begin,size); }
36522 [[nodiscard]]virtual const_string_ptr_t get_const_c_str(ptr_t&p)noexcept(get_data_nothrow)override final{
36523 if(_sub_begin+_sub_size==_to->get_size())
36524 return _to->get_const_c_str(_to)+_sub_begin;
36525 else
36526 return base_t::get_const_c_str(p);
36527 }
36528 [[nodiscard]]virtual const char_T* get_data(ptr_t&)noexcept(get_data_nothrow)override final{ return _to->get_data(_to)+_sub_begin; }
36529 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _sub_size; }
36530protected:
36531 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{ _to->copy_part_data_to(to,pos+_sub_begin,size); }
36532public:
36533 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{ return _to->arec(index+_sub_begin); }
36534 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36535 if(this->is_unique()){
36536 _to->arec_set(index+_sub_begin,a,_to);
36537 self_changed();
36538 }
36539 else
36540 base_t::arec_set(index,a,p);
36541 }
36542 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
36543 if(this->is_unique() && _sub_begin==0){
36544 _to=_to->apply_str_to_begin(str);
36545 _sub_size+=str.size();
36546 self_changed();
36547 return this;
36548 }
36549 else
36550 return base_t::apply_str_to_begin(str);
36551 }
36552 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{
36553 if(this->is_unique() && _sub_begin==0){
36554 _to=_to->apply_str_to_begin(str);
36555 _sub_size+=str->get_size();
36556 self_changed();
36557 return this;
36558 }
36559 else
36560 return base_t::apply_str_to_begin(str);
36561 }
36562 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
36563 if(this->is_unique() && _sub_begin+_sub_size==_to->get_size()){
36564 _to=_to->apply_str_to_end(str);
36565 _sub_size+=str.size();
36566 self_changed();
36567 return this;
36568 }
36569 else
36570 return base_t::apply_str_to_end(str);
36571 }
36572 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow)override final{
36573 if(this->is_unique() && _sub_begin+_sub_size==_to->get_size()){
36574 _to=_to->apply_str_to_end(str);
36575 _sub_size+=str->get_size();
36576 self_changed();
36577 return this;
36578 }
36579 else
36580 return base_t::apply_str_to_end(str);
36581 }
36582 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36583 if(this->is_unique() && _sub_begin==0){
36584 auto aret=_to->do_pop_front(size,_to);
36585 _sub_size-=size;
36586 null_equivalent_check();
36587 self_changed();
36588 return aret;
36589 }
36590 else
36591 return base_t::do_pop_front(size,self);
36592 }
36593 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36594 if(this->is_unique() && _sub_begin+_sub_size==_to->get_size()){
36595 auto aret=_to->do_pop_back(size,_to);
36596 _sub_size-=size;
36597 null_equivalent_check();
36598 self_changed();
36599 return aret;
36600 }
36601 else
36602 return base_t::do_pop_back(size,self);
36603 }
36604 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36605 if(this->is_unique()){
36606 if(_sub_begin==0){
36607 _to=_to->do_remove_front(size);
36608 _sub_size-=size;
36609 }
36610 else{
36611 _sub_begin+=size;
36612 _sub_size-=size;
36613 }
36614 null_equivalent_check();
36615 self_changed();
36616 return this;
36617 }
36618 else
36619 return base_t::do_remove_front(size);
36620 }
36621 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36622 if(this->is_unique()){
36623 if(_sub_begin+_sub_size==_to->get_size())
36624 _to=_to->do_remove_back(size);
36625 _sub_size-=size;
36626 null_equivalent_check();
36627 self_changed();
36628 return this;
36629 }
36630 else
36631 return base_t::do_remove_back(size);
36632 }
36633protected:
36634 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
36635 auto result=hash(nothing);
36636 result=_to->get_others_hash_with_calculated_before(result,0,_to,_sub_begin,_sub_size);
36637 return result;
36638 }
36639 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,size_t pos,size_t size)noexcept(hash_nothrow)override final{
36640 return _to->get_others_hash_with_calculated_before(before,before_size,_to,pos+_sub_begin,size);
36641 }
36642protected:
36643 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
36644 auto wp = down_cast<this_t*>(with.get());
36645 return _sub_begin == wp->_sub_begin;//总size被保证一样
36646 }
36647 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{
36648 auto result = _to->get_the_largest_complete_data_block_begin_form(_sub_begin+begin);
36649 auto size = min(result.size(),_sub_size-begin);
36650 return{result.begin(), note::size(size)};
36651 }
36652 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
36653 auto wp=down_cast<this_t*>(with.get());
36654 return _to->equal_with(wp->_to,_sub_begin,_sub_size);
36655 }
36656 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
36657 auto wp=down_cast<this_t*>(with.get());
36658 return _to->compare_with(wp->_to,_sub_begin,_sub_size);
36659 }
36660 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
36661 return float_size_of(*this)+_to->get_memory_cost();
36662 }
36663};
36664template<typename char_T>
36666 if(begin==0&&size==get_size())
36667 return this;
36668 else
36669 return get<substr_string_data_t<char_T>>(this,begin,size);
36670}
36671
36672//file_end
36673
36674 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
36675
36676 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/head_apply_string_data_t.hpp"
36677//end_apply_string_data_t.hpp
36678//at namespace elc::defs::string_n::string_data_n
36679/*
36680未完成的elc解释器string文件
36681由steve02081504与Alex0125设计、编写
36682转载时请在不对此文件做任何修改的同时注明出处
36683项目地址:https://github.com/ELC-lang/ELC
36684*/
36685/*
36686 ,??????????????????????????
36687 ????????????????????????????
36688 ?????????????????????????????+
36689 ?????+++++++++++++++++++++++++
36690 ?????+++++++++++++++++++++++++
36691 ??????++++++++++++++++++++++++
36692 ?????++
36693 ?????+++
36694 ??????+++IIIIIIIIIIIIIIIIII
36695 ?????+++++IIIIIIIIIIIIIIIIII
36696 ?????++++++++++++++++++++++++
36697 ??????+++++++++++++++++++++++:
36698 ?????++
36699 ?????+++
36700 ??????++
36701 ??????????????????????????????II
36702 ??????????????????????????????IIII
36703 ,?????????????????????????????IIIII+
36704 =???++++++++++++++++++++++++++III?
36705 ?++++++++++++++++++++++++++++I+
36706*/
36707template<typename char_T>
36708struct head_apply_string_data_t final:base_string_data_t<char_T>,instance_struct<head_apply_string_data_t<char_T>>{
36711 using base_t::ptr_t;
36715 using base_t::self_changed;
36716
36717 using base_t::copy_assign_nothrow;
36718 using base_t::copy_construct_nothrow;
36719 using base_t::move_construct_nothrow;
36720 using base_t::construct_nothrow;
36721 using base_t::destruct_nothrow;
36722 using base_t::clear_nothrow;
36723 using base_t::ptr_reset_nothrow;
36724 using base_t::hash_nothrow;
36725 using base_t::get_data_nothrow;
36726 using base_t::apply_data_nothrow;
36727 using base_t::set_hash_cache;
36728
36729 array_t<char_T> _m;//意义为向前延续的数组:当需要向前附加内容时向前拓展以避免重新分配内存
36731 size_t _to_size;
36733
36734 head_apply_string_data_t(ptr_t str,string_view_t head)noexcept(construct_nothrow&&copy_assign_nothrow):
36735 _to_size(str->get_size()),
36736 _used_size(head.size()),
36737 _to(str)
36738 {
36739 _m.resize(get_next_gold_size_to_resize_for_array(_to_size+_used_size));
36740 copy_assign[_used_size](note::from<const char_T*>(head.begin()),note::to<char_T*>(_m.end()-_used_size));
36741 }
36742 head_apply_string_data_t(ptr_t str,pre_alloc_t,size_t head_size)noexcept(construct_nothrow):
36743 _to_size(str->get_size()),
36744 _used_size(0),
36745 _to(str)
36746 {
36747 _m.resize(head_size);
36748 }
36749
36751 while(type_info<this_t> == typeid(*_to) && _to->is_unique()){
36752 //合并重复的head_apply_string_data_t以防树状结构过深
36753 const auto p=down_cast<this_t*>(_to.get());
36754 discard=p->apply_str_to_begin(string_view_t{_m.cend()-_used_size,_used_size});
36755 _used_size=p->_used_size;
36756 _to_size=p->_to_size;
36757 _m=move(p->_m);
36758 _to=p->_to;//不要使用移动语义:智能指针的移动语义基于swap,会导致p->_to指向p,进而导致内存泄漏
36759 }
36760 }
36761 void self_changed()noexcept{
36762 marge_same_value_type();
36763 #if defined(_MSC_VER) && defined(ELC_STRING_CHECKING_NOT_INITED_CHARS)
36764 push_and_disable_msvc_warning(4310);//截断常量警告diss
36765 for(size_t i=0;i<_used_size;++i)
36766 if(_m.end()[i-_used_size]==char_T(0xCDCDCDCD))
36767 __debugbreak();
36769 #endif
36770 base_t::self_changed();
36771 }
36772
36773 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{
36774 if(begin>=_used_size)
36775 return _to->get_substr_data(begin-_used_size,size);
36776 else
36777 return base_t::get_substr_data(begin,size);
36778 }
36779 [[nodiscard]]virtual string_ptr_t get_c_str(ptr_t&p)noexcept(get_data_nothrow)override final{
36780 if(!_used_size)
36781 return _to->get_c_str(_to);
36782 else
36783 return base_t::get_c_str(p);
36784 }
36785 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
36786 if(type_info<this_t> == typeid(*a)){
36787 const auto p = down_cast<this_t*>(a.get());
36788 if(_used_size==p->_used_size && _to!=p->_to)
36789 base_t::equivalent_optimization(_to, p->_to);
36790 }
36791 _m.clear();
36792 _to.reset();
36793 base_t::be_replace_as(a);
36794 }
36795 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _used_size+_to_size; }
36796 [[nodiscard]]virtual ptr_t do_insert(size_t pos,string_view_t str)noexcept(copy_construct_nothrow)override final{
36797 if(pos==0)
36798 return this->apply_str_to_begin(str);
36799 elseif(pos==get_size())
36800 return this->apply_str_to_end(str);
36801 elseif(this->is_unique()){
36802 if(pos<_used_size){
36803 const auto pos_base=_m.size()-_used_size;
36804 if(pos_base>=str.size()){
36805 char_T* origin_head_begin=_m.end()-_used_size;
36806 char_T* head_begin=origin_head_begin-str.size();
36807 copy_assign[pos](note::from<const char_T*>(origin_head_begin),note::to<char_T*>(head_begin));
36808 copy_assign[str.size()](note::from<const char_T*>(str.begin()),note::to<char_T*>(head_begin+pos));
36809 }
36810 else{
36811 const auto size_now=this->get_size()+str.size();
36812 const auto size_new=get_next_gold_size_to_resize_for_array(size_now);
36813 _m.part_used_insert_with_forward_resize(pos_base+pos,str.size(),str.begin(),size_new,_used_size);
36814 }
36815 _used_size+=str.size();
36816 }else{
36817 _to=_to->do_insert(pos-_used_size,str);
36818 _to_size=_to->get_size();
36819 }
36820 self_changed();
36821 return this;
36822 }
36823 else
36824 return base_t::do_insert(pos,str);
36825 }
36826protected:
36827 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{
36828 if(pos<_used_size){
36829 const char_T* head_begin=_m.end()-_used_size;
36830 const char_T* head_end=_m.end();
36831 const char_T* copy_begin=pos+head_begin;
36832 size_t size_of_copy_from_head=min(size_t(head_end-copy_begin),size);
36833
36834 copy_assign[size_of_copy_from_head](note::from(copy_begin),note::to(to));
36835 if(size!=size_of_copy_from_head){
36836 const size_t size_left=size-size_of_copy_from_head;
36837 char_T* next_copy_begin_pos=to+size_of_copy_from_head;
36838 _to->copy_part_data_to(next_copy_begin_pos,0,size_left);
36839 }
36840 }
36841 else
36842 _to->copy_part_data_to(to,pos-_used_size,size);
36843 }
36844public:
36845 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{
36846 if(index<_used_size){
36847 const char_T* head_begin=_m.end()-_used_size;
36848 return head_begin[index];
36849 }
36850 else
36851 return _to->arec(index-_used_size);
36852 }
36853 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
36854 if(this->is_unique()){
36855 if(index<_used_size){
36856 char_T* head_begin=_m.end()-_used_size;
36857 copy_assign(head_begin[index],a);
36858 }
36859 else
36860 _to->arec_set(index-_used_size,a,_to);
36861 self_changed();
36862 }
36863 else
36864 base_t::arec_set(index,a,p);
36865 }
36866 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
36867 if(this->is_unique()){
36868 const auto pos=_m.size()-_used_size;
36869 if(pos>=str.size())
36870 copy_assign[str.size()](note::from<const char_T*>(str.cbegin()),note::to<char_T*>(_m.end()-_used_size-str.size()));
36871 else{
36872 const auto size_now=this->get_size()+str.size();
36873 const auto size_new=get_next_gold_size_to_resize_for_array(size_now);
36874 _m.part_used_insert_with_forward_resize(pos,str.size(),str.begin(),size_new,_used_size);
36875 }
36876 _used_size+=str.size();
36877 self_changed();
36878 return this;
36879 }
36880 else
36881 return base_t::apply_str_to_begin(str);
36882 }
36883 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{
36884 this->shrink();
36885 return base_t::apply_str_to_begin(str);
36886 }
36887 void shrink()noexcept(_m.forward_resize_nothrow){
36888 _m.forward_resize(_used_size);
36889 }
36890 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
36891 if(this->is_unique()){
36892 _to=_to->apply_str_to_end(str);
36893 _to_size+=str.size();
36894 self_changed();
36895 return this;
36896 }
36897 else
36898 return base_t::apply_str_to_end(str);
36899 }
36900 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow)override final{
36901 if(this->is_unique()){
36902 _to=_to->apply_str_to_end(str);
36903 _to_size+=str->get_size();
36904 self_changed();
36905 return this;
36906 }
36907 else
36908 return base_t::apply_str_to_end(str);
36909 }
36910 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36911 if(size>=_used_size)
36912 return _to->do_remove_front(size-_used_size);
36913 if(this->is_unique()){//&& size<_used_size
36914 _used_size-=size;
36915 self_changed();
36916 return this;
36917 }
36918 else
36919 return base_t::do_remove_front(size);
36920 }
36921 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36922 /*
36923 if(size>=_to_size){
36924 const auto size_left=_used_size+_to_size-size;
36925 return get<comn_string_data_t<char_T>>(string_view_t{(char_T*)_m.end()-_used_size,size_left});
36926 }
36927 */
36928 if(this->is_unique() && size<_to_size){
36929 _to=_to->do_remove_back(size);
36930 _to_size-=size;
36931 self_changed();
36932 return this;
36933 }
36934 else
36935 return base_t::do_remove_back(size);
36936 }
36937 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36938 if(this->is_unique() && _used_size>=size){
36939 _used_size-=size;
36940 self_changed();
36941 return get<comn_string_data_t<char_T>>(string_view_t{(char_T*)_m.end()-_used_size-size,size});
36942 }
36943 else
36944 return base_t::do_pop_front(size,self);
36945 }
36946 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
36947 if(this->is_unique()){
36948 auto aret=_to->do_pop_back(size,_to);
36949 _to_size-=size;
36950 self_changed();
36951 return aret;
36952 }
36953 else
36954 return base_t::do_pop_back(size,self);
36955 }
36956protected:
36957 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
36958 push_and_disable_msvc_warning(26494);//未初始化警告diss
36959 hash_t result;
36961 if(_used_size){
36962 const char_T* head_begin=_m.end()-_used_size;
36963 result=hash(head_begin,_used_size);
36964 if(_to_size)
36965 result=hash.merge_array_hash_results(result,_used_size,_to->get_hash(_to),_to_size);
36966 }
36967 else
36968 result=_to->get_hash(_to);
36969 return result;
36970 }
36971 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,size_t pos,size_t size)noexcept(hash_nothrow)override final{
36972 if(pos<_used_size){
36973 const char_T* head_begin=_m.end()-_used_size;
36974 const char_T* head_end=_m.end();
36975 const char_T* calculate_begin=pos+head_begin;
36976 const size_t size_of_calculate_from_head=min(size_t(head_end-calculate_begin),size);
36977
36978 before=hash.with_calculated_before(before,before_size,calculate_begin,size_of_calculate_from_head);
36979 if(size!=size_of_calculate_from_head){
36980 const size_t size_left=size-size_of_calculate_from_head;
36981 before_size+=size_of_calculate_from_head;
36982 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,0,size_left);
36983 }
36984 }
36985 else
36986 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos-_used_size,size);
36987 return before;
36988 }
36989protected:
36990 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
36991 auto wp=down_cast<this_t*>(with.get());
36992 return _used_size==wp->_used_size;// && _to_size==wp->_to_size; //总size被保证一样
36993 }
36994 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{
36995 if(begin >= _used_size)
36996 return _to->get_the_largest_complete_data_block_begin_form(begin-_used_size);
36997 else{
36998 const char_T* head_begin = _m.end() - _used_size;
36999 const char_T* head_end = _m.end();
37000 const char_T* ret_begin = begin+head_begin;
37001 return{ret_begin, head_end};
37002 }
37003 }
37004 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
37005 auto wp=down_cast<this_t*>(with.get());
37006 const char_T* head_begin = _m.end() - _used_size;
37007 const char_T* wp_head_begin = wp->_m.end() - _used_size;
37008 return equal(head_begin,wp_head_begin,_used_size) && _to->equal_with_same_size(wp->_to);
37009 }
37010 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
37011 auto wp=down_cast<this_t*>(with.get());
37012 const char_T* head_begin = _m.end() - _used_size;
37013 const char_T* wp_head_begin = wp->_m.end() - _used_size;
37014 if(auto tmp=compare(head_begin,wp_head_begin,_used_size); tmp!=0)
37015 return tmp;
37016 return _to->compare_with_same_size(wp->_to);
37017 }
37018 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
37019 return _to->get_memory_cost()+float_size_of(*this)+_m.size_in_byte();
37020 }
37021public:
37022 [[nodiscard]]virtual ptr_t pre_alloc_before_begin(size_t size)noexcept override final{
37023 if(this->is_unique()){
37024 const auto size_new=_used_size+size;
37025 if(size_new>_m.size())
37026 _m.forward_resize(size_new);
37027 return this;
37028 }
37029 return base_t::pre_alloc_before_begin(size);
37030 }
37031};
37032template<typename char_T>
37033[[nodiscard]]base_string_data_t<char_T>::ptr_t base_string_data_t<char_T>::apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow){
37034 if(str.size())
37035 return get<head_apply_string_data_t<char_T>>(this,str);
37036 else
37037 return this;
37038}
37039template<typename char_T>
37041 if(size)
37042 return get<head_apply_string_data_t<char_T>>(this,pre_alloc,size);
37043 else
37044 return this;
37045}
37046
37047//file_end
37048
37049 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
37050 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/end_apply_string_data_t.hpp"
37051//end_apply_string_data_t.hpp
37052//at namespace elc::defs::string_n::string_data_n
37053/*
37054未完成的elc解释器string文件
37055由steve02081504与Alex0125设计、编写
37056转载时请在不对此文件做任何修改的同时注明出处
37057项目地址:https://github.com/ELC-lang/ELC
37058*/
37059/*
37060 ,??????????????????????????
37061 ????????????????????????????
37062 ?????????????????????????????+
37063 ?????+++++++++++++++++++++++++
37064 ?????+++++++++++++++++++++++++
37065 ??????++++++++++++++++++++++++
37066 ?????++
37067 ?????+++
37068 ??????+++IIIIIIIIIIIIIIIIII
37069 ?????+++++IIIIIIIIIIIIIIIIII
37070 ?????++++++++++++++++++++++++
37071 ??????+++++++++++++++++++++++:
37072 ?????++
37073 ?????+++
37074 ??????++
37075 ??????????????????????????????II
37076 ??????????????????????????????IIII
37077 ,?????????????????????????????IIIII+
37078 =???++++++++++++++++++++++++++III?
37079 ?++++++++++++++++++++++++++++I+
37080*/
37081template<typename char_T>
37082struct end_apply_string_data_t final:base_string_data_t<char_T>,instance_struct<end_apply_string_data_t<char_T>>{
37085 using base_t::ptr_t;
37089 using base_t::self_changed;
37090
37091 using base_t::copy_assign_nothrow;
37092 using base_t::copy_construct_nothrow;
37093 using base_t::move_construct_nothrow;
37094 using base_t::construct_nothrow;
37095 using base_t::destruct_nothrow;
37096 using base_t::clear_nothrow;
37097 using base_t::ptr_reset_nothrow;
37098 using base_t::hash_nothrow;
37099 using base_t::get_data_nothrow;
37100 using base_t::apply_data_nothrow;
37101 using base_t::set_hash_cache;
37102
37103 array_t<char_T> _m;
37105 size_t _to_size;
37107
37108 end_apply_string_data_t(ptr_t str,string_view_t end)noexcept(construct_nothrow&&copy_assign_nothrow):
37109 _to_size(str->get_size()),
37110 _used_size(end.size()),
37111 _to(str)
37112 {
37113 _m.resize(get_next_gold_size_to_resize_for_array(_to_size+_used_size));
37114 copy_assign[_used_size](note::from(end.begin()),note::to(_m.data()));
37115 }
37116 end_apply_string_data_t(ptr_t str,size_t count,char_T ch)noexcept:
37117 _to_size(str->get_size()),
37118 _used_size(count),
37119 _to(str)
37120 {
37121 _m.resize(get_next_gold_size_to_resize_for_array(_to_size+_used_size));
37122 copy_assign[_used_size](ch,note::to(_m.data()));
37123 }
37124 end_apply_string_data_t(ptr_t str,size_t count)noexcept:
37125 _to_size(str->get_size()),
37126 _used_size(count),
37127 _to(str)
37128 {
37129 _m.resize(get_next_gold_size_to_resize_for_array(_to_size+_used_size));
37130 }
37131 end_apply_string_data_t(ptr_t str,pre_alloc_t,size_t end_count)noexcept(construct_nothrow):
37132 _to_size(str->get_size()),
37133 _used_size(0),
37134 _to(str)
37135 {
37136 _m.resize(end_count);
37137 }
37138
37140 while(type_info<this_t> == typeid(*_to) && _to->is_unique()){
37141 //合并重复的end_apply_string_data_t以防树状结构过深
37142 const auto p=down_cast<this_t*>(_to.get());
37143 discard=p->apply_str_to_end(string_view_t(_m.cbegin(),_used_size));
37144 _used_size=p->_used_size;
37145 _to_size=p->_to_size;
37146 _m=move(p->_m);
37147 _to=p->_to;//不要使用移动语义:智能指针的移动语义基于swap,会导致p->_to指向p,进而导致内存泄漏
37148 }
37149 }
37150 void self_changed()noexcept{
37151 marge_same_value_type();
37152 #if defined(_MSC_VER) && defined(ELC_STRING_CHECKING_NOT_INITED_CHARS)
37153 push_and_disable_msvc_warning(4310);//截断常量警告diss
37154 for(size_t i=0;i<_used_size;i++)
37155 if(_m[i]==char_T(0xCDCDCDCD))
37156 __debugbreak();
37158 #endif
37159 base_t::self_changed();
37160 }
37161
37162 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{
37163 if(begin+size<=_to_size)
37164 return _to->get_substr_data(begin,size);
37165 else
37166 return base_t::get_substr_data(begin,size);
37167 }
37168 [[nodiscard]]virtual string_ptr_t get_c_str(ptr_t&p)noexcept(get_data_nothrow)override final{
37169 if(!_used_size)
37170 return _to->get_c_str(_to);
37171 else
37172 return base_t::get_c_str(p);
37173 }
37174 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
37175 if(type_info<this_t> == typeid(*a)){
37176 const auto p = down_cast<this_t*>(a.get());
37177 if(_used_size==p->_used_size && _to!=p->_to)
37178 base_t::equivalent_optimization(_to, p->_to);
37179 }
37180 _m.clear();
37181 _to.reset();
37182 base_t::be_replace_as(a);
37183 }
37184 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _used_size+_to_size; }
37185 [[nodiscard]]virtual ptr_t do_insert(size_t pos,string_view_t str)noexcept(copy_construct_nothrow)override final{
37186 if(pos==0)
37187 return this->apply_str_to_begin(str);
37188 elseif(pos==get_size())
37189 return this->apply_str_to_end(str);
37190 elseif(this->is_unique()){
37191 if(pos<_to_size){
37192 _to=_to->do_insert(pos-_used_size,str);
37193 _to_size=_to->get_size();
37194 }
37195 else{
37196 pos-=_to_size;
37197 if(_m.size()-_used_size>=str.size()){
37198 copy_assign[_used_size-pos](note::from<const char_T*>(&_m[pos]),note::to((char_T*)&_m[pos+str.size()]));
37199 copy_assign[str.size()](note::from<const char_T*>(str.begin()),note::to<char_T*>(&_m[pos]));
37200 }
37201 else{
37202 const auto size_now=this->get_size()+str.size();
37203 const auto size_new=get_next_gold_size_to_resize_for_array(size_now);
37204 _m.part_used_insert_with_resize(pos,str.size(),str.begin(),size_new,_used_size);
37205 }
37206 _used_size+=str.size();
37207 }
37208 self_changed();
37209 return this;
37210 }
37211 else
37212 return base_t::do_insert(pos,str);
37213 }
37214protected:
37215 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{
37216 if(pos+size<=_to_size)
37217 _to->copy_part_data_to(to,pos,size);
37218 else{
37219 if(pos<_to_size){
37220 _to->copy_part_data_to(to,pos,_to_size-pos);
37221 auto copied_size=_to_size-pos;
37222 pos=0;
37223 size-=copied_size;
37224 to+=copied_size;
37225 }
37226 else
37227 pos-=_to_size;
37228 copy_assign[size](note::from((const char_T*)_m+pos),note::to(to));
37229 }
37230 }
37231public:
37232 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{
37233 if(index<_to_size)
37234 return _to->arec(index);
37235 else
37236 return _m[index-_to_size];
37237 }
37238 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
37239 if(this->is_unique()){
37240 if(index<_to_size)
37241 _to->arec_set(index,a,_to);
37242 else
37243 copy_assign(_m[index - _to_size],a);
37244 self_changed();
37245 }
37246 else
37247 base_t::arec_set(index,a,p);
37248 }
37249
37250 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
37251 if(this->is_unique()){
37252 if(_m.size()-_used_size>=str.size())
37253 copy_assign[str.size()](note::from(str.begin()),note::to(_m.data()+_used_size));
37254 else{
37255 const auto size_now=this->get_size()+str.size();
37256 const auto size_new=get_next_gold_size_to_resize_for_array(size_now);
37257 _m.part_used_insert_with_resize(_used_size,str.size(),str.begin(),size_new,_used_size);
37258 }
37259 _used_size+=str.size();
37260 self_changed();
37261 return this;
37262 }
37263 else
37264 return base_t::apply_str_to_end(str);
37265 }
37266 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow)override final{
37267 this->shrink();
37268 return base_t::apply_str_to_end(str);
37269 }
37270 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
37271 if(this->is_unique()){
37272 _to=_to->apply_str_to_begin(str);
37273 _to_size+=str.size();
37274 self_changed();
37275 return this;
37276 }
37277 else
37278 return base_t::apply_str_to_begin(str);
37279 }
37280 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{
37281 if(this->is_unique()){
37282 _to=_to->apply_str_to_begin(str);
37283 _to_size+=str->get_size();
37284 self_changed();
37285 return this;
37286 }
37287 else
37288 return base_t::apply_str_to_begin(str);
37289 }
37290 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37291 /*
37292 if(size>=_to_size)
37293 return get<comn_string_data_t<char_T>>(string_view_t{_m.begin(),_used_size+_to_size-size});
37294 */
37295 if(this->is_unique() && size<_to_size){
37296 _to=_to->do_remove_front(size);
37297 _to_size-=size;
37298 self_changed();
37299 return this;
37300 }
37301 else
37302 return base_t::do_remove_front(size);
37303 }
37304 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37305 if(size>=_used_size)
37306 return _to->do_remove_back(size-_used_size);
37307 if(this->is_unique()){//&& size<_used_size
37308 _used_size-=size;
37309 self_changed();
37310 return this;
37311 }
37312 else
37313 return base_t::do_remove_back(size);
37314 }
37315 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37316 if(this->is_unique() && size<_to_size){
37317 auto aret=_to->do_pop_front(size,_to);
37318 _to_size-=size;
37319 self_changed();
37320 return aret;
37321 }
37322 else
37323 return base_t::do_pop_front(size,self);
37324 }
37325 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37326 if(this->is_unique() && _used_size>=size){
37327 _used_size-=size;
37328 self_changed();
37329 return get<comn_string_data_t<char_T>>(string_view_t{_m.data()+_used_size,size});
37330 }
37331 else
37332 return base_t::do_pop_back(size,self);
37333 }
37334protected:
37335 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
37336 return hash.with_calculated_before(_to->get_hash(_to),_to_size,string_view_t(_m.begin(),_used_size));
37337 }
37338 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,size_t pos,size_t size)noexcept(hash_nothrow)override final{
37339 if(pos+size<=_to_size)
37340 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos,size);
37341 else{
37342 if(pos<_to_size){
37343 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos,_to_size-pos);
37344 const auto calculated_size=_to_size-pos;
37345 pos=0;
37346 size-=calculated_size;
37347 before_size+=calculated_size;
37348 }
37349 else
37350 pos-=_to_size;
37351 before=hash.with_calculated_before(before,before_size,(const char_T*)_m+pos,size);
37352 }
37353 return before;
37354 }
37355 void shrink()noexcept(_m.resize_nothrow){
37356 _m.resize(_used_size);
37357 }
37358protected:
37359 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
37360 auto wp = down_cast<this_t*>(with.get());
37361 return _used_size==wp->_used_size;// && _to_size==wp->_to_size; //总size被保证一样
37362 }
37363 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{
37364 if(begin < _to_size)
37365 return _to->get_the_largest_complete_data_block_begin_form(begin);
37366 else{
37367 begin-=_to_size;
37368 return{_m.begin()+begin,note::size(_used_size-begin)};
37369 }
37370 }
37371 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
37372 auto wp=down_cast<this_t*>(with.get());
37373 return _to->equal_with_same_size(wp->_to) && equal((char_T*)_m.begin(),(char_T*)wp->_m.begin(),_used_size);
37374 }
37375 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
37376 auto wp=down_cast<this_t*>(with.get());
37377 if(auto tmp=_to->compare_with_same_size(wp->_to); tmp!=0)
37378 return tmp;
37379 return compare((char_T*)_m.begin(),(char_T*)wp->_m.begin(),_used_size);
37380 }
37381 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
37382 return _to->get_memory_cost()+float_size_of(*this)+_m.size_in_byte();
37383 }
37384public:
37385 [[nodiscard]]virtual ptr_t pre_alloc_after_end(size_t size)noexcept override final{
37386 if(this->is_unique()){
37387 const auto size_new=_used_size+size;
37388 if(size_new>_m.size())
37389 _m.resize(size_new);
37390 return this;
37391 }
37392 return base_t::pre_alloc_after_end(size);
37393 }
37394};
37395template<typename char_T>
37396[[nodiscard]]base_string_data_t<char_T>::ptr_t base_string_data_t<char_T>::apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow){
37397 if(str.size())
37398 return get<end_apply_string_data_t<char_T>>(this,str);
37399 else
37400 return this;
37401}
37402template<typename char_T>
37404 if(size)
37405 return get<end_apply_string_data_t<char_T>>(this,pre_alloc,size);
37406 else
37407 return this;
37408}
37409
37410//file_end
37411
37412 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
37413
37414 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/sum_string_data_t.hpp"
37415//sum_string_data_t.hpp
37416//at namespace elc::defs::string_n::string_data_n
37417/*
37418未完成的elc解释器string文件
37419由steve02081504与Alex0125设计、编写
37420转载时请在不对此文件做任何修改的同时注明出处
37421项目地址:https://github.com/ELC-lang/ELC
37422*/
37423/*
37424 ,??????????????????????????
37425 ????????????????????????????
37426 ?????????????????????????????+
37427 ?????+++++++++++++++++++++++++
37428 ?????+++++++++++++++++++++++++
37429 ??????++++++++++++++++++++++++
37430 ?????++
37431 ?????+++
37432 ??????+++IIIIIIIIIIIIIIIIII
37433 ?????+++++IIIIIIIIIIIIIIIIII
37434 ?????++++++++++++++++++++++++
37435 ??????+++++++++++++++++++++++:
37436 ?????++
37437 ?????+++
37438 ??????++
37439 ??????????????????????????????II
37440 ??????????????????????????????IIII
37441 ,?????????????????????????????IIIII+
37442 =???++++++++++++++++++++++++++III?
37443 ?++++++++++++++++++++++++++++I+
37444*/
37445template<typename char_T>
37446struct sum_string_data_t final:base_string_data_t<char_T>,instance_struct<sum_string_data_t<char_T>>{
37449 using base_t::ptr_t;
37453 using base_t::self_changed;
37454
37455 using base_t::copy_assign_nothrow;
37456 using base_t::copy_construct_nothrow;
37457 using base_t::move_construct_nothrow;
37458 using base_t::construct_nothrow;
37459 using base_t::destruct_nothrow;
37460 using base_t::clear_nothrow;
37461 using base_t::ptr_reset_nothrow;
37462 using base_t::hash_nothrow;
37463 using base_t::get_data_nothrow;
37464 using base_t::apply_data_nothrow;
37465 using base_t::set_hash_cache;
37466
37471
37472 sum_string_data_t(ptr_t before,ptr_t after)noexcept:_before(before),_after(after),_before_size(_before->get_size()),_after_size(_after->get_size()){
37473 if(!_before_size)
37474 be_replace_as(_after);
37475 elseif(!_after_size)
37476 be_replace_as(_before);
37477 }
37478
37479 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{
37480 if(begin+size<=_before_size)
37481 return _before->get_substr_data(begin,size);
37482 elseif(begin>=_before_size)
37483 return _after->get_substr_data(begin-_before_size,size);
37484 else
37485 return base_t::get_substr_data(begin,size);
37486 }
37487 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
37488 if(type_info<this_t> == typeid(*a)){
37489 const auto p = down_cast<this_t*>(a.get());
37490 if(_before_size==p->_before_size){
37491 if(_before!=p->_before)
37492 base_t::equivalent_optimization(_before, p->_before);
37493 if(_after!=p->_after)
37494 base_t::equivalent_optimization(_after, p->_after);
37495 }
37496 }
37497 _before.reset();
37498 _after.reset();
37499 base_t::be_replace_as(a);
37500 }
37501 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _before_size+_after_size; }
37502protected:
37503 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{
37504 if(pos<_before_size){
37505 const auto copy_before_begin=pos;
37506 const auto copy_before_end=min(pos+size,_before_size);
37507 const auto copy_before_size=copy_before_end-copy_before_begin;
37508 _before->copy_part_data_to(to,copy_before_begin,copy_before_size);
37509 if(size!=copy_before_size){
37510 const auto copy_after_size=size-copy_before_size;
37511 to+=copy_before_size;
37512 _after->copy_part_data_to(to,0,copy_after_size);
37513 }
37514 }
37515 else
37516 _after->copy_part_data_to(to,pos-_before_size,size);
37517 }
37518public:
37519 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{
37520 if(index<_before_size)
37521 return _before->arec(index);
37522 else
37523 return _after->arec(index-_before_size);
37524 }
37525 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
37526 if(this->is_unique()){
37527 if(index<_before_size)
37528 _before->arec_set(index,a,_before);
37529 else
37530 _after->arec_set(index-_before_size,a,_after);
37531 self_changed();
37532 }
37533 else
37534 base_t::arec_set(index,a,p);
37535 }
37536 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
37537 if(this->is_unique()){
37538 _before=_before->apply_str_to_begin(str);
37539 _before_size+=str.size();
37540 self_changed();
37541 return this;
37542 }
37543 else
37544 return base_t::apply_str_to_begin(str);
37545 }
37546 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{
37547 if(this->is_unique()){
37548 _before=_before->apply_str_to_begin(str);
37549 _before_size+=str->get_size();
37550 self_changed();
37551 return this;
37552 }
37553 else
37554 return base_t::apply_str_to_begin(str);
37555 }
37556 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
37557 if(this->is_unique()){
37558 _after=_after->apply_str_to_end(str);
37559 _after_size+=str.size();
37560 self_changed();
37561 return this;
37562 }
37563 else
37564 return base_t::apply_str_to_end(str);
37565 }
37566 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow)override final{
37567 if(this->is_unique()){
37568 _after=_after->apply_str_to_end(str);
37569 _after_size+=str->get_size();
37570 self_changed();
37571 return this;
37572 }
37573 else
37574 return base_t::apply_str_to_end(str);
37575 }
37576 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37577 if(_before_size==size)
37578 return _after;
37579 if(_before_size<size)
37580 return _after->do_remove_front(size-_before_size);
37581 if(this->is_unique()){
37582 _before=_before->do_remove_front(size);
37583 _before_size-=size;
37584 self_changed();
37585 return this;
37586 }
37587 else
37588 return base_t::do_remove_front(size);
37589 }
37590 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37591 if(_after_size==size)
37592 return _before;
37593 if(_after_size<size)
37594 return _before->do_remove_back(size-_after_size);
37595 if(this->is_unique()){
37596 _after=_after->do_remove_back(size);
37597 _after_size-=size;
37598 self_changed();
37599 return this;
37600 }
37601 else
37602 return base_t::do_remove_back(size);
37603 }
37604 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37605 if(this->is_unique() && _before_size>=size){
37606 ptr_t aret;
37607 if(_before_size==size)
37608 swap(aret,_before);
37609 else
37610 aret=_before->do_pop_front(size,_before);
37611 _before_size-=size;
37612 if(!_before_size)
37613 be_replace_as(_after);
37614 self_changed();
37615 return aret;
37616 }
37617 else
37618 return base_t::do_pop_front(size,self);
37619 }
37620 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37621 if(this->is_unique() && _after_size>=size){
37622 ptr_t aret;
37623 if(_before_size==size)
37624 swap(aret,_after);
37625 else
37626 aret=_after->do_pop_back(size,_after);
37627 _after_size-=size;
37628 if(!_after_size)
37629 be_replace_as(_before);
37630 self_changed();
37631 return aret;
37632 }
37633 else
37634 return base_t::do_pop_back(size,self);
37635 }
37636protected:
37637 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
37638 push_and_disable_msvc_warning(26494);//未初始化警告diss
37639 hash_t result;
37641 if(_before_size){
37642 result=_before->get_hash(_before);
37643 if(_after_size)
37644 result=hash.merge_array_hash_results(result,_before_size,_after->get_hash(_after),_after_size);
37645 }
37646 else
37647 result=_after->get_hash(_after);
37648 return result;
37649 }
37650 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,size_t pos,size_t size)noexcept(hash_nothrow)override final{
37651 if(pos<_before_size){
37652 const auto calculate_before_begin=pos;
37653 const auto calculate_before_end=min(pos+size,_before_size);
37654 const auto calculate_before_size=calculate_before_end-calculate_before_begin;
37655 before=_before->get_others_hash_with_calculated_before(before,before_size,_before,calculate_before_begin,calculate_before_size);
37656 if(size!=calculate_before_size){
37657 const auto calculate_after_size=size-calculate_before_size;
37658 before_size+=calculate_before_size;
37659 before=_after->get_others_hash_with_calculated_before(before,before_size,_after,0,calculate_after_size);
37660 }
37661 }
37662 else
37663 before=_after->get_others_hash_with_calculated_before(before,before_size,_after,pos-_before_size,size);
37664 return before;
37665 }
37666protected:
37667 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
37668 auto wp=down_cast<this_t*>(with.get());
37669 return _before_size==wp->_before_size;//总size被保证一样
37670 }
37671 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{
37672 if(begin < _before_size)
37673 return _before->get_the_largest_complete_data_block_begin_form(begin);
37674 else
37675 return _after->get_the_largest_complete_data_block_begin_form(begin - _before_size);
37676 }
37677 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
37678 auto wp=down_cast<this_t*>(with.get());
37679 return this->_before->equal_with_same_size(wp->_before) && this->_after->equal_with_same_size(wp->_after);
37680 }
37681 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
37682 auto wp=down_cast<this_t*>(with.get());
37683 if(auto tmp=this->_before->compare_with_same_size(wp->_before); tmp!=0)
37684 return tmp;
37685 return this->_after->compare_with_same_size(wp->_after);
37686 }
37687 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
37688 return float_size_of(*this)+_before->get_memory_cost()+_after->get_memory_cost();
37689 }
37690};
37691template<typename char_T>
37693 return get<sum_string_data_t<char_T>>(this,str);
37694}
37695template<typename char_T>
37697 return get<sum_string_data_t<char_T>>(str,this);
37698}
37699
37700//file_end
37701
37702 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
37703
37704 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/erased_string_data_t.hpp"
37705//erased_string_data_t.hpp
37706//at namespace elc::defs::string_n::string_data_n
37707/*
37708未完成的elc解释器string文件
37709由steve02081504与Alex0125设计、编写
37710转载时请在不对此文件做任何修改的同时注明出处
37711项目地址:https://github.com/ELC-lang/ELC
37712*/
37713/*
37714 ,??????????????????????????
37715 ????????????????????????????
37716 ?????????????????????????????+
37717 ?????+++++++++++++++++++++++++
37718 ?????+++++++++++++++++++++++++
37719 ??????++++++++++++++++++++++++
37720 ?????++
37721 ?????+++
37722 ??????+++IIIIIIIIIIIIIIIIII
37723 ?????+++++IIIIIIIIIIIIIIIIII
37724 ?????++++++++++++++++++++++++
37725 ??????+++++++++++++++++++++++:
37726 ?????++
37727 ?????+++
37728 ??????++
37729 ??????????????????????????????II
37730 ??????????????????????????????IIII
37731 ,?????????????????????????????IIIII+
37732 =???++++++++++++++++++++++++++III?
37733 ?++++++++++++++++++++++++++++I+
37734*/
37735template<typename char_T>
37736struct erased_string_data_t final:base_string_data_t<char_T>,instance_struct<erased_string_data_t<char_T>>{
37739 using base_t::ptr_t;
37743 using base_t::self_changed;
37744
37745 using base_t::copy_assign_nothrow;
37746 using base_t::copy_construct_nothrow;
37747 using base_t::move_construct_nothrow;
37748 using base_t::construct_nothrow;
37749 using base_t::destruct_nothrow;
37750 using base_t::clear_nothrow;
37751 using base_t::ptr_reset_nothrow;
37752 using base_t::hash_nothrow;
37753 using base_t::get_data_nothrow;
37754 using base_t::apply_data_nothrow;
37755 using base_t::set_hash_cache;
37756
37758 size_t _to_size;
37761
37763 if(_to_size==_erase_size || !_to_size)
37764 be_replace_as(null_ptr);
37765 }
37766
37767 erased_string_data_t(ptr_t str,size_t erase_pos,size_t erase_size)noexcept:_to(str),_to_size(_to->get_size()),_erase_pos(erase_pos),_erase_size(erase_size){
37768 null_equivalent_check();
37769 }
37770
37771 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{
37772 if(begin+size<_erase_pos)
37773 return _to->get_substr_data(begin,size);
37774 elseif(begin>=_erase_pos)
37775 return _to->get_substr_data(begin+_erase_size,size);
37776 else
37777 return base_t::get_substr_data(begin,size);
37778 }
37779 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
37780 if(type_info<this_t> == typeid(*a)){
37781 const auto p = down_cast<this_t*>(a.get());
37782 if(_erase_pos==p->_erase_pos && _erase_size==p->_erase_size && _to!=p->_to)
37783 base_t::equivalent_optimization(_to, p->_to);
37784 }
37785 _to.reset();
37786 base_t::be_replace_as(a);
37787 }
37788 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _to_size-_erase_size; }
37789protected:
37790 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{
37791 if(pos+size<_erase_pos)
37792 _to->copy_part_data_to(to,pos,size);
37793 elseif(pos>=_erase_pos)
37794 _to->copy_part_data_to(to,pos+_erase_size,size);
37795 else{
37796 const auto size_before_erase_pos=_erase_pos-pos;
37797 const auto size_after_erase_pos=size-size_before_erase_pos;
37798 _to->copy_part_data_to(to,pos,size_before_erase_pos);
37799 _to->copy_part_data_to(to+size_before_erase_pos,_erase_pos+_erase_size,size_after_erase_pos);
37800 }
37801 }
37802public:
37803 [[nodiscard]]virtual ptr_t do_erase(size_t pos,size_t size)noexcept override final{
37804 if(this->is_unique()){
37805 if(pos<=_erase_pos && pos+size>=_erase_pos+_erase_size){
37806 _erase_pos=pos;
37807 _erase_size+=size;
37808 self_changed();
37809 return this;
37810 }
37811 }
37812 return base_t::do_erase(pos,size);
37813 }
37814 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{
37815 if(index>=_erase_pos)
37816 return _to->arec(index+_erase_size);
37817 else
37818 return _to->arec(index);
37819 }
37820
37821 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
37822 if(this->is_unique()){
37823 if(index>=_erase_pos)
37824 _to->arec_set(index+_erase_size,a,_to);
37825 else
37826 _to->arec_set(index,a,_to);
37827 self_changed();
37828 }
37829 else
37830 base_t::arec_set(index,a,p);
37831 }
37832 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
37833 if(this->is_unique()){
37834 _to=_to->apply_str_to_begin(str);
37835 const auto strsize=str.size();
37836 _to_size+=strsize;
37837 _erase_pos+=strsize;
37838 self_changed();
37839 return this;
37840 }
37841 else
37842 return base_t::apply_str_to_begin(str);
37843 }
37844 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{
37845 if(this->is_unique()){
37846 _to=_to->apply_str_to_begin(str);
37847 const auto strsize=str->get_size();
37848 _to_size+=strsize;
37849 _erase_pos+=strsize;
37850 self_changed();
37851 return this;
37852 }
37853 else
37854 return base_t::apply_str_to_begin(str);
37855 }
37856 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
37857 if(this->is_unique()){
37858 _to=_to->apply_str_to_end(str);
37859 _to_size+=str.size();
37860 self_changed();
37861 return this;
37862 }
37863 else
37864 return base_t::apply_str_to_end(str);
37865 }
37866 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow)override final{
37867 if(this->is_unique()){
37868 _to=_to->apply_str_to_end(str);
37869 _to_size+=str->get_size();
37870 self_changed();
37871 return this;
37872 }
37873 else
37874 return base_t::apply_str_to_end(str);
37875 }
37876 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37877 if(size>=_erase_pos)
37878 return _to->do_remove_front(size+_erase_size);
37879 if(this->is_unique()){//&& size<_erase_pos
37880 _to=_to->do_remove_front(size);
37881 _to_size-=size;
37882 _erase_pos-=size;
37883 self_changed();
37884 return this;
37885 }
37886 else
37887 return base_t::do_remove_front(size);
37888 }
37889 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37890 if(size>=_to_size-_erase_pos-_erase_size)
37891 return _to->do_remove_back(size+_erase_size);
37892 if(this->is_unique()){//&& size<_to_size-_erase_pos-_erase_size
37893 _to=_to->do_remove_back(size);
37894 _to_size-=size;
37895 self_changed();
37896 return this;
37897 }
37898 else
37899 return base_t::do_remove_back(size);
37900 }
37901 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37902 if(this->is_unique() && _erase_pos > size){
37903 auto aret=_to->do_pop_front(size,_to);
37904 _to_size-=size;
37905 _erase_pos-=size;
37906 null_equivalent_check();
37907 self_changed();
37908 return aret;
37909 }
37910 else
37911 return base_t::do_pop_front(size,self);
37912 }
37913 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
37914 if(this->is_unique() && _erase_pos+_erase_size <= _to_size-size){
37915 auto aret=_to->do_pop_back(size,_to);
37916 _to_size-=size;
37917 null_equivalent_check();
37918 self_changed();
37919 return aret;
37920 }
37921 else
37922 return base_t::do_pop_back(size,self);
37923 }
37924protected:
37925 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
37926 auto result=hash(nothing);
37927 const auto size=get_size();
37928 const auto size_before_erase_pos=_erase_pos;
37929 const auto size_after_erase_pos=size-size_before_erase_pos;
37930 result=_to->get_others_hash_with_calculated_before(result,0,_to,0,size_before_erase_pos);
37931 result=_to->get_others_hash_with_calculated_before(result,size_before_erase_pos,_to,_erase_pos+_erase_size,size_after_erase_pos);
37932 return result;
37933 }
37934 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,size_t pos,size_t size)noexcept(hash_nothrow)override final{
37935 if(pos+size<_erase_pos)
37936 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos,size);
37937 elseif(pos>=_erase_pos)
37938 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos+_erase_size,size);
37939 else{
37940 const auto size_before_erase_pos=_erase_pos-pos;
37941 const auto size_after_erase_pos=size-size_before_erase_pos;
37942 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos,size_before_erase_pos);
37943 before=_to->get_others_hash_with_calculated_before(before,before_size+size_before_erase_pos,_to,_erase_pos+_erase_size,size_after_erase_pos);
37944 }
37945 return before;
37946 }
37947protected:
37948 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
37949 auto wp = down_cast<this_t*>(with.get());
37950 return _erase_pos == wp->_erase_pos && _erase_size == wp->_erase_size;
37951 }
37952 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t begin)noexcept override final{
37953 if(begin < _erase_pos){
37954 auto aret=_to->get_the_largest_complete_data_block_begin_form(begin);
37955 if(aret.size() > _erase_pos)
37956 aret = {aret.begin(),_erase_pos};
37957 return aret;
37958 }
37959 else
37960 return _to->get_the_largest_complete_data_block_begin_form(begin + _erase_size);
37961 }
37962 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
37963 auto wp=down_cast<this_t*>(with.get());
37964 return _to->equal_with(wp->_to,0,_erase_pos) && _to->equal_with(wp->_to,_erase_pos+_erase_size,_to_size);
37965 }
37966 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
37967 auto wp=down_cast<this_t*>(with.get());
37968 if(auto tmp=_to->compare_with(wp->_to,0,_erase_pos); tmp!=0)
37969 return tmp;
37970 return _to->compare_with(wp->_to,_erase_pos+_erase_size,_to_size);
37971 }
37972 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
37973 return float_size_of(*this)+_to->get_memory_cost();
37974 }
37975};
37976template<typename char_T>
37978 if(size==get_size())
37979 return null_ptr;
37980 else
37981 return get<erased_string_data_t<char_T>>(this,pos,size);
37982}
37983
37984//file_end
37985
37986 #line 48 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
37987 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/inserted_string_data_t.hpp"
37988//inserted_string_data_t.hpp
37989//at namespace elc::defs::string_n::string_data_n
37990/*
37991未完成的elc解释器string文件
37992由steve02081504与Alex0125设计、编写
37993转载时请在不对此文件做任何修改的同时注明出处
37994项目地址:https://github.com/ELC-lang/ELC
37995*/
37996/*
37997 ,??????????????????????????
37998 ????????????????????????????
37999 ?????????????????????????????+
38000 ?????+++++++++++++++++++++++++
38001 ?????+++++++++++++++++++++++++
38002 ??????++++++++++++++++++++++++
38003 ?????++
38004 ?????+++
38005 ??????+++IIIIIIIIIIIIIIIIII
38006 ?????+++++IIIIIIIIIIIIIIIIII
38007 ?????++++++++++++++++++++++++
38008 ??????+++++++++++++++++++++++:
38009 ?????++
38010 ?????+++
38011 ??????++
38012 ??????????????????????????????II
38013 ??????????????????????????????IIII
38014 ,?????????????????????????????IIIII+
38015 =???++++++++++++++++++++++++++III?
38016 ?++++++++++++++++++++++++++++I+
38017*/
38018template<typename char_T>
38019struct inserted_string_data_t final: base_string_data_t<char_T>,instance_struct<inserted_string_data_t<char_T>>{
38022 using base_t::ptr_t;
38026 using base_t::self_changed;
38027
38028 using base_t::copy_assign_nothrow;
38029 using base_t::copy_construct_nothrow;
38030 using base_t::move_construct_nothrow;
38031 using base_t::construct_nothrow;
38032 using base_t::destruct_nothrow;
38033 using base_t::clear_nothrow;
38034 using base_t::ptr_reset_nothrow;
38035 using base_t::hash_nothrow;
38036 using base_t::get_data_nothrow;
38037 using base_t::apply_data_nothrow;
38038 using base_t::set_hash_cache;
38039
38042 size_t _to_size;
38045
38046 inserted_string_data_t(ptr_t to,ptr_t insert_data,size_t insert_pos)noexcept:_to(to),_insert_data(insert_data),_insert_pos(insert_pos),_to_size(to->get_size()),_insert_size(insert_data->get_size()){}
38047
38048 [[nodiscard]]virtual ptr_t get_substr_data(size_t begin,size_t size)noexcept override final{
38049 if(begin+size<_insert_pos)
38050 return _to->get_substr_data(begin,size);
38051 elseif(begin>_insert_pos+_insert_size)
38052 return _to->get_substr_data(begin-_insert_size,size);
38053 elseif(begin>=_insert_pos && begin+size<=_insert_pos+_insert_size)
38054 return _insert_data->get_substr_data(begin-_insert_pos,size);
38055 else
38056 return base_t::get_substr_data(begin,size);
38057 }
38058 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
38059 if(type_info<this_t> == typeid(*a)){
38060 const auto p = down_cast<this_t*>(a.get());
38061 if(_insert_pos==p->_insert_pos && _insert_size==p->_insert_size){
38062 if(_to!=p->_to)
38063 base_t::equivalent_optimization(_to, p->_to);
38064 if(_insert_data!=p->_insert_data)
38065 base_t::equivalent_optimization(_insert_data, p->_insert_data);
38066 }
38067 }
38068 _to.reset();
38069 _insert_data.reset();
38070 base_t::be_replace_as(a);
38071 }
38072 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _to_size+_insert_size; }
38073protected:
38074 virtual void copy_part_data_to(char_T* to,size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{
38075 if(pos+size<_insert_pos)
38076 _to->copy_part_data_to(to,pos,size);
38077 elseif(pos>_insert_pos+_insert_size)
38078 _to->copy_part_data_to(to,pos-_insert_size,size);
38079 else{
38080 if(_insert_pos>pos){
38081 auto size_before_insert_pos=_insert_pos-pos;
38082 _to->copy_part_data_to(to,pos,size_before_insert_pos);
38083 to+=size_before_insert_pos;
38084 size-=size_before_insert_pos;
38085 }
38086 auto size_before_insert_end=min(size,_insert_size);
38087 _insert_data->copy_part_data_to(to,0,size_before_insert_end);
38088 to+=size_before_insert_end;
38089 size-=size_before_insert_end;
38090 if(size)
38091 _to->copy_part_data_to(to,_insert_pos,size);
38092 }
38093 }
38094public:
38095 [[nodiscard]]virtual ptr_t do_insert(size_t pos,string_view_t str)noexcept(copy_construct_nothrow)override final{
38096 if(this->is_unique()){
38097 if(pos>=_insert_pos && pos<=_insert_pos+_insert_size){
38098 _insert_data=_insert_data->do_insert(pos-_insert_pos,str);
38099 _insert_size+=str.size();
38100 }
38101 elseif(pos<_insert_pos){
38102 _to=_to->do_insert(pos,str);
38103 _to_size+=str.size();
38104 _insert_pos+=str.size();
38105 }
38106 elseif(pos>_insert_pos+_insert_size){
38107 _to=_to->do_insert(pos-_insert_size,str);
38108 _to_size+=str.size();
38109 }
38110 self_changed();
38111 return this;
38112 }
38113 return base_t::do_insert(pos,str);
38114 }
38115 [[nodiscard]]virtual ptr_t do_erase(size_t pos,size_t size)noexcept override final{
38116 if(this->is_unique()){
38117 if(pos>=_insert_pos && pos+size<=_insert_pos+_insert_size){
38118 _insert_data=_insert_data->do_erase(pos-_insert_pos,size);
38119 _insert_size-=size;
38120 self_changed();
38121 return this;
38122 }
38123 elseif(pos+size<_insert_pos){
38124 _to=_to->do_erase(pos,size);
38125 _to_size-=size;
38126 _insert_pos-=size;
38127 self_changed();
38128 return this;
38129 }
38130 elseif(pos>_insert_pos+_insert_size){
38131 _to=_to->do_erase(pos-_insert_size,size);
38132 _to_size-=size;
38133 self_changed();
38134 return this;
38135 }
38136 }
38137 return base_t::do_erase(pos,size);
38138 }
38139 [[nodiscard]]virtual char_T arec(size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{
38140 if(index>=_insert_pos && index<_insert_pos+_insert_size)
38141 return _insert_data->arec(index-_insert_pos);
38142 elseif(index>=_insert_pos+_insert_size)
38143 return _to->arec(index-_insert_size);
38144 else
38145 return _to->arec(index);
38146 }
38147
38148 virtual void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
38149 if(this->is_unique()){
38150 if(index>=_insert_pos && index<_insert_pos+_insert_size)
38151 _insert_data->arec_set(index-_insert_pos,a,p);
38152 elseif(index>=_insert_pos+_insert_size)
38153 _to->arec_set(index-_insert_size,a,p);
38154 else
38155 _to->arec_set(index,a,p);
38156 self_changed();
38157 }
38158 else
38159 base_t::arec_set(index,a,p);
38160 }
38161 [[nodiscard]]virtual ptr_t apply_str_to_begin(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
38162 if(this->is_unique()){
38163 const auto size=str.size();
38164 if(_insert_pos==0){
38165 _insert_data=_insert_data->apply_str_to_begin(str);
38166 _insert_size+=size;
38167 }
38168 else{
38169 _to=_to->apply_str_to_begin(str);
38170 _to_size+=str.size();
38171 _insert_pos+=size;
38172 }
38173 self_changed();
38174 return this;
38175 }
38176 else
38177 return base_t::apply_str_to_begin(str);
38178 }
38179 [[nodiscard]]virtual ptr_t apply_str_to_begin(ptr_t str)noexcept(apply_data_nothrow)override final{
38180 if(this->is_unique()){
38181 const auto size=str->get_size();
38182 if(_insert_pos==0){
38183 _insert_data=_insert_data->apply_str_to_begin(str);
38184 _insert_size+=size;
38185 }
38186 else{
38187 _to=_to->apply_str_to_begin(str);
38188 _to_size+=str->get_size();
38189 _insert_pos+=size;
38190 }
38191 self_changed();
38192 return this;
38193 }
38194 else
38195 return base_t::apply_str_to_begin(str);
38196 }
38197 [[nodiscard]]virtual ptr_t apply_str_to_end(string_view_t str)noexcept(copy_construct_nothrow&&apply_data_nothrow)override final{
38198 if(this->is_unique()){
38199 if(_insert_pos==_to_size){
38200 _insert_data=_insert_data->apply_str_to_end(str);
38201 _insert_size+=str.size();
38202 }
38203 else{
38204 _to=_to->apply_str_to_end(str);
38205 _to_size+=str.size();
38206 }
38207 self_changed();
38208 return this;
38209 }
38210 else
38211 return base_t::apply_str_to_end(str);
38212 }
38213 [[nodiscard]]virtual ptr_t apply_str_to_end(ptr_t str)noexcept(apply_data_nothrow)override final{
38214 if(this->is_unique()){
38215 if(_insert_pos==_to_size){
38216 _insert_data=_insert_data->apply_str_to_end(str);
38217 _insert_size+=str->get_size();
38218 }
38219 else{
38220 _to=_to->apply_str_to_end(str);
38221 _to_size+=str->get_size();
38222 }
38223 self_changed();
38224 return this;
38225 }
38226 else
38227 return base_t::apply_str_to_end(str);
38228 }
38229 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38230 if(size>=_insert_pos+_insert_size)
38231 return _to->do_remove_front(size-_insert_size);
38232 if(this->is_unique()){
38233 if(_insert_pos > size){
38234 _to=_to->do_remove_front(size);
38235 _to_size-=size;
38236 _insert_pos-=size;
38237 self_changed();
38238 return this;
38239 }
38240 elseif(_insert_pos==0 && _insert_size>=size){
38241 _insert_data=_insert_data->do_remove_front(size);
38242 _insert_size-=size;
38243 self_changed();
38244 return this;
38245 }
38246 }
38247 return base_t::do_remove_front(size);
38248 }
38249 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38250 if(size>=_to_size-_insert_pos)
38251 return _to->do_remove_back(size-_insert_pos);
38252 if(this->is_unique()){
38253 if(_insert_pos+_insert_size <= _to_size-size){
38254 _to=_to->do_remove_back(size);
38255 _to_size-=size;
38256 self_changed();
38257 return this;
38258 }
38259 elseif(_insert_pos==_to_size && _insert_size>=size){
38260 _insert_data=_insert_data->do_remove_front(size);
38261 _insert_size-=size;
38262 self_changed();
38263 return this;
38264 }
38265 }
38266 return base_t::do_remove_back(size);
38267 }
38268 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38269 if(this->is_unique()){
38270 if(_insert_pos > size){
38271 auto aret=_to->do_pop_front(size,_to);
38272 _to_size-=size;
38273 _insert_pos-=size;
38274 self_changed();
38275 return aret;
38276 }
38277 elseif(_insert_pos==0 && _insert_size>=size){
38278 auto aret=_insert_data->do_pop_front(size,_insert_data);
38279 _insert_size-=size;
38280 self_changed();
38281 return aret;
38282 }
38283 }
38284 return base_t::do_pop_front(size,self);
38285 }
38286 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t& self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38287 if(this->is_unique()){
38288 if(_insert_pos+_insert_size <= _to_size-size){
38289 auto aret=_to->do_pop_back(size,_to);
38290 _to_size-=size;
38291 self_changed();
38292 return aret;
38293 }
38294 elseif(_insert_pos==_to_size && _insert_size>=size){
38295 auto aret=_insert_data->do_pop_front(size,_insert_data);
38296 _insert_size-=size;
38297 self_changed();
38298 return aret;
38299 }
38300 }
38301 return base_t::do_pop_back(size,self);
38302 }
38303protected:
38304 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
38305 auto result=hash(nothing);
38306 if(_insert_pos)
38307 result=_to->get_others_hash_with_calculated_before(result,0,_to,0,_insert_pos);
38308 result=hash.merge_array_hash_results(result,_insert_pos,_insert_data->get_hash(_insert_data),_insert_size);
38309 const auto size=_to_size-_insert_pos;
38310 if(size)
38311 result=_to->get_others_hash_with_calculated_before(result,_insert_pos+_insert_size,_to,_insert_pos,size);
38312 return result;
38313 }
38314 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,size_t pos,size_t size)noexcept(hash_nothrow)override final{
38315 if(pos+size<_insert_pos)
38316 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos,size);
38317 elseif(pos>_insert_pos+_insert_size)
38318 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos-_insert_size,size);
38319 else{
38320 if(_insert_pos>pos){
38321 const auto size_before_insert_pos=_insert_pos-pos;
38322 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,pos,size_before_insert_pos);
38323 size-=size_before_insert_pos;
38324 before_size+=size_before_insert_pos;
38325 }
38326 const auto size_before_insert_end=min(size,_insert_size);
38327 before=_insert_data->get_others_hash_with_calculated_before(before,before_size,_insert_data,0,size_before_insert_end);
38328 size-=size_before_insert_end;
38329 before_size+=size_before_insert_end;
38330 if(size)
38331 before=_to->get_others_hash_with_calculated_before(before,before_size,_to,_insert_pos,size);
38332 }
38333 return before;
38334 }
38335protected:
38336 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
38337 auto wp=down_cast<this_t*>(with.get());
38338 return _insert_pos==wp->_insert_pos && _insert_size==wp->_insert_size;//总size被保证一样
38339 }
38340 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form(size_t index)noexcept override final{
38341 if(index>=_insert_pos && index<_insert_pos+_insert_size)
38342 return _insert_data->get_the_largest_complete_data_block_begin_form(index-_insert_pos);
38343 elseif(index>=_insert_pos+_insert_size)
38344 return _to->get_the_largest_complete_data_block_begin_form(index-_insert_size);
38345 else{
38346 auto aret=_to->get_the_largest_complete_data_block_begin_form(index);
38347 if(aret.size()+index > _insert_pos)
38348 aret = {aret.begin(), note::size(_insert_pos-index)};
38349 return aret;
38350 }
38351 }
38352 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
38353 auto wp=down_cast<this_t*>(with.get());
38354 return _insert_data->equal_with_same_size(wp->_insert_data) && _to->equal_with_same_size(wp->_to);
38355 }
38356 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
38357 auto wp=down_cast<this_t*>(with.get());
38358 if(auto tmp=_to->compare_with(wp->_to,0,_insert_pos); tmp!=0)
38359 return tmp;
38360 if(auto tmp=_insert_data->compare_with_same_size(wp->_insert_data); tmp!=0)
38361 return tmp;
38362 return _to->compare_with(wp->_to,_insert_pos,_to_size-(_insert_pos+_insert_size));
38363 }
38364 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
38365 return float_size_of(*this)+_insert_data->get_memory_cost()+_to->get_memory_cost();
38366 }
38367};
38368template<typename char_T>
38370 return get<inserted_string_data_t<char_T>>(this,str,pos);
38371}
38372template<typename char_T>
38374 if(pos==0)
38375 return this->apply_str_to_begin(str);
38376 elseif(pos==get_size())
38377 return this->apply_str_to_end(str);
38378 else
38379 return this->do_insert(pos,get<comn_string_data_t<char_T>>(str));
38380}
38381
38382//file_end
38383
38384 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
38385
38386 //#include "replaced_string_data_t.hpp"
38387
38388 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/same_value_compress_string_data_t.hpp"
38389//sum_string_data_t.hpp
38390//at namespace elc::defs::string_n::string_data_n
38391/*
38392未完成的elc解释器string文件
38393由steve02081504与Alex0125设计、编写
38394转载时请在不对此文件做任何修改的同时注明出处
38395项目地址:https://github.com/ELC-lang/ELC
38396*/
38397/*
38398 ,??????????????????????????
38399 ????????????????????????????
38400 ?????????????????????????????+
38401 ?????+++++++++++++++++++++++++
38402 ?????+++++++++++++++++++++++++
38403 ??????++++++++++++++++++++++++
38404 ?????++
38405 ?????+++
38406 ??????+++IIIIIIIIIIIIIIIIII
38407 ?????+++++IIIIIIIIIIIIIIIIII
38408 ?????++++++++++++++++++++++++
38409 ??????+++++++++++++++++++++++:
38410 ?????++
38411 ?????+++
38412 ??????++
38413 ??????????????????????????????II
38414 ??????????????????????????????IIII
38415 ,?????????????????????????????IIIII+
38416 =???++++++++++++++++++++++++++III?
38417 ?++++++++++++++++++++++++++++I+
38418*/
38419template<typename char_T>
38420struct same_value_compress_string_data_t final:base_string_data_t<char_T>,instance_struct<same_value_compress_string_data_t<char_T>>{
38423 using base_t::ptr_t;
38427 using base_t::self_changed;
38428
38429 using base_t::copy_assign_nothrow;
38430 using base_t::copy_construct_nothrow;
38431 using base_t::move_construct_nothrow;
38432 using base_t::construct_nothrow;
38433 using base_t::destruct_nothrow;
38434 using base_t::clear_nothrow;
38435 using base_t::ptr_reset_nothrow;
38436 using base_t::hash_nothrow;
38437 using base_t::get_data_nothrow;
38438 using base_t::apply_data_nothrow;
38439 using base_t::set_hash_cache;
38440
38441 size_t _size;
38442 char_T _value;
38443 ptr_t _static_data_p;//必要时创建一个较大的数组,用于向外提供数据
38444 static constexpr size_t max_static_data_size=size_t(pow(BIT_POSSIBILITY, 9u));
38445
38446 same_value_compress_string_data_t(size_t size,char_T value)noexcept:_size(size),_value(value){}
38447 same_value_compress_string_data_t(size_t size,char_T value,ptr_t static_data_p)noexcept:_size(size),_value(value),_static_data_p(static_data_p){}
38448 ptr_t get_clone_with_new_size(size_t new_size)noexcept{
38449 if(new_size==_size)return this;
38450 if(new_size==0)return nullptr;
38451 return get<same_value_compress_string_data_t<char_T>>(new_size,_value,_static_data_p);
38452 }
38453
38454 virtual void be_replace_as(ptr_t a)noexcept(clear_nothrow)override final{
38455 base_t::be_replace_as(a);
38456 }
38457 [[nodiscard]]virtual ptr_t get_substr_data([[maybe_unused]]size_t begin,size_t size)noexcept override final{
38458 return get_clone_with_new_size(size);
38459 }
38460 [[nodiscard]]virtual size_t get_size()noexcept override final{ return _size; }
38461protected:
38462 virtual void copy_part_data_to(char_T* to,[[maybe_unused]]size_t pos,size_t size)noexcept(copy_assign_nothrow)override final{
38463 copy_assign[size](_value,note::to(to));
38464 }
38465public:
38466 [[nodiscard]]virtual char_T arec([[maybe_unused]]size_t index)noexcept(copy_construct_nothrow&&move_construct_nothrow)override final{
38467 return _value;
38468 }
38469 void arec_set(size_t index,char_T a,ptr_t& p)noexcept(copy_assign_nothrow&&move_construct_nothrow)override final{
38470 //小优化
38471 if(a==_value)return;
38472 if(_size==1){_value=a;_static_data_p.reset();return;}
38473 //若_size>max_static_data_size,将当前类型转换为sum_string_data_t
38474 if(_size>max_static_data_size){
38475 //中间一段为comn_string_data_t,大小为max_static_data_size
38476 ptr_t tmp=get<comn_string_data_t<char_T>>(max_static_data_size,_value);
38477 //尽量确保index在中间一段的中间
38478 const size_t index_in_tmp=min(index,max_static_data_size/2);
38479 //将中间一段的index处的值改为a
38480 tmp->arec_set(index_in_tmp,a,tmp);
38481 //判断是否需要附加其他段
38482 if(index>max_static_data_size/2){
38483 const size_t first_size=index-max_static_data_size/2;
38484 ptr_t first_p=get_clone_with_new_size(first_size);
38485 tmp=get<sum_string_data_t<char_T>>(first_p,tmp);
38486 }
38487 const size_t last_size=_size-tmp->get_size();
38488 if(last_size){
38489 ptr_t last_p=get_clone_with_new_size(last_size);
38490 tmp=get<sum_string_data_t<char_T>>(tmp,last_p);
38491 }
38492 p=tmp;
38493 return;
38494 }
38495 else
38496 base_t::arec_set(index,a,p);
38497 }
38498 [[nodiscard]]virtual ptr_t do_remove_front(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38499 if(this->is_unique()){
38500 _size-=size;
38501 self_changed();
38502 return this;
38503 }
38504 else
38505 return get_clone_with_new_size(_size-size);
38506 }
38507 [[nodiscard]]virtual ptr_t do_remove_back(size_t size)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38508 if(this->is_unique()){
38509 _size-=size;
38510 self_changed();
38511 return this;
38512 }
38513 else
38514 return get_clone_with_new_size(_size-size);
38515 }
38516 [[nodiscard]]virtual ptr_t do_pop_front(size_t size,ptr_t&self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38517 if(this->is_unique()){
38518 _size-=size;
38519 self_changed();
38520 return get_clone_with_new_size(size);
38521 }
38522 else{
38523 auto aret=get_clone_with_new_size(size);
38524 self=get_clone_with_new_size(_size-size);
38525 return aret;
38526 }
38527 }
38528 [[nodiscard]]virtual ptr_t do_pop_back(size_t size,ptr_t&self)noexcept(construct_nothrow&&copy_assign_nothrow)override final{
38529 if(this->is_unique()){
38530 _size-=size;
38531 self_changed();
38532 return get_clone_with_new_size(size);
38533 }
38534 else{
38535 auto aret=get_clone_with_new_size(size);
38536 self=get_clone_with_new_size(_size-size);
38537 return aret;
38538 }
38539 }
38540protected:
38541 virtual hash_t get_hash_detail(ptr_t&)noexcept(hash_nothrow)override final{
38542 return hash.repeat_times(_value,_size);
38543 }
38544 virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before,size_t before_size,ptr_t&,[[maybe_unused]]size_t pos,size_t size)noexcept(hash_nothrow)override final{
38545 return hash.merge_array_hash_results(before,before_size,hash.repeat_times(_value,size),size);
38546 }
38547protected:
38548 [[nodiscard]]virtual bool same_struct(ptr_t with)noexcept override final{
38549 auto wp=down_cast<this_t*>(with.get());
38550 if(wp->_value==_value && wp->_static_data_p!=_static_data_p){
38551 if(_static_data_p)
38552 wp->_static_data_p.do_replace(_static_data_p);
38553 elseif(wp->_static_data_p)
38554 _static_data_p.do_replace(wp->_static_data_p);
38555 }
38556 return true;//总size被保证一样
38557 }
38558 [[nodiscard]]virtual range_t<const char_T*> get_the_largest_complete_data_block_begin_form([[maybe_unused]]size_t begin)noexcept override final{
38559 if constexpr(construct<char_T>.trivial<const char_T&> && destruct.trivial<char_T>){
38560 if(!_static_data_p)
38561 _static_data_p=get<comn_string_data_t<char_T>>(max_static_data_size,_value);
38562 return{_static_data_p->get_data(_static_data_p),note::size(min(_size-begin,max_static_data_size))};
38563 }
38564 else
38565 return{&_value,note::size(1)};
38566 }
38567 [[nodiscard]]virtual bool same_struct_equal(ptr_t with)noexcept(equal.nothrow<char_T>)override final{
38568 auto wp=down_cast<this_t*>(with.get());
38569 return equal(_value,wp->_value);
38570 }
38571 [[nodiscard]]virtual base_t::compare_type same_struct_compare(ptr_t with)noexcept(compare.nothrow<char_T>)override final{
38572 auto wp=down_cast<this_t*>(with.get());
38573 return compare(_value,wp->_value);
38574 }
38575 [[nodiscard]]virtual float_size_t get_base_memory_cost()noexcept override final{
38576 return float_size_of(*this)+_static_data_p->get_memory_cost();
38577 }
38578};
38579
38580//file_end
38581
38582 #line 53 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/string_data_t/_body.hpp"
38583}
38584
38585//file_end
38586
38587 #line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/defs.hpp"
38588 template<typename char_T>
38589 struct string_t{
38590 static_assert(type_info<char_T> != type_info<const char_T>);
38591
38593 typedef base_t_w::ptr_t ptr_t;
38594 typedef base_t_w::string_view_t string_view_t;
38595 typedef base_t_w::string_ptr_t string_ptr_t;
38596 typedef base_t_w::const_string_ptr_t const_string_ptr_t;
38599 typedef char_T value_type;
38601 typedef size_t size_type;
38602 static constexpr size_t npos = bit::npos;
38603
38604 private:
38605 //_cso_info用于存储不同cso情况下string所用到的数据
38606 mutable union _cso_info_t{
38607 ptr_t _mptr;
38608 const constexpr_str_t* _str;
38609 char_T _ch;
38610
38611 push_and_disable_msvc_warning(26495);//未初始化警告diss
38612 force_inline constexpr _cso_info_t()noexcept{}
38613 constexpr _cso_info_t(const _cso_info_t&a)noexcept{
38614 copy_assign[sizeof(_cso_info_t)](cast_to_data(this),cast_to_data(&a));
38615 }
38617 force_inline constexpr void operator=(const _cso_info_t&a)noexcept{
38618 copy_assign[sizeof(_cso_info_t)](cast_to_data(this),cast_to_data(&a));
38619 }
38620 force_inline ~_cso_info_t()noexcept{}
38621 }_cso_info{};
38622 //_cso_flags用于标识不同的cso情况
38623 mutable struct _cso_flags_t{
38624 bool _cso_flag=0;
38625 bool _str_cso_flag=0;
38626 }_cso_flags;
38627
38628 //非cso情况下的成员宏,表示一个指向string data的智能指针
38629 #define _m _cso_info._mptr
38630
38631 //BLOCK: 对成员宏`_m`的生命周期手动管理的函数族
38632
38633 //结束成员宏`_m`的生命周期
38634 force_inline constexpr void _ncso_destruct_mptr()const noexcept{destruct(&_m);}
38635 //开始成员宏`_m`的生命周期
38636 force_inline constexpr void _ncso_construct_mptr()const noexcept{construct<ptr_t>[&_m]();}
38637 //以特定初始值开始成员宏`_m`的生命周期
38638 force_inline constexpr void _ncso_construct_mptr(ptr_t p)const noexcept{construct<ptr_t>[&_m](p);}
38639
38640 //END_BLOCK
38641
38642 //BLOCK: cso情况判断函数族
38643 [[nodiscard]]force_inline bool _in_cso()const noexcept{return _cso_flags._cso_flag;}
38644 [[nodiscard]]force_inline bool _in_str_cso()const noexcept{return _in_cso() && _cso_flags._str_cso_flag;}
38645 [[nodiscard]]force_inline bool _in_chr_cso()const noexcept{return _in_cso() && !_cso_flags._str_cso_flag;}
38646 //END_BLOCK
38647 //BLOCK: cso情况设定函数族
38648 force_inline constexpr void _set_str_cso()const noexcept{_cso_flags._cso_flag=1;_cso_flags._str_cso_flag=1;}
38649 force_inline constexpr void _set_chr_cso()const noexcept{_cso_flags._cso_flag=1;_cso_flags._str_cso_flag=0;}
38650 force_inline constexpr void _set_not_cso()const noexcept{_cso_flags._cso_flag=0;}
38651 //END_BLOCK
38652
38653 //BLOCK: cso情况下的信息获取函数族
38654 [[nodiscard]]force_inline const char_T* _get_cso_data()const noexcept{return _in_str_cso()?_cso_info._str->str():&_cso_info._ch;}
38655 [[nodiscard]]force_inline size_t _get_cso_size()const noexcept{return _in_str_cso()?_cso_info._str->size():1;}
38656 [[nodiscard]]force_inline hash_t _get_cso_hash()const noexcept{return _in_str_cso()?hash(_get_cso_constexpr_str()):hash(_cso_info._ch);}
38657 [[nodiscard]]force_inline constexpr_str_t& _get_cso_constexpr_str()const noexcept{return *_cso_info._str;}
38658 //END_BLOCK
38659
38660 //BLOCK: cso情况管理函数族
38661 force_inline constexpr void _cso_init(constexpr_str_t&str)noexcept{_set_str_cso();_cso_info._str=&str;}
38662 force_inline constexpr void _cso_reinit(constexpr_str_t&str)noexcept{if(!_in_cso())_ncso_destruct_mptr();_cso_init(str);}
38663 force_inline constexpr void _cso_init(char_T ch)noexcept{_set_chr_cso();_cso_info._ch=ch;}
38664 force_inline constexpr void _cso_reinit(char_T ch)noexcept{if(!_in_cso())_ncso_destruct_mptr();_cso_init(ch);}
38665 force_inline void _cso_fin(bool need_write)const noexcept{
38666 if(_in_str_cso()&&!need_write)
38667 _ncso_construct_mptr(get<constexpr_string_data_t<char_T>>(*_cso_info._str));
38668 else{
38669 auto str=string_view_t{_get_cso_data(),_get_cso_size()};
38670 _ncso_construct_mptr(get<comn_string_data_t<char_T>>(str));
38671 }
38672 _set_not_cso();
38673 }
38674 force_inline void _cso_fin(ptr_t p)noexcept{
38675 _set_not_cso();
38676 _ncso_construct_mptr(p);
38677 }
38678 //END_BLOCK
38679
38680 //BLOCK: 已知需要拷贝cso全部内容,判断是否值得结束cso的检查
38681 static force_inline constexpr bool the_size_worth_to_end_cso(size_t size)noexcept{
38682 constexpr auto max_size=max(sizeof(comn_string_data_t<char_T>)*2/sizeof(char_T),1u);
38683 return size>=max_size;
38684 }
38685 static force_inline void full_copy_cso_check(const string_t&str)noexcept{
38686 if(the_size_worth_to_end_cso(str.size()))
38687 str._cso_check();
38688 }
38689 //END_BLOCK
38690
38691 //若cso,结束它
38692 force_inline void _cso_check(bool need_write=0)const noexcept{
38693 if(_in_cso())
38694 _cso_fin(need_write);
38695 }
38696
38697 //便利用,内部使用的构造函数
38698 force_inline string_t(ptr_t str)noexcept{_ncso_construct_mptr(str);}
38699 //无论是否在cso中,都保证可以获得一个ptr
38700 [[nodiscard]]force_inline ptr_t ptr_copy()const noexcept{
38701 _cso_check();
38702 return _m;
38703 }
38704 public:
38705 //swap的内部实现
38706 void swap_with(this_t& a)noexcept{
38707 if(_in_cso()||a._in_cso()){
38708 swap(_cso_info,a._cso_info);
38709 swap(_cso_flags,a._cso_flags);
38710 }
38711 else
38712 swap(_m,a._m);
38713 }
38714
38715 //BLOCK: 构造函数
38716 constexpr string_t()noexcept:string_t(empty_constexpr_str_of<char_T>){}
38717 constexpr string_t(constexpr_str_t&str)noexcept{_cso_init(str);}
38718 string_t(string_view_t str)noexcept{_ncso_construct_mptr(get<comn_string_data_t<char_T>>(str));}
38720 constexpr string_t(char_T ch)noexcept{_cso_init(ch);}
38721 string_t(const string_t& str)noexcept{
38722 if(str._in_cso()){
38723 _cso_info=str._cso_info;
38724 _cso_flags=str._cso_flags;
38725 }
38726 else
38727 _ncso_construct_mptr(str._m);
38728 }
38729 string_t(string_t&& str)noexcept:string_t(){
38730 swap_with(str);
38731 }
38732 string_t(size_t size,char_T ch)noexcept{_ncso_construct_mptr(get<same_value_compress_string_data_t<char_T>>(size,ch));}
38733 string_t(char_T ch,size_t size)noexcept requires(type_info<size_t>!=type_info<char_T>):string_t(size,ch){}
38734 string_t(array_t<char_t> base)noexcept{_ncso_construct_mptr(get<comn_string_data_t<char_T>>(move(base)));}
38735
38736 string_t(size_t size)noexcept{_ncso_construct_mptr(get<comn_string_data_t<char_T>>(size));}
38737 //END_BLOCK
38738 //析构函数
38739 ~string_t()noexcept{if(!_in_cso())_ncso_destruct_mptr();}
38740
38741 //BLOCK: 赋值操作符
38742 string_t& operator=(const string_t& str)&noexcept{re_construct[this](str);return*this;}
38743 string_t& operator=(string_t&& str)&noexcept{swap_with(str);return*this;}
38744 constexpr string_t& operator=(constexpr_str_t&str)&noexcept{_cso_reinit(str);return*this;}
38745 constexpr string_t& operator=(char_T ch)&noexcept{_cso_reinit(ch);return*this;}
38746 //END_BLOCK
38747
38748 //BLOCK: 字符串相加操作符
38749 [[nodiscard]]string_t operator+(const string_t& str)const noexcept{
38750 full_copy_cso_check(str);
38751 if(str._in_cso())
38752 return operator+(str.to_string_view_t());
38753 else
38754 return ptr_copy()->apply_str_to_end(str._m);
38755 }
38756 [[nodiscard]]string_t operator+(string_view_t str)const noexcept{
38757 return ptr_copy()->apply_str_to_end(str);
38758 }
38759 [[nodiscard]]string_t operator+(const_string_ptr_t str)const noexcept{
38760 return *this+string_view_t(str);
38761 }
38762 friend [[nodiscard]]string_t operator+(string_view_t str1,const string_t& str2)noexcept{
38763 return str2.ptr_copy()->apply_str_to_begin(str1);
38764 }
38765 friend [[nodiscard]]string_t operator+(const_string_ptr_t str1,const string_t& str2)noexcept{
38766 return string_view_t(str1)+str2;
38767 }
38768 friend [[nodiscard]]string_t operator+(char_T ch,const string_t& str)noexcept{
38769 return string_view_t{&ch,1}+str;
38770 }
38771
38772 string_t& operator+=(const string_t&str)&noexcept{
38773 push_back(str);
38774 return *this;
38775 }
38777 push_back(move(str));
38778 return *this;
38779 }
38781 push_back(str);
38782 return *this;
38783 }
38785 return *this+=string_view_t(str);
38786 }
38787 string_t& operator+=(char_T ch)&noexcept{
38788 return *this += string_view_t{&ch,1};
38789 }
38790 template<typename U>
38791 [[nodiscard]]string_t&& operator+(U&& b)&&noexcept_as(*this+=b) requires was_not_an_ill_form(*this+=b){ //对右值的operator+优化为operator+=
38792 *this+=forward<U>(b);
38793 return move(*this);
38794 }
38795 //END_BLOCK
38796
38797 //获取string占用的内存大小
38798 float_size_t memory_cost()const noexcept{
38799 if(_in_cso())
38800 return 0;
38801 else
38802 return _m->get_memory_cost();
38803 }
38804 public:
38805 //BLOCK: 比较运算符
38806 [[nodiscard]]constexpr auto operator<=>(const string_t& a)const noexcept(compare.nothrow<char_T>){
38807 if(a._in_str_cso())
38808 return operator<=>(a._get_cso_constexpr_str());
38809 elseif(a._in_cso())
38810 return operator<=>(a.to_string_view_t());
38811 if(!_in_cso())
38812 return _m->compare_with(a._m);
38813 elseif(_in_str_cso())
38814 return compare.reverse(a<=>_get_cso_constexpr_str());
38815 else
38816 return compare.reverse(a<=>to_string_view_t());
38817 }
38818 [[nodiscard]]constexpr auto operator==(const string_t& a)const noexcept(equal.nothrow<char_T>){
38819 if(a._in_str_cso())
38820 return operator==(a._get_cso_constexpr_str());
38821 elseif(a._in_cso())
38822 return operator==(a.to_string_view_t());
38823 if(!_in_cso())
38824 return _m->equal_with(a._m);
38825 elseif(_in_str_cso())
38826 return a==_get_cso_constexpr_str();
38827 else
38828 return a==to_string_view_t();
38829 }
38830 [[nodiscard]]constexpr auto operator<=>(string_view_t a)const noexcept(compare.nothrow<char_T>){
38831 if(_in_cso())
38832 return compare(data(),a.begin(),size());
38833 else
38834 return _m->compare_with(a);
38835 }
38836 [[nodiscard]]constexpr auto operator==(string_view_t a)const noexcept(equal.nothrow<char_T>){
38837 if(_in_cso())
38838 return equal(data(),a.begin(),size());
38839 else
38840 return _m->equal_with(a);
38841 }
38842 [[nodiscard]]constexpr auto operator<=>(constexpr_str_t&a)const noexcept(compare.nothrow<char_T>){
38843 if(_in_cso() && data()==a.str())//同起始优化
38844 return strong_ordering::equivalent;
38845 auto tmp=operator<=>((string_view_t&)a);
38846 if(tmp==0)
38847 remove_const(this)->_cso_reinit(a);
38848 return tmp;
38849 }
38850 [[nodiscard]]constexpr auto operator==(constexpr_str_t&a)const noexcept(equal.nothrow<char_T>){
38851 if(_in_cso() && data()==a.str())//同起始优化
38852 return true;
38853 const auto tmp=operator==((string_view_t&)a);
38854 if(tmp)
38855 remove_const(this)->_cso_reinit(a);
38856 return tmp;
38857 }
38858 [[nodiscard]]constexpr auto operator<=>(const_string_ptr_t a)const noexcept(compare.nothrow<char_T>){
38859 if(_in_cso())
38860 return compare(data(),size(),a,end_by_zero);
38861 else
38862 return _m->compare_with(a);
38863 }
38864 [[nodiscard]]constexpr auto operator==(const_string_ptr_t a)const noexcept(equal.nothrow<char_T>){
38865 if(_in_cso())
38866 return equal(data(),size(),a,end_by_zero);
38867 else
38868 return _m->equal_with(a);
38869 }
38870 //END_BLOCK
38871 private:
38872 [[nodiscard]]string_ptr_t unique_c_str()noexcept{ _cso_check(1);return _m->get_unique_c_str(_m); }
38873 public:
38874 [[nodiscard]]char_T arec(size_t index)noexcept{
38875 if(_in_cso())
38876 return _get_cso_data()[index];
38877 else
38878 return _m->arec(index);
38879 }
38880 void arec_set(size_t index,char_T a)noexcept{ _cso_check(1);return _m->arec_set(index,a,_m); }
38881
38883 string_t* _to;
38884 size_t _index;
38885
38886 friend class string_t;
38887 public:
38888 arec_t(string_t* to,size_t index)noexcept:_to(to),_index(index){}
38889 arec_t(special_init_t,const arec_t&ref)noexcept:_to(ref._to),_index(ref._index){}
38890 [[nodiscard]]operator char_T()const&&noexcept{ return _to->arec(_index); }
38891 arec_t&& operator=(char_T a)&&noexcept{
38892 _to->arec_set(_index,a);
38893 return move(*this);
38894 }
38895 arec_t&& operator=(const arec_t&&ch)&&noexcept{ return move(*this).operator=(move(ch).operator char_T()); }
38896 private:
38897 [[nodiscard]]char_T* get_address()noexcept{ return _to->unique_c_str()+_index; }
38898 [[nodiscard]]const char_T* get_address()const noexcept{ return (add_const(_to))->c_str()+_index; }
38899 public:
38900 [[nodiscard]]char_T* operator&()&&noexcept{ return get_address(); }
38901 [[nodiscard]]const char_T* operator&()const&&noexcept{ return get_address(); }
38902 /*
38903 [[nodiscard]]explicit operator char_T&()&&noexcept{ return *get_address(); }
38904 [[nodiscard]]explicit operator const char_T&()const&&noexcept{ return *get_address(); }
38905 */
38906 template<class text_ostream_T> requires(type_info<text_ostream_T>.base_on<text_ostream_t<char_T>>)
38907 friend auto& operator<<(text_ostream_T& os,arec_t&& ch)noexcept(noexcept_text_ostream_class<text_ostream_T>){
38908 return os << move(ch).operator char_T();
38909 }
38910 template<class text_istream_T> requires(type_info<text_istream_T>.base_on<text_istream_t<char_T>>)
38911 friend auto& operator>>(text_istream_T& is,arec_t&& ch)noexcept(noexcept_text_istream_class<text_istream_T>){
38912 char_T ach;is >> ach;
38913 move(ch)=ach;
38914 return is;
38915 }
38916 };
38917
38918 [[nodiscard]]arec_t operator[](size_t index)noexcept{ return{this,index}; }
38919 [[nodiscard]]const arec_t operator[](size_t index)const noexcept{ return{remove_const(this),index}; }
38920
38921 //front
38922 [[nodiscard]]arec_t front()noexcept{ return{this,0}; }
38923 [[nodiscard]]const arec_t front()const noexcept{ return{remove_const(this),0}; }
38924 //back
38925 [[nodiscard]]arec_t back()noexcept{ return{this,size()-1}; }
38926 [[nodiscard]]const arec_t back()const noexcept{ return{remove_const(this),size()-1}; }
38927
38928
38929 [[nodiscard]]string_t operator+(const arec_t&& ch)const noexcept{
38930 return *this+move(ch).operator char_T();
38931 }
38932 string_t& operator+=(const arec_t&& ch)&noexcept{
38933 return *this+=move(ch).operator char_T();
38934 }
38935
38936 //floating arec.
38937 private:
38938 static constexpr bool floating_arec_result_able=was_not_an_ill_form(
38939 math::linear_interpolation::get_result(declvalue(size_t),
38940 math::linear_interpolation::get_k(declvalue(char_T),declvalue(char_T)),
38942 );
38943 static auto floating_arec_result_type_helper()noexcept{
38944 if constexpr(floating_arec_result_able)
38945 return math::linear_interpolation::get_result(size_t{},
38946 math::linear_interpolation::get_k(char_T{},char_T{}),
38947 float_t{});
38948 }
38949 typedef decltype(floating_arec_result_type_helper()) floating_arec_result_type;
38950 static constexpr bool floating_arec_set_able=was_not_an_ill_form(
38951 math::linear_interpolation::get_reverse_result(
38952 math::linear_interpolation::get_k(declvalue(char_T),declvalue(char_T)),
38953 declvalue(float_t),declvalue(char_T))
38954 );
38955 public:
38956 static constexpr bool floating_arec_able=floating_arec_result_able||floating_arec_set_able;
38957 template<class=void> requires floating_arec_able
38959 string_t* _to;
38960 float_t _index;
38961 size_t _index_x1;
38962 size_t _index_x2;
38963
38964 friend class string_t;
38966 public:
38967 static constexpr bool result_able=floating_arec_result_able;
38968 static constexpr bool set_able=floating_arec_set_able;
38969
38970 floating_arec_t_impl(string_t* to,float_t index)noexcept:_to(to),_index(index){
38971 _index_x1=static_cast<size_t>(index);
38972 _index_x2=_index_x1+1;
38973 }
38974 floating_arec_t_impl(special_init_t,const this_t&ref)noexcept:_to(ref._to),_index(ref._index){}
38975 [[nodiscard]]operator floating_arec_result_type()const&&noexcept requires result_able{
38976 char_T y1=_to->arec(_index_x1);
38977 char_T y2=_to->arec(_index_x2);
38978 auto δx=_index-_index_x1;
38979 return math::linear_interpolation::get_result(y1,
38980 math::linear_interpolation::get_k(y1,y2),
38981 δx);
38982 }
38983 this_t&& operator=(floating_arec_result_type a)&&noexcept requires set_able{
38984 char_T y1=_to->arec(_index_x1);
38985 char_T y2=_to->arec(_index_x2);
38986 auto k=math::linear_interpolation::get_k(y1,y2);
38987 auto δx1=_index-_index_x1;
38988 auto δx2=_index-_index_x2;
38989 y1=(char_T)math::linear_interpolation::get_reverse_result(k,δx1,a);
38990 y2=(char_T)math::linear_interpolation::get_reverse_result(k,δx2,a);
38991 _to->arec_set(_index_x1,y1);
38992 _to->arec_set(_index_x2,y2);
38993 return move(*this);
38994 }
38995 };
38996 #define floating_arec_t floating_arec_t_impl<>
38997 [[nodiscard]]auto operator[](float_t index)noexcept requires floating_arec_able{ return floating_arec_t{this,index}; }
38998 [[nodiscard]]const auto operator[](float_t index)const noexcept requires floating_arec_able{ return floating_arec_t{remove_const(this),index}; }
38999 #undef floating_arec_t
39000
39001 //泛型arec.
39002 template<arithmetic_type T>
39003 [[nodiscard]]auto operator[](T index)noexcept{
39004 if constexpr(float_type<T>)
39005 return operator[](static_cast<float_t>(index));
39006 else
39007 return operator[](static_cast<size_t>(index));
39008 }
39009 template<arithmetic_type T>
39010 [[nodiscard]]const auto operator[](T index)const noexcept{
39011 if constexpr(float_type<T>)
39012 return operator[](static_cast<float_t>(index));
39013 else
39014 return operator[](static_cast<size_t>(index));
39015 }
39016
39017 [[nodiscard]]string_t substr(size_t begin,size_t size=npos)const noexcept{
39018 size=min(size,this->size()-begin);
39019 if(size){
39020 _cso_check();
39021 return _m->get_substr_data(begin,size);
39022 }
39023 else
39024 return{};
39025 }
39026 [[nodiscard]]const char_T* data()const noexcept{ if(_in_cso())return _get_cso_data();else return _m->get_data(_m); }
39027 [[nodiscard]]char_T* writeable_data()noexcept{ return unique_c_str(); }
39028 [[nodiscard]]const_string_ptr_t c_str()const noexcept{ if(_in_cso())return _get_cso_data();else return _m->get_const_c_str(_m); }
39029 [[nodiscard]]string_ptr_t writeable_c_str()noexcept{ return unique_c_str(); }
39030 [[nodiscard]]size_t size()const noexcept{ if(_in_cso())return _get_cso_size();else return _m->get_size(); }
39031 [[nodiscard]]explicit operator bool()const noexcept{ return size(); }
39032 [[nodiscard]]bool empty()const noexcept{ return !size(); }
39033 [[nodiscard]]size_t length()const noexcept{ return size(); }
39034 void resize(size_t nsize,char_T ch)noexcept{
39035 const auto size=this->size();
39036 if(size > nsize)
39037 *this=substr(0,nsize);
39038 elseif(size == nsize)
39039 return;
39040 elseif(size){
39041 _cso_check();
39042 _m=get<end_apply_string_data_t<char_T>>(_m,nsize-size,ch);
39043 }
39044 else
39045 *this=string_t{nsize,ch};
39046 }
39047 void resize(size_t nsize)noexcept{
39048 const auto size=this->size();
39049 if(size > nsize)
39050 *this=substr(0,nsize);
39051 elseif(size == nsize)
39052 return;
39053 elseif(size){
39054 _cso_check();
39055 _m=get<end_apply_string_data_t<char_T>>(_m,nsize-size);
39056 }
39057 else
39058 *this=string_t{nsize};
39059 }
39060 void clear()noexcept{ re_construct(this); }
39061 private:
39062 struct iterator_base_t{
39063 string_t* _to;
39064 ptrdiff_t _index; //rend: -1,使用size_t也不是不可以(标准允许无符号整数溢出),但是operator<=>会出问题
39065
39066 [[nodiscard]]constexpr iterator_base_t get_before()const noexcept{ return{_to,_index-1}; }
39067 [[nodiscard]]constexpr iterator_base_t get_next()const noexcept{ return{_to,_index+1}; }
39068 [[nodiscard]]arec_t get_value()noexcept{ return (*_to)[_index]; }
39069 [[nodiscard]]const arec_t get_value()const noexcept{ return (*add_const(_to))[_index]; }
39070 [[nodiscard]]char_T* get_handle()noexcept{ return &get_value(); }
39071 [[nodiscard]]const char_T* get_handle()const noexcept{ return &get_value(); }
39072 [[nodiscard]]constexpr bool operator==(const iterator_base_t& a)const noexcept{ return _to==a._to && _index==a._index; }
39073 [[nodiscard]]constexpr auto operator<=>(const iterator_base_t& a)const noexcept{ return _to==a._to ? _index<=>a._index : partial_ordering::unordered; }
39074 };
39075 [[nodiscard]]iterator_base_t get_iterator_data_at(ptrdiff_t index)const noexcept{ return iterator_base_t{(string_t*)this,index}; }
39076 public:
39077 typedef iterator_t<char_T,iterator_base_t> iterator;
39078 typedef const_iterator_t<char_T,const iterator_base_t> const_iterator;
39079
39080 [[nodiscard]]iterator get_iterator_at(ptrdiff_t index)noexcept{ return get_iterator_data_at(index); }
39081 [[nodiscard]]const_iterator get_iterator_at(ptrdiff_t index)const noexcept{ return get_iterator_data_at(index); }
39082 [[nodiscard]]iterator begin()noexcept{ return get_iterator_at(0); }
39083 [[nodiscard]]const_iterator begin()const noexcept{ return get_iterator_at(0); }
39084 [[nodiscard]]const_iterator cbegin()const noexcept{ return begin(); }
39085 [[nodiscard]]iterator end()noexcept{ return get_iterator_at(size()); }
39086 [[nodiscard]]const_iterator end()const noexcept{ return get_iterator_at(size()); }
39087 [[nodiscard]]const_iterator cend()const noexcept{ return end(); }
39088
39089 typedef reverse_iterator_t<char_T,iterator_base_t> reverse_iterator;
39090 typedef reverse_const_iterator_t<char_T,const iterator_base_t> reverse_const_iterator;
39091
39092 [[nodiscard]]reverse_iterator get_reverse_iterator_at(ptrdiff_t index)noexcept{ return get_iterator_data_at(index); }
39093 [[nodiscard]]reverse_const_iterator get_reverse_iterator_at(ptrdiff_t index)const noexcept{ return get_iterator_data_at(index); }
39094 [[nodiscard]]reverse_iterator rbegin()noexcept{ return get_reverse_iterator_at(size()-1); }
39095 [[nodiscard]]reverse_const_iterator rbegin()const noexcept{ return get_reverse_iterator_at(size()-1); }
39096 [[nodiscard]]reverse_const_iterator rcbegin()const noexcept{ return rbegin(); }
39097 [[nodiscard]]reverse_iterator rend()noexcept{ return get_reverse_iterator_at(-1); }
39098 [[nodiscard]]reverse_const_iterator rend()const noexcept{ return get_reverse_iterator_at(-1); }
39099 [[nodiscard]]reverse_const_iterator rcend()const noexcept{ return rend(); }
39100
39101 //自迭代器构造string
39103 const auto& beg = begin.get_base();
39104 const auto& ed = end.get_base();
39105 if(beg._to!=ed._to)return;
39106 _ncso_construct_mptr(beg._to->substr(beg._index, ed._index - beg._index)._m);
39107 }
39108 //
39109
39110 void push_back(const string_t& str)&noexcept{
39111 full_copy_cso_check(*this);
39112 full_copy_cso_check(str);
39113 if(_in_cso()&&!str._in_cso())
39114 _cso_fin(str._m->apply_str_to_begin(to_string_view_t()));
39115 elseif(str._in_cso())
39116 push_back(str.to_string_view_t());
39117 else{
39118 _cso_check();
39119 _m=_m->apply_str_to_end(str._m);
39120 }
39121 }
39122 void push_back(string_t&& str)&noexcept{
39123 full_copy_cso_check(*this);
39124 full_copy_cso_check(str);
39125 if(_in_cso()&&!str._in_cso())
39126 _cso_fin(str._m->apply_str_to_begin(to_string_view_t()));
39127 elseif(str._in_cso())
39128 push_back(str.to_string_view_t());
39129 else{
39130 _cso_check();
39131 _m=_m->apply_str_to_end(move(str._m));
39132 }
39133 }
39134 void push_back(string_view_t str)&noexcept{ _cso_check();_m=_m->apply_str_to_end(str); }
39135 void push_back(char_T ch)&noexcept{ push_back(string_view_t{&ch,1}); }
39136 void push_back(const arec_t&& ch)&noexcept{ push_back(move(ch).operator char_T()); }
39138 //
39139 void push_back(char_T ch,size_t count)&noexcept{
39140 if(count==0)return;
39141 _cso_check();
39142 string_t str{ch,count};
39143 _m=_m->apply_str_to_end(str._m);
39144 }
39145 void push_back(const arec_t&& ch,size_t count)&noexcept{
39146 push_back(move(ch).operator char_T(),count);
39147 }
39148
39149 void push_front(const string_t& str)&noexcept{
39150 full_copy_cso_check(*this);
39151 full_copy_cso_check(str);
39152 if(_in_cso()&&!str._in_cso())
39153 _cso_fin(str._m->apply_str_to_end(to_string_view_t()));
39154 elseif(str._in_cso())
39155 push_front(str.to_string_view_t());
39156 else{
39157 _cso_check();
39158 _m=_m->apply_str_to_begin(str._m);
39159 }
39160 }
39161 void push_front(string_t&& str)&noexcept{
39162 full_copy_cso_check(*this);
39163 full_copy_cso_check(str);
39164 if(_in_cso()&&!str._in_cso())
39165 _cso_fin(str._m->apply_str_to_end(to_string_view_t()));
39166 elseif(str._in_cso())
39167 push_front(str.to_string_view_t());
39168 else{
39169 _cso_check();
39170 _m=_m->apply_str_to_begin(move(str._m));
39171 }
39172 }
39173 void push_front(string_view_t str)&noexcept{ _cso_check();_m=_m->apply_str_to_begin(str); }
39174 void push_front(char_T ch)&noexcept{ push_front(string_view_t{&ch,1}); }
39175 void push_front(const arec_t&& ch)&noexcept{ push_front(move(ch).operator char_T()); }
39177 //
39178 void push_front(char_T ch,size_t count)&noexcept{
39179 if(count==0)return;
39180 _cso_check();
39181 string_t str{ch,count};
39182 _m=_m->apply_str_to_begin(str._m);
39183 }
39184 void push_front(const arec_t&& ch,size_t count)&noexcept{
39185 push_front(move(ch).operator char_T(),count);
39186 }
39187
39188 void remove_back(size_t size=1)noexcept{ _cso_check();_m=_m->do_remove_back(size); }
39189 void remove_front(size_t size=1)noexcept{ _cso_check();_m=_m->do_remove_front(size); }
39190 #define pop_function_nodiscard nodiscard("if you don't want to use the return value, use remove_back() or remove_front() instead to avoid unnecessary cost")
39191 [[pop_function_nodiscard]]string_t pop_back(size_t size)noexcept{ _cso_check();return _m->do_pop_back(size,_m); }
39192 [[pop_function_nodiscard]]string_t pop_front(size_t size)noexcept{ _cso_check();return _m->do_pop_front(size,_m); }
39193 [[pop_function_nodiscard]]char_T pop_back()noexcept{ return pop_back(1)[0]; }
39194 [[pop_function_nodiscard]]char_T pop_front()noexcept{ return pop_front(1)[0]; }
39195 #undef pop_function_nodiscard
39196
39197 //
39198
39199 [[nodiscard]]operator string_view_t()const&noexcept{ return string_view_t{data(),size()}; }
39200 [[nodiscard]]auto to_string_view_t()const&noexcept{ return operator string_view_t(); }
39201 [[nodiscard]]auto view()&noexcept{ return array_like_view_t<char_T>{writeable_data(),size()}; }
39202 [[nodiscard]]auto view()const&noexcept{ return array_like_view_t<const char_T>{data(),size()}; }
39203 [[nodiscard]]explicit operator hash_t()const noexcept{ return _in_cso()?_get_cso_hash():_m->get_hash(_m); }
39204
39205 //
39206 static constexpr bool find_nothrow=equal.nothrow<char_T>;
39207 [[nodiscard]]size_t find(const char_T ch)const noexcept(find_nothrow){
39208 if(_in_cso()){
39209 if(_in_str_cso())
39210 return in_range_size_t(ch,_get_cso_constexpr_str());
39211 else//if(_in_cso())
39212 return _cso_info._ch==ch?0:npos;
39213 }
39214 return in_range_size_t(ch, to_string_view_t());
39215 }
39216 [[nodiscard]]size_t find(const char_T ch,size_t begin)const noexcept(find_nothrow){
39217 return in_range_size_t(ch, to_string_view_t().substr(begin));
39218 }
39219 [[nodiscard]]size_t reverse_find(const char_T ch)const noexcept(find_nothrow){
39220 if(_in_cso()){
39221 if(_in_str_cso())
39222 return in_range_but_reverse_size_t(ch,_get_cso_constexpr_str());
39223 else//if(_in_cso())
39224 return _cso_info._ch==ch?0:npos;
39225 }
39226 return in_range_but_reverse_size_t(ch, to_string_view_t());
39227 }
39228 [[nodiscard]]size_t find(string_view_t str,size_t begin=0)const noexcept(find_nothrow){
39229 return in_range_size_t(str, to_string_view_t().substr(begin));
39230 }
39231 [[nodiscard]]size_t reverse_find(string_view_t str)const noexcept(find_nothrow){
39232 return in_range_but_reverse_size_t(str, to_string_view_t());
39233 }
39234 [[nodiscard]]size_t find(constexpr_str_t&str,size_t begin=0)const noexcept(find_nothrow){
39235 return in_range_size_t(str, to_string_view_t().substr(begin));
39236 }
39237 [[nodiscard]]size_t reverse_find(constexpr_str_t&str)const noexcept(find_nothrow){
39238 return in_range_but_reverse_size_t(str, to_string_view_t());
39239 }
39240 [[nodiscard]]size_t find(const string_t&str,size_t begin=0)const noexcept(find_nothrow){
39241 if(str._in_cso()){
39242 if(str._in_str_cso())
39243 return find(str._get_cso_constexpr_str(),begin);
39244 else//if(str._in_cso())
39245 return find(str._cso_info._ch,begin);
39246 }
39247 auto result = str._m->get_match_pattern_from_self(str._m).match(to_string_view_t().substr(begin));
39248 if(result)
39249 return result - data();
39250 else
39251 return npos;
39252 }
39253 [[nodiscard]]size_t reverse_find(const string_t&str)const noexcept(find_nothrow){
39254 if(str._in_cso()){
39255 if(str._in_str_cso())
39256 return reverse_find(str._get_cso_constexpr_str());
39257 elseif(str._in_cso())
39258 return reverse_find(str._cso_info._ch);
39259 }
39260 auto result = str._m->get_reverse_match_pattern_from_self(str._m).match(to_string_view_t());
39261 if(result)
39262 return result - data();
39263 else
39264 return npos;
39265 }
39266 //
39267 [[nodiscard]]size_t find_first_of(string_view_t str)const noexcept(find_nothrow){
39268 return range_n::find_first_of_size_t(str,to_string_view_t());
39269 }
39270 [[nodiscard]]size_t find_first_of(constexpr_str_t&str)const noexcept(find_nothrow){
39271 return range_n::find_first_of_size_t(str,to_string_view_t());
39272 }
39273 [[nodiscard]]size_t find_first_of(const string_t&str)const noexcept(find_nothrow){
39274 if(str._in_cso()){
39275 if(str._in_str_cso())
39276 return find_first_of(str._get_cso_constexpr_str());
39277 elseif(str._in_cso())
39278 return find(str._cso_info._ch);
39279 }
39280 return find_first_of(str.to_string_view_t());
39281 }
39282 [[nodiscard]]size_t find_first_of(const_string_ptr_t str)const noexcept(find_nothrow){
39283 return find_first_of(string_view_t(str));
39284 }
39285 [[nodiscard]]size_t find_first_of(char_T ch)const noexcept(find_nothrow){
39286 return find(ch);
39287 }
39288 [[nodiscard]]size_t find_first_of(const arec_t&&ch)const noexcept(find_nothrow){
39289 return find(move(ch).operator char_T());
39290 }
39291 [[nodiscard]]size_t find_first_not_of(string_view_t str)const noexcept(find_nothrow){
39292 return range_n::find_first_not_of_size_t(str,to_string_view_t());
39293 }
39294 [[nodiscard]]size_t find_first_not_of(constexpr_str_t&str)const noexcept(find_nothrow){
39295 return range_n::find_first_not_of_size_t(str,to_string_view_t());
39296 }
39297 [[nodiscard]]size_t find_first_not_of(const string_t&str)const noexcept(find_nothrow){
39298 if(str._in_cso()){
39299 if(str._in_str_cso())
39300 return find_first_not_of(str._get_cso_constexpr_str());
39301 elseif(str._in_cso())
39302 return find_first_not_of(str.to_string_view_t());
39303 }
39304 return find_first_not_of(str.to_string_view_t());
39305 }
39306 [[nodiscard]]size_t find_first_not_of(const_string_ptr_t str)const noexcept(find_nothrow){
39307 return find_first_not_of(string_view_t(str));
39308 }
39309 [[nodiscard]]size_t find_first_not_of(char_T ch)const noexcept(find_nothrow){
39310 return find_first_not_of(string_view_t(ch));
39311 }
39312 [[nodiscard]]size_t find_first_not_of(const arec_t&&ch)const noexcept(find_nothrow){
39313 return find_first_not_of(string_view_t(move(ch).operator char_T()));
39314 }
39315 [[nodiscard]]size_t find_last_of(string_view_t str)const noexcept(find_nothrow){
39316 return range_n::find_last_of_size_t(str,to_string_view_t());
39317 }
39318 [[nodiscard]]size_t find_last_of(constexpr_str_t&str)const noexcept(find_nothrow){
39319 return range_n::find_last_of_size_t(str,to_string_view_t());
39320 }
39321 [[nodiscard]]size_t find_last_of(const string_t&str)const noexcept(find_nothrow){
39322 if(str._in_cso()){
39323 if(str._in_str_cso())
39324 return find_last_of(str._get_cso_constexpr_str());
39325 elseif(str._in_cso())
39326 return reverse_find(str._cso_info._ch);
39327 }
39328 return find_last_of(str.to_string_view_t());
39329 }
39330 [[nodiscard]]size_t find_last_of(const_string_ptr_t str)const noexcept(find_nothrow){
39331 return find_last_of(string_view_t(str));
39332 }
39333 [[nodiscard]]size_t find_last_of(char_T ch)const noexcept(find_nothrow){
39334 return reverse_find(ch);
39335 }
39336 [[nodiscard]]size_t find_last_of(const arec_t&&ch)const noexcept(find_nothrow){
39337 return reverse_find(move(ch).operator char_T());
39338 }
39339 [[nodiscard]]size_t find_last_not_of(string_view_t str)const noexcept(find_nothrow){
39340 return range_n::find_last_not_of_size_t(str,to_string_view_t());
39341 }
39342 [[nodiscard]]size_t find_last_not_of(constexpr_str_t&str)const noexcept(find_nothrow){
39343 return range_n::find_last_not_of_size_t(str,to_string_view_t());
39344 }
39345 [[nodiscard]]size_t find_last_not_of(const string_t&str)const noexcept(find_nothrow){
39346 if(str._in_cso()){
39347 if(str._in_str_cso())
39348 return find_last_not_of(str._get_cso_constexpr_str());
39349 elseif(str._in_cso())
39350 return find_last_not_of(str.to_string_view_t());
39351 }
39352 return find_last_not_of(str.to_string_view_t());
39353 }
39354 [[nodiscard]]size_t find_last_not_of(const_string_ptr_t str)const noexcept(find_nothrow){
39355 return find_last_not_of(string_view_t(str));
39356 }
39357 [[nodiscard]]size_t find_last_not_of(char_T ch)const noexcept(find_nothrow){
39358 return find_last_not_of(string_view_t{&ch,1});
39359 }
39360 [[nodiscard]]size_t find_last_not_of(const arec_t&&ch)const noexcept(find_nothrow){
39361 return find_last_not_of(move(ch).operator char_T());
39362 }
39363
39364 //
39365
39366 [[nodiscard]]string_t arec(size_t index,char_T delimiter)const{
39367 auto pos=find(delimiter);
39368 auto end=find(delimiter,pos);
39369 while(index--){
39370 pos=end;
39371 end=find(delimiter,pos);
39372 }
39373 return substr(pos,end-pos);
39374 }
39375 [[nodiscard]]string_t arec(size_t index,string_view_t delimiter_str)const{
39376 auto pos=find(delimiter_str);
39377 auto end=find(delimiter_str,pos);
39378 while(index--){
39379 pos=end;
39380 end=find(delimiter_str,pos);
39381 }
39382 return substr(pos,end-pos);
39383 }
39384 [[nodiscard]]string_t arec(size_t index,const string_t&delimiter_str)const{
39385 auto pos=find(delimiter_str);
39386 auto end=find(delimiter_str,pos);
39387 while(index--){
39388 pos=end;
39389 end=find(delimiter_str,pos);
39390 }
39391 return substr(pos,end-pos);
39392 }
39393 [[nodiscard]]string_t arec(size_t index,constexpr_str_t&delimiter_str)const{
39394 auto pos=find(delimiter_str);
39395 auto end=find(delimiter_str,pos);
39396 while(index--){
39397 pos=end;
39398 end=find(delimiter_str,pos);
39399 }
39400 return substr(pos,end-pos);
39401 }
39402
39403 //
39404
39405 void erase(size_t pos,size_t size=1)&noexcept{
39406 _cso_check();_m=_m->do_erase(pos,size);
39407 }
39408 void insert(size_t pos,const string_t& str)&noexcept{
39409 _cso_check();
39410 full_copy_cso_check(str);
39411 if(str._in_cso())
39412 _m=_m->do_insert(pos,str.to_string_view_t());
39413 else
39414 _m=_m->do_insert(pos,str);
39415 }
39416 void insert(size_t pos,string_view_t str)&noexcept{
39417 _cso_check();_m=_m->do_insert(pos,str);
39418 }
39419 void insert(size_t pos,const_string_ptr_t str)&noexcept{
39420 insert(pos,string_view_t(str));
39421 }
39422 void insert(size_t pos,char_T ch)&noexcept{
39423 insert(pos,string_view_t{&ch,1});
39424 }
39425
39426 //
39427
39428 //contains
39429 [[nodiscard]]constexpr bool contains(string_view_t str)const noexcept{
39430 return find(str) != npos;
39431 }
39432 [[nodiscard]]constexpr bool contains(constexpr_str_t&str)const noexcept{
39433 return find(str) != npos;
39434 }
39435 [[nodiscard]]constexpr bool contains(const string_t&str)const noexcept{
39436 return find(str) != npos;
39437 }
39438 [[nodiscard]]constexpr bool contains(char_T ch)const noexcept{
39439 return find(ch) != npos;
39440 }
39441 [[nodiscard]]constexpr bool contains(const_string_ptr_t str)const noexcept{
39442 return find(str) != npos;
39443 }
39444
39445 //starts_with
39446 [[nodiscard]]constexpr bool starts_with(string_view_t str)const noexcept{
39447 if(size()<str.size())
39448 return false;
39449 return substr(0,str.size()) == str;
39450 }
39451 [[nodiscard]]constexpr bool starts_with(constexpr_str_t&str)const noexcept{
39452 if(size()<str.size())
39453 return false;
39454 return substr(0,str.size()) == str;
39455 }
39456 [[nodiscard]]constexpr bool starts_with(const string_t&str)const noexcept{
39457 if(size()<str.size())
39458 return false;
39459 if(str._in_chr_cso())
39460 return starts_with(str._cso_info._ch);
39461 else
39462 return substr(0,str.size()) == str;
39463 }
39464 [[nodiscard]]constexpr bool starts_with(char_T ch)const noexcept{
39465 if(size()<1)
39466 return false;
39467 return operator[](0) == ch;
39468 }
39469 [[nodiscard]]constexpr bool starts_with(const_string_ptr_t str)const noexcept{
39470 return starts_with(string_view_t{str});
39471 }
39472
39473 //ends_with
39474 [[nodiscard]]constexpr bool ends_with(string_view_t str)const noexcept{
39475 if(size()<str.size())
39476 return false;
39477 return substr(size()-str.size()) == str;
39478 }
39479 [[nodiscard]]constexpr bool ends_with(constexpr_str_t&str)const noexcept{
39480 if(size()<str.size())
39481 return false;
39482 return substr(size()-str.size()) == str;
39483 }
39484 [[nodiscard]]constexpr bool ends_with(const string_t&str)const noexcept{
39485 if(size()<str.size())
39486 return false;
39487 if(str._in_chr_cso())
39488 return ends_with(str._cso_info._ch);
39489 else
39490 return substr(size()-str.size()) == str;
39491 }
39492 [[nodiscard]]constexpr bool ends_with(char_T ch)const noexcept{
39493 if(size()<1)
39494 return false;
39495 return operator[](size()-1) == ch;
39496 }
39497 [[nodiscard]]constexpr bool ends_with(char_T ch,size_t count)const noexcept{
39498 if(size() < count)
39499 return false;
39500 return find_last_not_of(ch) <= size()-count;
39501 }
39502 [[nodiscard]]constexpr bool ends_with(const_string_ptr_t str)const noexcept{
39503 return ends_with(string_view_t{str});
39504 }
39505
39506 this_t& append(size_t size,char_T ch)noexcept{
39507 return *this+=string_t{size,ch};
39508 }
39509
39510 //pad_left
39511 [[nodiscard]]this_t pad_left(size_t size,char_T ch)const noexcept{
39512 if(size<=this->size())
39513 return *this;
39514 return string_t{size-this->size(),ch}+*this;
39515 }
39516 [[nodiscard]]this_t pad_left(char_T ch,size_t size)const noexcept{
39517 return pad_left(size,ch);
39518 }
39519 //pad_right
39520 [[nodiscard]]this_t pad_right(size_t size,char_T ch)const noexcept{
39521 if(size<=this->size())
39522 return *this;
39523 return *this+string_t{size-this->size(),ch};
39524 }
39525 [[nodiscard]]this_t pad_right(char_T ch,size_t size)const noexcept{
39526 return pad_right(size,ch);
39527 }
39528
39529 //pre_allocate
39530 void pre_alloc_before_begin(size_t size)noexcept{
39531 _cso_check();
39532 _m=_m->pre_alloc_before_begin(size);
39533 }
39534 void pre_alloc_after_end(size_t size)noexcept{
39535 _cso_check();
39536 _m=_m->pre_alloc_after_end(size);
39537 }
39538
39539 /*
39540 compare
39541 */
39542
39543 //replace
39544 //TODO: 右值版replace
39545 [[nodiscard]]this_t replace(size_t pos,size_t size,const string_t& str)const noexcept{
39546 return substr(0,pos)+str+substr(pos+size);
39547 }
39548 [[nodiscard]]this_t replace(char_T ch,char_T ch2)const noexcept{
39549 this_t aret;
39550 size_t pos=0;
39551 floop{
39552 auto pos2=find(ch,pos);
39553 if(pos2==npos)
39554 break;
39555 aret+=substr(pos,pos2-pos)+ch2;
39556 pos=pos2+1;
39557 }
39558 aret+=substr(pos);
39559 return aret;
39560 }
39561 [[nodiscard]]this_t replace(char_T ch,const string_t& str)const noexcept{
39562 this_t aret;
39563 size_t pos=0;
39564 floop{
39565 auto pos2=find(ch,pos);
39566 if(pos2==npos)
39567 break;
39568 aret+=substr(pos,pos2-pos)+str;
39569 pos=pos2+1;
39570 }
39571 aret+=substr(pos);
39572 return aret;
39573 }
39574 [[nodiscard]]this_t replace(const string_t& str1,const string_t& str2)const noexcept{
39575 this_t aret;
39576 size_t pos=0;
39577 floop{
39578 auto pos2=find(str1,pos);
39579 if(pos2==npos)
39580 break;
39581 aret+=substr(pos,pos2-pos)+str2;
39582 pos=pos2+str1.size();
39583 }
39584 aret+=substr(pos);
39585 return aret;
39586 }
39587
39588 //iostream
39589 template<class text_ostream_T> requires(type_info<text_ostream_T>.base_on<text_ostream_t<char_T>>)
39590 friend auto& operator<<(text_ostream_T& os,const string_t& str)noexcept(noexcept_text_ostream_class<text_ostream_T>){
39591 if(str._in_cso())
39592 os<<str.to_string_view_t();
39593 else{
39594 push_and_disable_msvc_warning(26447);//nothrow警告diss
39595 str._m->do_output(os);
39597 }
39598 return os;
39599 }
39600 template<class text_istream_T> requires(type_info<text_istream_T>.base_on<text_istream_t<char_T>>)
39601 friend auto& operator>>(text_istream_T& is,string_t& str)noexcept(noexcept_text_istream_class<text_istream_T>){
39602 str.clear();
39603 using namespace char_set;
39604 while(isspace(is.peek()))
39605 is.get();
39606 /*/
39607 size_t insert_pos=0;
39608 while(!is.is_end()){
39609 const auto c=is.peek();
39610 switch (c){
39611 case char_T(38)://right
39612 is.get();
39613 if(insert_pos<str.size())
39614 insert_pos++;
39615 break;
39616 case char_T(37)://left
39617 is.get();
39618 if(insert_pos>0)
39619 insert_pos--;
39620 break;
39621 case char_T(8)://backspace
39622 is.get();
39623 if(insert_pos>0)
39624 str.erase(--insert_pos);
39625 break;
39626
39627 default:
39628 if(isspace(c))
39629 return is;
39630 else
39631 str.insert(insert_pos++,is.get());
39632 break;
39633 }
39634 }
39635 /*/
39636 while(!is.is_end()&&!isspace(is.peek()))
39637 str+=is.get();
39638 //*/
39639 return is;
39640 }
39641 template<class text_istream_T> requires(type_info<text_istream_T>.base_on<text_istream_t<char_T>>)
39642 friend auto& getline(text_istream_T& is,string_t& str)noexcept(noexcept_text_istream_class<text_istream_T>){
39643 str.clear();
39644 using namespace char_set;
39645 while(isspace(is.peek()))
39646 is.get();
39647 /*/
39648 size_t insert_pos=0;
39649 while(!is.is_end()){
39650 const auto c=is.peek();
39651 switch (c){
39652 case char_T(38)://right
39653 is.get();
39654 if(insert_pos<str.size())
39655 insert_pos++;
39656 break;
39657 case char_T(37)://left
39658 is.get();
39659 if(insert_pos>0)
39660 insert_pos--;
39661 break;
39662 case char_T(8)://backspace
39663 is.get();
39664 if(insert_pos>0)
39665 str.erase(--insert_pos);
39666 break;
39667 case char_T('\r'):
39668 case char_T('\n'):
39669 is>>endline;//处理结尾
39670 return str;
39671 default:
39672 str.push_back(is.get());
39673 break;
39674 }
39675 }
39676 /*/
39677 while(!is.is_end()&&is.peek()!='\r'&&is.peek()!='\n')
39678 str+=is.get();
39679 //*/
39680 is>>endline;//处理结尾
39681 return str;
39682 }
39683 #undef _m
39684 };
39685}
39686
39687namespace stream_n{
39688 //单参数getline
39689 template<text_istream_class text_istream_T>
39690 [[nodiscard]]inline auto getline(text_istream_T& is)noexcept(noexcept_text_istream_class<text_istream_T>){
39691 typedef typename remove_cvref<text_istream_T>::char_type char_T;
39693 return getline(is,str);
39694 }
39695}
39696
39697namespace string_n{
39698 //推导指引
39699 template<class char_T>
39700 string_t(const char_T*) -> string_t<char_T>;
39701 template<class char_T>
39703
39704 //string的swap特化
39705 template<typename T>
39706 inline void swap(string_t<T>& a,string_t<T>& b)noexcept{ a.swap_with(b); }
39707
39708 //other iostream
39709 template<typename char_T,typename traits>
39710 inline auto& operator<<(::std::basic_ostream<char_T,traits>& os,const string_t<char_T>& str)noexcept{
39711 typedef ::std::basic_ostream<char_T,traits> stream_t;
39712 typedef stream_t::traits_type traits_t;
39713 typename stream_t::iostate state = stream_t::goodbit;
39714
39715 size_t size = str.size();
39716 push_and_disable_msvc_warning(26494);//未初始化警告diss
39717 size_t pad;
39718 if(os.width() <= 0 || static_cast<size_t>(os.width()) <= size)
39719 pad = 0;
39720 else
39721 pad = static_cast<size_t>(os.width()) - size;
39723
39724 const typename stream_t::sentry isok(os);
39725
39726 if(!isok)
39727 state |= stream_t::badbit;
39728 else{
39729 try{
39730 if((os.flags() & stream_t::adjustfield) != stream_t::left){
39731 for(; 0 < pad; --pad){// pad on left
39732 if(traits_t::eq_int_type(traits_t::eof(), os.rdbuf()->sputc(os.fill()))){
39733 state |= stream_t::badbit;// insertion failed, quit
39734 break;
39735 }
39736 }
39737 }
39738 if(state == stream_t::goodbit){
39740 wrap<<str;
39741 }
39742 if(os.fail())
39743 state |= stream_t::badbit;
39744 else{
39745 for(; 0 < pad; --pad){// pad on right
39746 if(traits_t::eq_int_type(traits_t::eof(), os.rdbuf()->sputc(os.fill()))){
39747 state |= stream_t::badbit;// insertion failed, quit
39748 break;
39749 }
39750 }
39751 }
39752 os.width(0);
39753 }
39754 catch(...){
39755 os.setstate(stream_t::badbit, true);
39756 return os;
39757 }
39758 }
39759 os.setstate(state);
39760 return os;
39761 }
39762 template<typename char_T,typename traits>
39763 inline auto& operator>>(::std::basic_istream<char_T,traits>& is,string_t<char_T>& str)noexcept{
39765 wrap>>str;
39766 return is;
39767 }
39768
39769 //array like支持
39770 template<class T>
39771 [[nodiscard]]inline auto size_of_array_like(const string_t<remove_cv<T>>& a)noexcept{ return a.size(); }
39772 push_and_disable_msvc_warning(26460);//参数1可以为const 但是这是有意的
39773 template<class T>
39774 [[nodiscard]]inline auto begin_of_array_like(string_t<remove_cv<T>>& a)noexcept{ return a.c_str(); }
39776 template<class T>
39777 [[nodiscard]]inline auto begin_of_array_like(const string_t<remove_cv<T>>& a)noexcept{ return a.c_str(); }
39778
39779 //typedef
39780 typedef string_t<char_t>string;
39781}
39782using string_n::string_t;
39783using string_n::string;
39784
39785//file_end
39786
39787 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
39788
39789 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
39790//_undefs.hpp
39791/*
39792未完成的elc解释器basic文件
39793由steve02081504与Alex0125设计、编写
39794转载时请在不对此文件做任何修改的同时注明出处
39795项目地址:https://github.com/ELC-lang/ELC
39796*/
39797/*
39798 ,??????????????????????????
39799 ????????????????????????????
39800 ?????????????????????????????+
39801 ?????+++++++++++++++++++++++++
39802 ?????+++++++++++++++++++++++++
39803 ??????++++++++++++++++++++++++
39804 ?????++
39805 ?????+++
39806 ??????+++IIIIIIIIIIIIIIIIII
39807 ?????+++++IIIIIIIIIIIIIIIIII
39808 ?????++++++++++++++++++++++++
39809 ??????+++++++++++++++++++++++:
39810 ?????++
39811 ?????+++
39812 ??????++
39813 ??????????????????????????????II
39814 ??????????????????????????????IIII
39815 ,?????????????????????????????IIIII+
39816 =???++++++++++++++++++++++++++III?
39817 ?++++++++++++++++++++++++++++I+
39818*/
39819#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
39820//_undefs.hpp
39821/*
39822未完成的elc解释器_share文件
39823由steve02081504与Alex0125设计、编写
39824转载时请在不对此文件做任何修改的同时注明出处
39825项目地址:https://github.com/ELC-lang/ELC
39826*/
39827/*
39828 ,??????????????????????????
39829 ????????????????????????????
39830 ?????????????????????????????+
39831 ?????+++++++++++++++++++++++++
39832 ?????+++++++++++++++++++++++++
39833 ??????++++++++++++++++++++++++
39834 ?????++
39835 ?????+++
39836 ??????+++IIIIIIIIIIIIIIIIII
39837 ?????+++++IIIIIIIIIIIIIIIIII
39838 ?????++++++++++++++++++++++++
39839 ??????+++++++++++++++++++++++:
39840 ?????++
39841 ?????+++
39842 ??????++
39843 ??????????????????????????????II
39844 ??????????????????????????????IIII
39845 ,?????????????????????????????IIIII+
39846 =???++++++++++++++++++++++++++III?
39847 ?++++++++++++++++++++++++++++I+
39848*/
39849
39850//defs at "_defs.hpp"
39851
39852#if defined(_MSC_VER)
39853 #pragma warning(pop)
39854#endif
39855//#undef suppress_msvc_warning
39856#undef disable_msvc_warning
39857#undef push_msvc_warning
39858#undef pop_msvc_warning
39859#undef push_and_disable_msvc_warning
39860#if defined(_MSC_VER)
39861 #pragma pack(pop)
39862#endif
39863#if defined(__GNUC__)
39864 #pragma GCC diagnostic pop
39865#endif
39866#if defined(_MSC_VER)
39867 #pragma pop_macro("new")
39868 #pragma pop_macro("delete")
39869 #pragma pop_macro("min")
39870 #pragma pop_macro("max")
39871 #pragma pop_macro("abs")
39872 #pragma pop_macro("export")
39873 #pragma pop_macro("rand")
39874 #pragma pop_macro("sqrt")
39875 #pragma pop_macro("type_info")
39876 #pragma pop_macro("elc")
39877#endif
39878
39879//
39880#if defined(ELC_VOID_NAME)
39881 #define void the_void
39882#endif
39883//
39884#if defined(ELC_PUBLIC_ALL)
39885 #undef protected
39886 #undef private
39887#endif
39888//
39889#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
39890 #define rand the_rand
39891#endif
39892
39893// #undef often_noexcept
39894#undef noexcept_as
39895#undef noexcept_as_auto
39896#undef constexpr_as
39897#undef constexpr_as_auto
39898
39899#undef using_method_from_base_t
39900#undef using_method_from_value
39901
39902#undef floop
39903#undef times
39904#undef debug_times
39905#undef enable_adl
39906
39907#undef re_declvalue
39908#undef re_decltype
39909
39910#undef declvalue
39911
39912#undef template_error
39913#undef template_error_of_type
39914#undef template_warning
39915
39916#undef type_info_of
39917#undef type_name_of
39918
39919#undef is_common_attribute
39920#undef is_special_attribute
39921
39922#undef has_attribute
39923#undef not_has_attribute
39924
39925#undef float_size_of
39926#undef bitnum_of
39927
39928#undef def_common_attribute_with_nothing
39929#undef def_special_attribute_with_nothing
39930
39931#undef common_attribute_t
39932#undef special_attribute_t
39933
39934#undef enable_if
39935#undef enabled_by_default
39936#undef disabled_by_default
39937#undef enable_if_not_ill_form
39938#undef enable_flag
39939
39940#undef was_an_ill_form
39941#undef was_an_ill_form_with_parameter
39942#undef was_not_an_ill_form
39943#undef was_not_an_ill_form_and_noexcept
39944#undef was_not_an_ill_form_with_parameter
39945
39946#undef recursive_λ
39947#undef get_recursive_λ_caller
39948#undef λ
39949#undef exλ
39950#undef λ_with_catch
39951#undef self_recursion
39952#undef λ_RLSRRS
39953#undef λ_inline
39954#undef λ_force_inline
39955
39956#undef MAGIC
39957
39958#undef nothing
39959
39960#undef elseif
39961#undef _big_than_
39962#undef _small_than_
39963
39964#if defined(_MSC_VER)
39965 #undef not
39966 #undef and
39967 #undef or
39968#endif
39969
39970#undef INTER_NAMESPACE
39971#undef BREAK_NAMESPACE
39972
39973#undef szie
39974#undef form
39975
39976#undef template_name
39977#undef type_name
39978
39979#undef not_in_debug
39980
39981#undef es
39982#undef ec
39983
39984#undef ELC_TEST_EVENTNAME
39985
39986#undef override_instance_struct
39987
39988#undef distinctive
39989
39990#undef force_inline
39991
39992#undef with_no_vtable
39993
39994#undef in_consteval
39995
39996#undef no_vtable_struct
39997#undef no_vtable_class
39998
39999//#undef get_elc_defs
40000
40001//file_end
40002
40003#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
40004
40005//file_end
40006
40007 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
40008}
40009//strings
40010#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
40011//str_code_convert.hpp
40012/*
40013未完成的elc解释器_share文件
40014由steve02081504与Alex0125设计、编写
40015转载时请在不对此文件做任何修改的同时注明出处
40016项目地址:https://github.com/ELC-lang/ELC
40017*/
40018/*
40019 ,??????????????????????????
40020 ????????????????????????????
40021 ?????????????????????????????+
40022 ?????+++++++++++++++++++++++++
40023 ?????+++++++++++++++++++++++++
40024 ??????++++++++++++++++++++++++
40025 ?????++
40026 ?????+++
40027 ??????+++IIIIIIIIIIIIIIIIII
40028 ?????+++++IIIIIIIIIIIIIIIIII
40029 ?????++++++++++++++++++++++++
40030 ??????+++++++++++++++++++++++:
40031 ?????++
40032 ?????+++
40033 ??????++
40034 ??????????????????????????????II
40035 ??????????????????????????????IIII
40036 ,?????????????????????????????IIIII+
40037 =???++++++++++++++++++++++++++III?
40038 ?++++++++++++++++++++++++++++I+
40039*/
40040/*
40041APIs说明
40042elc依赖的基础函数.
40043调整这些,实现快速移植,快速优化与行为自定义.
40044*/
40045#if !defined(ELC_APIS_str_code_convert)
40046 #define ELC_APIS_str_code_convert
40047 #include <cuchar>
40048 #include <clocale>
40049 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/default_data_type.hpp"
40050//default_data_type.hpp
40051/*
40052未完成的elc解释器_share文件
40053由steve02081504与Alex0125设计、编写
40054转载时请在不对此文件做任何修改的同时注明出处
40055项目地址:https://github.com/ELC-lang/ELC
40056*/
40057/*
40058 ,??????????????????????????
40059 ????????????????????????????
40060 ?????????????????????????????+
40061 ?????+++++++++++++++++++++++++
40062 ?????+++++++++++++++++++++++++
40063 ??????++++++++++++++++++++++++
40064 ?????++
40065 ?????+++
40066 ??????+++IIIIIIIIIIIIIIIIII
40067 ?????+++++IIIIIIIIIIIIIIIIII
40068 ?????++++++++++++++++++++++++
40069 ??????+++++++++++++++++++++++:
40070 ?????++
40071 ?????+++
40072 ??????++
40073 ??????????????????????????????II
40074 ??????????????????????????????IIII
40075 ,?????????????????????????????IIIII+
40076 =???++++++++++++++++++++++++++III?
40077 ?++++++++++++++++++++++++++++I+
40078*/
40079namespace elc{
40080 /*ELC内部string统一采用char_t宽字符,使用setlocale(LC_ALL,"en_US.utf8")下的UTF编码。*/
40081 typedef char32_t char_t;
40082 /*c_string表示*/
40083 typedef char_t* string_ptr_t;
40084 /*c_string表示*/
40085 typedef const char_t* const_string_ptr_t;
40086 /*ELC内部钦定int_t类型*/
40087 typedef int64_t int_t;
40088 /*ELC内部钦定uint_t类型*/
40089 typedef uint64_t uint_t;
40090 /*ELC内部钦定float_t类型*/
40091 typedef double float_t;
40092 /*ELC内部钦定float_size_t类型,用以描述内存大小的浮点状况*/
40093 typedef long double float_size_t;
40094}
40095
40096//file_end
40097
40098 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
40099 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
40100//string
40101//at namespace ::
40102/*@
40103未完成的elc解释器include文件
40104由steve02081504与Alex0125设计、编写
40105转载时请在不对此文件做任何修改的同时注明出处
40106项目地址:https://github.com/ELC-lang/ELC
40107*/
40108/*
40109 ,??????????????????????????
40110 ????????????????????????????
40111 ?????????????????????????????+
40112 ?????+++++++++++++++++++++++++
40113 ?????+++++++++++++++++++++++++
40114 ??????++++++++++++++++++++++++
40115 ?????++
40116 ?????+++
40117 ??????+++IIIIIIIIIIIIIIIIII
40118 ?????+++++IIIIIIIIIIIIIIIIII
40119 ?????++++++++++++++++++++++++
40120 ??????+++++++++++++++++++++++:
40121 ?????++
40122 ?????+++
40123 ??????++
40124 ??????????????????????????????II
40125 ??????????????????????????????IIII
40126 ,?????????????????????????????IIIII+
40127 =???++++++++++++++++++++++++++III?
40128 ?++++++++++++++++++++++++++++I+
40129*/
40130#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
40131//pre_checks.hpp
40132/*
40133未完成的elc解释器_share文件
40134由steve02081504与Alex0125设计、编写
40135转载时请在不对此文件做任何修改的同时注明出处
40136项目地址:https://github.com/ELC-lang/ELC
40137*/
40138/*
40139 ,??????????????????????????
40140 ????????????????????????????
40141 ?????????????????????????????+
40142 ?????+++++++++++++++++++++++++
40143 ?????+++++++++++++++++++++++++
40144 ??????++++++++++++++++++++++++
40145 ?????++
40146 ?????+++
40147 ??????+++IIIIIIIIIIIIIIIIII
40148 ?????+++++IIIIIIIIIIIIIIIIII
40149 ?????++++++++++++++++++++++++
40150 ??????+++++++++++++++++++++++:
40151 ?????++
40152 ?????+++
40153 ??????++
40154 ??????????????????????????????II
40155 ??????????????????????????????IIII
40156 ,?????????????????????????????IIIII+
40157 =???++++++++++++++++++++++++++III?
40158 ?++++++++++++++++++++++++++++I+
40159*/
40160//__cplusplus needs 20+
40161#if !defined(__cplusplus)||__cplusplus<202002L
40162 //if msvc, check _MSVC_LANG
40163 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
40164 //ok
40165 #else
40166 #error "elc files needs c++20 or higher"
40167 #endif
40168#endif
40169
40170//check if the compiler is msvc
40171#if defined(_MSC_VER)
40172 //check if _CPPRTTI
40173 #if !defined(_CPPRTTI)
40174 #error "elc files needs rtti"
40175 #endif
40176 //check _MSC_VER at last 1932
40177 #if _MSC_VER<1932
40178 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
40179 #endif
40180#endif
40181
40182//file_end
40183
40184#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
40185#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
40186
40187//file_end
40188
40189 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
40191 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
40192//_defs.hpp
40193/*
40194未完成的elc解释器_share文件
40195由steve02081504与Alex0125设计、编写
40196转载时请在不对此文件做任何修改的同时注明出处
40197项目地址:https://github.com/ELC-lang/ELC
40198*/
40199/*
40200 ,??????????????????????????
40201 ????????????????????????????
40202 ?????????????????????????????+
40203 ?????+++++++++++++++++++++++++
40204 ?????+++++++++++++++++++++++++
40205 ??????++++++++++++++++++++++++
40206 ?????++
40207 ?????+++
40208 ??????+++IIIIIIIIIIIIIIIIII
40209 ?????+++++IIIIIIIIIIIIIIIIII
40210 ?????++++++++++++++++++++++++
40211 ??????+++++++++++++++++++++++:
40212 ?????++
40213 ?????+++
40214 ??????++
40215 ??????????????????????????????II
40216 ??????????????????????????????IIII
40217 ,?????????????????????????????IIIII+
40218 =???++++++++++++++++++++++++++III?
40219 ?++++++++++++++++++++++++++++I+
40220*/
40221
40222//undefs at "_undefs.hpp"
40223
40224#if defined(ELC_CODE_REALM)
40225 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
40226#endif
40227
40228//set ELC_WARNING_LEVEL default to 4(max)
40229#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
40230
40231#if defined(_MSC_VER)
40232 #pragma warning(push,ELC_WARNING_LEVEL)
40233 #pragma warning(disable:4099)//class与struct混用警告diss
40234 #pragma warning(disable:4584)//重复子类警告diss
40235 #pragma warning(disable:4250)//域控制继承警告diss
40236 #pragma warning(disable:26432)//不完全默认方法警告diss
40237 #pragma warning(disable:26435)//virtual override方法警告diss
40238 #pragma warning(disable:26481)//容器安利diss
40239 #pragma warning(disable:26446)//gsl::at安利diss
40240 #pragma warning(disable:26434)//方法覆盖警告diss
40241 #pragma warning(disable:26429)//gsl::not_null安利diss
40242 #pragma warning(disable:26471)//对void*进行static_cast安利diss
40243 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
40244 #pragma warning(disable:26473)//相同指针显式cast警告diss
40245 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
40246 #pragma warning(disable:26485)//数组作指针警告diss
40247 #pragma warning(disable:26490)//reinterpret_cast警告diss
40248 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
40249 #pragma warning(disable:26482)//非常数数组索引警告diss
40250 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
40251#endif
40252#if defined(__GNUC__)
40253 #pragma GCC diagnostic push
40254 #pragma GCC diagnostic warning "-Wall"//开启所有警告
40255 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
40256#endif
40257#if defined(_MSC_VER)
40258 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
40259 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
40260 #define push_msvc_warning() __pragma(warning(push))
40261 #define pop_msvc_warning() __pragma(warning(pop))
40262 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
40263#else
40264 //#define suppress_msvc_warning(...)
40265 #define disable_msvc_warning(...)
40266 #define push_msvc_warning()
40267 #define pop_msvc_warning()
40268 #define push_and_disable_msvc_warning(...)
40269#endif
40270#if defined(_MSC_VER)
40271 //push pack settings
40272 #pragma pack(push)
40273 #pragma pack()
40274#endif
40275#if defined(_MSC_VER)
40276 //push and undef common macros
40277 #pragma push_macro("new")
40278 #undef new
40279 #pragma push_macro("delete")
40280 #undef delete
40281 #pragma push_macro("min")
40282 #undef min
40283 #pragma push_macro("max")
40284 #undef max
40285 #pragma push_macro("abs")
40286 #undef abs
40287 #pragma push_macro("export")
40288 #undef export
40289 #pragma push_macro("rand")
40290 #undef rand
40291 #pragma push_macro("sqrt")
40292 #undef sqrt
40293 #pragma push_macro("type_info")
40294 #undef type_info
40295 #pragma push_macro("elc")
40296 #undef elc
40297#endif
40298//
40299#if defined(ELC_VOID_NAME)
40300 #undef void
40301#endif
40302//
40303#if defined(ELC_PUBLIC_ALL)
40304 #define protected public
40305 #define private public
40306#endif
40307//
40308#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
40309 #undef rand
40310#endif
40311
40312// #define often_noexcept
40313#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
40314#define noexcept_as_auto MAGIC//哦现在有了
40315#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
40316#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
40317
40318#define using_method_from_base_t(name,...) \
40319template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
40320auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
40321{\
40322 return base_t::name(forward<Args>(rest)...);\
40323}\
40324
40325#define using_method_from_value(name,value_name,...) \
40326template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
40327auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
40328{\
40329 return value_name.name(forward<Args>(rest)...);\
40330}\
40331
40332#define floop while(__builtin_is_my_dick_still_there())
40333#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
40334#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
40335#if defined(_MSC_VER) && _MSC_VER>=1935
40336 //@see https://developercommunity.visualstudio.com/t/10193638
40337 #define enable_adl(name) template<typename=void>void name()noexcept=delete
40338#else
40339 #define enable_adl(name) void name()noexcept=delete
40340#endif
40341
40342#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
40343#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
40344
40345#define declvalue(...) (::std::declval<__VA_ARGS__>())
40346
40348#define template_error(reason) static_assert(template_error_helper<T>,reason)
40350#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
40352#define template_warning(reason) template_warning_helper<T>(reason)
40353
40354//for type_info
40355#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
40356#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
40357
40358#define is_common_attribute(name) public attribute<T,name<T>>
40359#define is_special_attribute(name) public attribute<T,name>
40360
40361#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
40362#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
40363
40364//for float_size_t
40365#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
40366//bitnum_of
40367#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
40368
40369//for attribute
40370#define def_common_attribute_with_nothing(name) \
40371template<typename T>\
40372class name{}\
40373
40374#define def_special_attribute_with_nothing(name) \
40375class name{}\
40376
40377#define common_attribute_t template<class>class
40378#define special_attribute_t class
40379
40388#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
40390#define enabled_by_default class enable_state=void
40392#define disabled_by_default class enable_state= ::std::enable_if_t<false>
40394#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
40396#define enable_flag class enable_state
40397
40398#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
40399#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
40400#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
40401#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
40402#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
40403
40405#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
40407#define get_recursive_λ_caller(name,...) \
40408exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
40409 return name(name,Args...);\
40410}
40412#define λ []
40414#define exλ [&]
40416#define λ_with_catch(...) [__VA_ARGS__]
40418#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
40419//recursive_λ_self_referential_reserved_symbolname
40420#define λ_RLSRRS _my_jb_super_sb_name_
40421
40422#if defined(_MSC_VER) && !defined(__clang__)
40423 #define λ_inline [[msvc::forceinline]]
40424 #define λ_force_inline [[msvc::forceinline]]
40425#elif
40426 #define λ_inline [[gnu::always_inline]]
40427 #define λ_force_inline [[gnu::always_inline]]
40428#else
40429 #define λ_inline
40430 #define λ_force_inline
40431#endif
40432
40433#define MAGIC//ahh,ko no tenno da!
40434
40436#define nothing
40437
40439#define elseif else if
40441#define _big_than_ >
40443#define _small_than_ <
40444
40445#if defined(_MSC_VER)
40446 #define not !
40447 #define and &&
40448 #define or ||
40449#endif
40450
40452#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
40454#define BREAK_NAMESPACE }
40455
40457#define template_name template
40459#define type_name class
40460
40461#if defined(DEBUG) || defined(_DEBUG)
40462 #define not_in_debug 0
40463 #define in_debug 1
40464#else
40465 #define not_in_debug 1
40466 #define in_debug 0
40467#endif
40468
40469#define es U""
40470#define ec(ch) U ## ch
40471
40472#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
40473 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
40474#else
40475 #define ELC_TEST_EVENTNAME(name)
40476#endif
40477
40478#define override_instance_struct \
40479protected:\
40480 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
40481 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
40482 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
40483 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
40484 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
40485
40486#if defined(_MSC_VER) && !defined(__clang__)
40487 #define distinctive __declspec(dllexport)
40488#else
40489 #define distinctive
40490#endif
40491
40492#if defined(_MSC_VER) && !defined(__clang__)
40493 #define force_inline __forceinline
40494#elif defined(__GNUC__) || defined(__clang__)
40495 #define force_inline __attribute__((always_inline)) inline
40496#else
40497 #define force_inline inline
40498#endif
40499
40500#if defined(_MSC_VER) && !defined(__clang__)
40501 #define with_no_vtable __declspec(novtable)
40502#else
40503 #define with_no_vtable
40504#endif
40505
40506#define in_consteval (::std::is_constant_evaluated())
40507
40508#define no_vtable_struct struct with_no_vtable
40509#define no_vtable_class class with_no_vtable
40510
40511//#define get_elc_defs using namespace ::elc::defs
40512
40513//file_end
40514
40515 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
40516
40517 using namespace ::elc::defs;//get def
40518
40519 [[nodiscard]]inline string_t<char> to_char_str(string_view_t<char_t> a)noexcept{
40520 string_t<char>aret;
40521 ::std::mbstate_t stat{};
40522 push_and_disable_msvc_warning(26494)//未初始化警告diss
40523 char r[MB_LEN_MAX];
40524 ptrdiff_t s;
40526 for(auto c:a){
40527 s=::std::c32rtomb(r,c,&stat);
40528 if(s < 0)//-1
40529 die_with(locale::str::code_convert_error);
40530 aret+=string_view_t<char>{(char*)r,note::size((size_t)s)};
40531 }
40532 return aret;
40533 }
40535 string_t<char_t>aret;
40536 ::std::mbstate_t stat{};
40537 push_and_disable_msvc_warning(26494);//未初始化警告diss
40538 char_t c;
40539 ptrdiff_t s;
40541 auto i=a.cbegin(),e=a.cend();
40542 while(i!=e){
40543 s=::std::mbrtoc32(&c,i,MB_LEN_MAX,&stat);
40544 if(s < 0)//-3 或 -1
40545 die_with(locale::str::code_convert_error);
40546 i+=s;
40547 aret+=c;
40548 }
40549 return aret;
40550 }
40551
40552 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
40553//_undefs.hpp
40554/*
40555未完成的elc解释器_share文件
40556由steve02081504与Alex0125设计、编写
40557转载时请在不对此文件做任何修改的同时注明出处
40558项目地址:https://github.com/ELC-lang/ELC
40559*/
40560/*
40561 ,??????????????????????????
40562 ????????????????????????????
40563 ?????????????????????????????+
40564 ?????+++++++++++++++++++++++++
40565 ?????+++++++++++++++++++++++++
40566 ??????++++++++++++++++++++++++
40567 ?????++
40568 ?????+++
40569 ??????+++IIIIIIIIIIIIIIIIII
40570 ?????+++++IIIIIIIIIIIIIIIIII
40571 ?????++++++++++++++++++++++++
40572 ??????+++++++++++++++++++++++:
40573 ?????++
40574 ?????+++
40575 ??????++
40576 ??????????????????????????????II
40577 ??????????????????????????????IIII
40578 ,?????????????????????????????IIIII+
40579 =???++++++++++++++++++++++++++III?
40580 ?++++++++++++++++++++++++++++I+
40581*/
40582
40583//defs at "_defs.hpp"
40584
40585#if defined(_MSC_VER)
40586 #pragma warning(pop)
40587#endif
40588//#undef suppress_msvc_warning
40589#undef disable_msvc_warning
40590#undef push_msvc_warning
40591#undef pop_msvc_warning
40592#undef push_and_disable_msvc_warning
40593#if defined(_MSC_VER)
40594 #pragma pack(pop)
40595#endif
40596#if defined(__GNUC__)
40597 #pragma GCC diagnostic pop
40598#endif
40599#if defined(_MSC_VER)
40600 #pragma pop_macro("new")
40601 #pragma pop_macro("delete")
40602 #pragma pop_macro("min")
40603 #pragma pop_macro("max")
40604 #pragma pop_macro("abs")
40605 #pragma pop_macro("export")
40606 #pragma pop_macro("rand")
40607 #pragma pop_macro("sqrt")
40608 #pragma pop_macro("type_info")
40609 #pragma pop_macro("elc")
40610#endif
40611
40612//
40613#if defined(ELC_VOID_NAME)
40614 #define void the_void
40615#endif
40616//
40617#if defined(ELC_PUBLIC_ALL)
40618 #undef protected
40619 #undef private
40620#endif
40621//
40622#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
40623 #define rand the_rand
40624#endif
40625
40626// #undef often_noexcept
40627#undef noexcept_as
40628#undef noexcept_as_auto
40629#undef constexpr_as
40630#undef constexpr_as_auto
40631
40632#undef using_method_from_base_t
40633#undef using_method_from_value
40634
40635#undef floop
40636#undef times
40637#undef debug_times
40638#undef enable_adl
40639
40640#undef re_declvalue
40641#undef re_decltype
40642
40643#undef declvalue
40644
40645#undef template_error
40646#undef template_error_of_type
40647#undef template_warning
40648
40649#undef type_info_of
40650#undef type_name_of
40651
40652#undef is_common_attribute
40653#undef is_special_attribute
40654
40655#undef has_attribute
40656#undef not_has_attribute
40657
40658#undef float_size_of
40659#undef bitnum_of
40660
40661#undef def_common_attribute_with_nothing
40662#undef def_special_attribute_with_nothing
40663
40664#undef common_attribute_t
40665#undef special_attribute_t
40666
40667#undef enable_if
40668#undef enabled_by_default
40669#undef disabled_by_default
40670#undef enable_if_not_ill_form
40671#undef enable_flag
40672
40673#undef was_an_ill_form
40674#undef was_an_ill_form_with_parameter
40675#undef was_not_an_ill_form
40676#undef was_not_an_ill_form_and_noexcept
40677#undef was_not_an_ill_form_with_parameter
40678
40679#undef recursive_λ
40680#undef get_recursive_λ_caller
40681#undef λ
40682#undef exλ
40683#undef λ_with_catch
40684#undef self_recursion
40685#undef λ_RLSRRS
40686#undef λ_inline
40687#undef λ_force_inline
40688
40689#undef MAGIC
40690
40691#undef nothing
40692
40693#undef elseif
40694#undef _big_than_
40695#undef _small_than_
40696
40697#if defined(_MSC_VER)
40698 #undef not
40699 #undef and
40700 #undef or
40701#endif
40702
40703#undef INTER_NAMESPACE
40704#undef BREAK_NAMESPACE
40705
40706#undef szie
40707#undef form
40708
40709#undef template_name
40710#undef type_name
40711
40712#undef not_in_debug
40713
40714#undef es
40715#undef ec
40716
40717#undef ELC_TEST_EVENTNAME
40718
40719#undef override_instance_struct
40720
40721#undef distinctive
40722
40723#undef force_inline
40724
40725#undef with_no_vtable
40726
40727#undef in_consteval
40728
40729#undef no_vtable_struct
40730#undef no_vtable_class
40731
40732//#undef get_elc_defs
40733
40734//file_end
40735
40736 #line 79 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
40737 }
40738 namespace elc::defs{
40739 using namespace elc::APIs::str_code_convert;
40740 }
40741#endif
40742
40743//file_end
40744
40745#line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
40746namespace elc::defs{
40747 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
40748//_defs.hpp
40749/*
40750未完成的elc解释器basic文件
40751由steve02081504与Alex0125设计、编写
40752转载时请在不对此文件做任何修改的同时注明出处
40753项目地址:https://github.com/ELC-lang/ELC
40754*/
40755/*
40756 ,??????????????????????????
40757 ????????????????????????????
40758 ?????????????????????????????+
40759 ?????+++++++++++++++++++++++++
40760 ?????+++++++++++++++++++++++++
40761 ??????++++++++++++++++++++++++
40762 ?????++
40763 ?????+++
40764 ??????+++IIIIIIIIIIIIIIIIII
40765 ?????+++++IIIIIIIIIIIIIIIIII
40766 ?????++++++++++++++++++++++++
40767 ??????+++++++++++++++++++++++:
40768 ?????++
40769 ?????+++
40770 ??????++
40771 ??????????????????????????????II
40772 ??????????????????????????????IIII
40773 ,?????????????????????????????IIIII+
40774 =???++++++++++++++++++++++++++III?
40775 ?++++++++++++++++++++++++++++I+
40776*/
40777#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
40778//_defs.hpp
40779/*
40780未完成的elc解释器_share文件
40781由steve02081504与Alex0125设计、编写
40782转载时请在不对此文件做任何修改的同时注明出处
40783项目地址:https://github.com/ELC-lang/ELC
40784*/
40785/*
40786 ,??????????????????????????
40787 ????????????????????????????
40788 ?????????????????????????????+
40789 ?????+++++++++++++++++++++++++
40790 ?????+++++++++++++++++++++++++
40791 ??????++++++++++++++++++++++++
40792 ?????++
40793 ?????+++
40794 ??????+++IIIIIIIIIIIIIIIIII
40795 ?????+++++IIIIIIIIIIIIIIIIII
40796 ?????++++++++++++++++++++++++
40797 ??????+++++++++++++++++++++++:
40798 ?????++
40799 ?????+++
40800 ??????++
40801 ??????????????????????????????II
40802 ??????????????????????????????IIII
40803 ,?????????????????????????????IIIII+
40804 =???++++++++++++++++++++++++++III?
40805 ?++++++++++++++++++++++++++++I+
40806*/
40807
40808//undefs at "_undefs.hpp"
40809
40810#if defined(ELC_CODE_REALM)
40811 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
40812#endif
40813
40814//set ELC_WARNING_LEVEL default to 4(max)
40815#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
40816
40817#if defined(_MSC_VER)
40818 #pragma warning(push,ELC_WARNING_LEVEL)
40819 #pragma warning(disable:4099)//class与struct混用警告diss
40820 #pragma warning(disable:4584)//重复子类警告diss
40821 #pragma warning(disable:4250)//域控制继承警告diss
40822 #pragma warning(disable:26432)//不完全默认方法警告diss
40823 #pragma warning(disable:26435)//virtual override方法警告diss
40824 #pragma warning(disable:26481)//容器安利diss
40825 #pragma warning(disable:26446)//gsl::at安利diss
40826 #pragma warning(disable:26434)//方法覆盖警告diss
40827 #pragma warning(disable:26429)//gsl::not_null安利diss
40828 #pragma warning(disable:26471)//对void*进行static_cast安利diss
40829 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
40830 #pragma warning(disable:26473)//相同指针显式cast警告diss
40831 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
40832 #pragma warning(disable:26485)//数组作指针警告diss
40833 #pragma warning(disable:26490)//reinterpret_cast警告diss
40834 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
40835 #pragma warning(disable:26482)//非常数数组索引警告diss
40836 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
40837#endif
40838#if defined(__GNUC__)
40839 #pragma GCC diagnostic push
40840 #pragma GCC diagnostic warning "-Wall"//开启所有警告
40841 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
40842#endif
40843#if defined(_MSC_VER)
40844 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
40845 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
40846 #define push_msvc_warning() __pragma(warning(push))
40847 #define pop_msvc_warning() __pragma(warning(pop))
40848 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
40849#else
40850 //#define suppress_msvc_warning(...)
40851 #define disable_msvc_warning(...)
40852 #define push_msvc_warning()
40853 #define pop_msvc_warning()
40854 #define push_and_disable_msvc_warning(...)
40855#endif
40856#if defined(_MSC_VER)
40857 //push pack settings
40858 #pragma pack(push)
40859 #pragma pack()
40860#endif
40861#if defined(_MSC_VER)
40862 //push and undef common macros
40863 #pragma push_macro("new")
40864 #undef new
40865 #pragma push_macro("delete")
40866 #undef delete
40867 #pragma push_macro("min")
40868 #undef min
40869 #pragma push_macro("max")
40870 #undef max
40871 #pragma push_macro("abs")
40872 #undef abs
40873 #pragma push_macro("export")
40874 #undef export
40875 #pragma push_macro("rand")
40876 #undef rand
40877 #pragma push_macro("sqrt")
40878 #undef sqrt
40879 #pragma push_macro("type_info")
40880 #undef type_info
40881 #pragma push_macro("elc")
40882 #undef elc
40883#endif
40884//
40885#if defined(ELC_VOID_NAME)
40886 #undef void
40887#endif
40888//
40889#if defined(ELC_PUBLIC_ALL)
40890 #define protected public
40891 #define private public
40892#endif
40893//
40894#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
40895 #undef rand
40896#endif
40897
40898// #define often_noexcept
40899#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
40900#define noexcept_as_auto MAGIC//哦现在有了
40901#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
40902#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
40903
40904#define using_method_from_base_t(name,...) \
40905template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
40906auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
40907{\
40908 return base_t::name(forward<Args>(rest)...);\
40909}\
40910
40911#define using_method_from_value(name,value_name,...) \
40912template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
40913auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
40914{\
40915 return value_name.name(forward<Args>(rest)...);\
40916}\
40917
40918#define floop while(__builtin_is_my_dick_still_there())
40919#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
40920#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
40921#if defined(_MSC_VER) && _MSC_VER>=1935
40922 //@see https://developercommunity.visualstudio.com/t/10193638
40923 #define enable_adl(name) template<typename=void>void name()noexcept=delete
40924#else
40925 #define enable_adl(name) void name()noexcept=delete
40926#endif
40927
40928#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
40929#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
40930
40931#define declvalue(...) (::std::declval<__VA_ARGS__>())
40932
40934#define template_error(reason) static_assert(template_error_helper<T>,reason)
40936#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
40938#define template_warning(reason) template_warning_helper<T>(reason)
40939
40940//for type_info
40941#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
40942#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
40943
40944#define is_common_attribute(name) public attribute<T,name<T>>
40945#define is_special_attribute(name) public attribute<T,name>
40946
40947#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
40948#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
40949
40950//for float_size_t
40951#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
40952//bitnum_of
40953#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
40954
40955//for attribute
40956#define def_common_attribute_with_nothing(name) \
40957template<typename T>\
40958class name{}\
40959
40960#define def_special_attribute_with_nothing(name) \
40961class name{}\
40962
40963#define common_attribute_t template<class>class
40964#define special_attribute_t class
40965
40974#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
40976#define enabled_by_default class enable_state=void
40978#define disabled_by_default class enable_state= ::std::enable_if_t<false>
40980#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
40982#define enable_flag class enable_state
40983
40984#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
40985#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
40986#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
40987#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
40988#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
40989
40991#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
40993#define get_recursive_λ_caller(name,...) \
40994exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
40995 return name(name,Args...);\
40996}
40998#define λ []
41000#define exλ [&]
41002#define λ_with_catch(...) [__VA_ARGS__]
41004#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
41005//recursive_λ_self_referential_reserved_symbolname
41006#define λ_RLSRRS _my_jb_super_sb_name_
41007
41008#if defined(_MSC_VER) && !defined(__clang__)
41009 #define λ_inline [[msvc::forceinline]]
41010 #define λ_force_inline [[msvc::forceinline]]
41011#elif
41012 #define λ_inline [[gnu::always_inline]]
41013 #define λ_force_inline [[gnu::always_inline]]
41014#else
41015 #define λ_inline
41016 #define λ_force_inline
41017#endif
41018
41019#define MAGIC//ahh,ko no tenno da!
41020
41022#define nothing
41023
41025#define elseif else if
41027#define _big_than_ >
41029#define _small_than_ <
41030
41031#if defined(_MSC_VER)
41032 #define not !
41033 #define and &&
41034 #define or ||
41035#endif
41036
41038#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
41040#define BREAK_NAMESPACE }
41041
41043#define template_name template
41045#define type_name class
41046
41047#if defined(DEBUG) || defined(_DEBUG)
41048 #define not_in_debug 0
41049 #define in_debug 1
41050#else
41051 #define not_in_debug 1
41052 #define in_debug 0
41053#endif
41054
41055#define es U""
41056#define ec(ch) U ## ch
41057
41058#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
41059 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
41060#else
41061 #define ELC_TEST_EVENTNAME(name)
41062#endif
41063
41064#define override_instance_struct \
41065protected:\
41066 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
41067 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
41068 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
41069 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
41070 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
41071
41072#if defined(_MSC_VER) && !defined(__clang__)
41073 #define distinctive __declspec(dllexport)
41074#else
41075 #define distinctive
41076#endif
41077
41078#if defined(_MSC_VER) && !defined(__clang__)
41079 #define force_inline __forceinline
41080#elif defined(__GNUC__) || defined(__clang__)
41081 #define force_inline __attribute__((always_inline)) inline
41082#else
41083 #define force_inline inline
41084#endif
41085
41086#if defined(_MSC_VER) && !defined(__clang__)
41087 #define with_no_vtable __declspec(novtable)
41088#else
41089 #define with_no_vtable
41090#endif
41091
41092#define in_consteval (::std::is_constant_evaluated())
41093
41094#define no_vtable_struct struct with_no_vtable
41095#define no_vtable_class class with_no_vtable
41096
41097//#define get_elc_defs using namespace ::elc::defs
41098
41099//file_end
41100
41101#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
41102
41103//file_end
41104
41105 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
41106
41107 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/literal.hpp"
41108//literal.hpp
41109//at namespace elc::defs
41110/*
41111未完成的elc解释器string文件
41112由steve02081504与Alex0125设计、编写
41113转载时请在不对此文件做任何修改的同时注明出处
41114项目地址:https://github.com/ELC-lang/ELC
41115*/
41116/*
41117 ,??????????????????????????
41118 ????????????????????????????
41119 ?????????????????????????????+
41120 ?????+++++++++++++++++++++++++
41121 ?????+++++++++++++++++++++++++
41122 ??????++++++++++++++++++++++++
41123 ?????++
41124 ?????+++
41125 ??????+++IIIIIIIIIIIIIIIIII
41126 ?????+++++IIIIIIIIIIIIIIIIII
41127 ?????++++++++++++++++++++++++
41128 ??????+++++++++++++++++++++++:
41129 ?????++
41130 ?????+++
41131 ??????++
41132 ??????????????????????????????II
41133 ??????????????????????????????IIII
41134 ,?????????????????????????????IIIII+
41135 =???++++++++++++++++++++++++++III?
41136 ?++++++++++++++++++++++++++++I+
41137*/
41138namespace string_n{
41139 template<constexpr_str_n::constexpr_str_t_literal_helper str_helper>
41140 inline constexpr string operator""_string()noexcept{
41141 return string(constexpr_str_n::operator""_constexpr_str<str_helper>());
41142 }
41143 template<constexpr_str_n::constexpr_str_t_literal_helper str_helper>
41144 inline constexpr string operator""_elc_string()noexcept{
41145 return operator""_string<str_helper>();
41146 }
41147}
41148using string_n::operator""_string;
41149using string_n::operator""_elc_string;
41150
41151//file_end
41152
41153 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
41154
41155 #if defined(ELC_TEST_ON)
41156 namespace string_part_test{
41157 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_test.hpp"
41158//_test.hpp
41159/*
41160未完成的elc解释器string文件
41161由steve02081504与Alex0125设计、编写
41162转载时请在不对此文件做任何修改的同时注明出处
41163项目地址:https://github.com/ELC-lang/ELC
41164*/
41165/*
41166 ,??????????????????????????
41167 ????????????????????????????
41168 ?????????????????????????????+
41169 ?????+++++++++++++++++++++++++
41170 ?????+++++++++++++++++++++++++
41171 ??????++++++++++++++++++++++++
41172 ?????++
41173 ?????+++
41174 ??????+++IIIIIIIIIIIIIIIIII
41175 ?????+++++IIIIIIIIIIIIIIIIII
41176 ?????++++++++++++++++++++++++
41177 ??????+++++++++++++++++++++++:
41178 ?????++
41179 ?????+++
41180 ??????++
41181 ??????????????????????????????II
41182 ??????????????????????????????IIII
41183 ,?????????????????????????????IIIII+
41184 =???++++++++++++++++++++++++++III?
41185 ?++++++++++++++++++++++++++++I+
41186*/
41187inline void test(){
41188 ELC_TEST_EVENTNAME("string部分测试");
41189 {
41190 {
41191 string_t a=es"";
41192 stest_accert(a.size()==0);
41193 a=es"asd";
41194 stest_accert(a.size()==3);
41195 a=es"asd"+a;
41196 stest_accert(a.size()==6);
41197 a+=es"asd";
41198 stest_accert(es"asd"+a==es"asdasdasdasd");
41199 a[1]=ec('e');
41200 stest_accert(a.substr(0,3)==es"aed");
41201 stest_accert(a.substr(3).size()==6);
41202 stest_accert(a[2]==ec('d'));
41203 a.clear();
41204 stest_accert(a.size()==0);
41205 a.resize(3,ec('d'));
41206 stest_accert(a==es"ddd");
41207 for(const char_t&c:a)
41208 stest_accert(c==ec('d'));
41209 a=es"abc";
41210 stest_accert(a.begin()==a.cbegin());
41211 stest_accert(*a.begin()==ec('a'));
41212 stest_accert(a.begin()<=a.cend());
41213 stest_accert(*a.rbegin()==ec('c'));
41214 stest_accert(a.rbegin()<=a.rend());
41215 stest_accert(a.rbegin()==a.end()-1);
41216 a.push_back(es"as");
41217 a.push_front(ec('p'));
41218 stest_accert(a == es"pabcas");
41219 a.erase(1,3);
41220 a.erase(1);
41221 stest_accert(a == es"ps");
41222 stest_accert(a.pop_front() == ec('p'));
41223 stest_accert(a.pop_back() == ec('s'));
41224 stest_accert(a.size() == 0);
41225 a=es"abc";
41226 stest_accert(a.pop_back(2) == es"bc");
41227 stest_accert(a.size() == 1);
41228 a.push_front(es"wqer");
41229 stest_accert(a==es"wqera");
41230 a.insert(2,es"123");
41231 a.insert(0,es"123");
41232 a.insert(a.size(),es"123");
41233 stest_accert(a[2] == ec('3'));
41234 a[5]=ec('6');
41235 a[6]=ec('6');
41236 a[7]=ec('6');
41237 a[8]=ec('6');
41238 stest_accert(a == es"123wq6666ra123");
41239 for(char_t& c: a.view())
41240 c ='7';
41241 stest_accert(a == es"77777777777777");
41242 }
41243 {
41244 using namespace elc;
41245 using elc::defs::hash;
41246 auto a = es"ab"_elc_string;//constexpr_string_data_t
41247 stest_accert(hash(a) == hash(string_view(es"ab")));
41248 string b = es"ab";//comn_string_data_t
41249 stest_accert(hash(b) == hash(string_view(es"ab")));
41250 stest_accert(b.memory_cost() > a.memory_cost());
41251 a += b;//sum_string_data_t -> constexpr_string_data_t
41252 // -> comn_string_data_t
41253 stest_accert(hash(a) == hash(string_view(es"abab")));
41254 a.insert(1, 'c');//inserted_string_data_t -> sum_string_data_t
41255 stest_accert(hash(a) == hash(string_view(es"acbab")));
41256 a.erase(2, 3);//erased_string_data_t -> inserted_string_data_t
41257 stest_accert(hash(a) == hash(string_view(es"ac")));
41258 a.push_back(es"123");//end_apply_string_data_t -> erased_string_data_t
41259 stest_accert(hash(a) == hash(string_view(es"ac123")));
41260 a.push_front(es"123");//head_apply_string_data_t -> end_apply_string_data_t
41261 stest_accert(hash(a) == hash(string_view(es"123ac123")));
41262 }
41263 }
41264 check_memory_lack();
41265}
41266inline void test_log_out(){
41267}
41268inline void test_end(){
41269}
41270
41271//file_end
41272
41273 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
41274 }
41275 #endif
41276
41277 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
41278//_undefs.hpp
41279/*
41280未完成的elc解释器basic文件
41281由steve02081504与Alex0125设计、编写
41282转载时请在不对此文件做任何修改的同时注明出处
41283项目地址:https://github.com/ELC-lang/ELC
41284*/
41285/*
41286 ,??????????????????????????
41287 ????????????????????????????
41288 ?????????????????????????????+
41289 ?????+++++++++++++++++++++++++
41290 ?????+++++++++++++++++++++++++
41291 ??????++++++++++++++++++++++++
41292 ?????++
41293 ?????+++
41294 ??????+++IIIIIIIIIIIIIIIIII
41295 ?????+++++IIIIIIIIIIIIIIIIII
41296 ?????++++++++++++++++++++++++
41297 ??????+++++++++++++++++++++++:
41298 ?????++
41299 ?????+++
41300 ??????++
41301 ??????????????????????????????II
41302 ??????????????????????????????IIII
41303 ,?????????????????????????????IIIII+
41304 =???++++++++++++++++++++++++++III?
41305 ?++++++++++++++++++++++++++++I+
41306*/
41307#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
41308//_undefs.hpp
41309/*
41310未完成的elc解释器_share文件
41311由steve02081504与Alex0125设计、编写
41312转载时请在不对此文件做任何修改的同时注明出处
41313项目地址:https://github.com/ELC-lang/ELC
41314*/
41315/*
41316 ,??????????????????????????
41317 ????????????????????????????
41318 ?????????????????????????????+
41319 ?????+++++++++++++++++++++++++
41320 ?????+++++++++++++++++++++++++
41321 ??????++++++++++++++++++++++++
41322 ?????++
41323 ?????+++
41324 ??????+++IIIIIIIIIIIIIIIIII
41325 ?????+++++IIIIIIIIIIIIIIIIII
41326 ?????++++++++++++++++++++++++
41327 ??????+++++++++++++++++++++++:
41328 ?????++
41329 ?????+++
41330 ??????++
41331 ??????????????????????????????II
41332 ??????????????????????????????IIII
41333 ,?????????????????????????????IIIII+
41334 =???++++++++++++++++++++++++++III?
41335 ?++++++++++++++++++++++++++++I+
41336*/
41337
41338//defs at "_defs.hpp"
41339
41340#if defined(_MSC_VER)
41341 #pragma warning(pop)
41342#endif
41343//#undef suppress_msvc_warning
41344#undef disable_msvc_warning
41345#undef push_msvc_warning
41346#undef pop_msvc_warning
41347#undef push_and_disable_msvc_warning
41348#if defined(_MSC_VER)
41349 #pragma pack(pop)
41350#endif
41351#if defined(__GNUC__)
41352 #pragma GCC diagnostic pop
41353#endif
41354#if defined(_MSC_VER)
41355 #pragma pop_macro("new")
41356 #pragma pop_macro("delete")
41357 #pragma pop_macro("min")
41358 #pragma pop_macro("max")
41359 #pragma pop_macro("abs")
41360 #pragma pop_macro("export")
41361 #pragma pop_macro("rand")
41362 #pragma pop_macro("sqrt")
41363 #pragma pop_macro("type_info")
41364 #pragma pop_macro("elc")
41365#endif
41366
41367//
41368#if defined(ELC_VOID_NAME)
41369 #define void the_void
41370#endif
41371//
41372#if defined(ELC_PUBLIC_ALL)
41373 #undef protected
41374 #undef private
41375#endif
41376//
41377#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
41378 #define rand the_rand
41379#endif
41380
41381// #undef often_noexcept
41382#undef noexcept_as
41383#undef noexcept_as_auto
41384#undef constexpr_as
41385#undef constexpr_as_auto
41386
41387#undef using_method_from_base_t
41388#undef using_method_from_value
41389
41390#undef floop
41391#undef times
41392#undef debug_times
41393#undef enable_adl
41394
41395#undef re_declvalue
41396#undef re_decltype
41397
41398#undef declvalue
41399
41400#undef template_error
41401#undef template_error_of_type
41402#undef template_warning
41403
41404#undef type_info_of
41405#undef type_name_of
41406
41407#undef is_common_attribute
41408#undef is_special_attribute
41409
41410#undef has_attribute
41411#undef not_has_attribute
41412
41413#undef float_size_of
41414#undef bitnum_of
41415
41416#undef def_common_attribute_with_nothing
41417#undef def_special_attribute_with_nothing
41418
41419#undef common_attribute_t
41420#undef special_attribute_t
41421
41422#undef enable_if
41423#undef enabled_by_default
41424#undef disabled_by_default
41425#undef enable_if_not_ill_form
41426#undef enable_flag
41427
41428#undef was_an_ill_form
41429#undef was_an_ill_form_with_parameter
41430#undef was_not_an_ill_form
41431#undef was_not_an_ill_form_and_noexcept
41432#undef was_not_an_ill_form_with_parameter
41433
41434#undef recursive_λ
41435#undef get_recursive_λ_caller
41436#undef λ
41437#undef exλ
41438#undef λ_with_catch
41439#undef self_recursion
41440#undef λ_RLSRRS
41441#undef λ_inline
41442#undef λ_force_inline
41443
41444#undef MAGIC
41445
41446#undef nothing
41447
41448#undef elseif
41449#undef _big_than_
41450#undef _small_than_
41451
41452#if defined(_MSC_VER)
41453 #undef not
41454 #undef and
41455 #undef or
41456#endif
41457
41458#undef INTER_NAMESPACE
41459#undef BREAK_NAMESPACE
41460
41461#undef szie
41462#undef form
41463
41464#undef template_name
41465#undef type_name
41466
41467#undef not_in_debug
41468
41469#undef es
41470#undef ec
41471
41472#undef ELC_TEST_EVENTNAME
41473
41474#undef override_instance_struct
41475
41476#undef distinctive
41477
41478#undef force_inline
41479
41480#undef with_no_vtable
41481
41482#undef in_consteval
41483
41484#undef no_vtable_struct
41485#undef no_vtable_class
41486
41487//#undef get_elc_defs
41488
41489//file_end
41490
41491#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
41492
41493//file_end
41494
41495 #line 53 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
41496}
41497namespace elc{
41498 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_export.hpp"
41499//_export.hpp
41500//at namespace elc
41501/*
41502未完成的elc解释器string文件
41503由steve02081504与Alex0125设计、编写
41504转载时请在不对此文件做任何修改的同时注明出处
41505项目地址:https://github.com/ELC-lang/ELC
41506*/
41507/*
41508 ,??????????????????????????
41509 ????????????????????????????
41510 ?????????????????????????????+
41511 ?????+++++++++++++++++++++++++
41512 ?????+++++++++++++++++++++++++
41513 ??????++++++++++++++++++++++++
41514 ?????++
41515 ?????+++
41516 ??????+++IIIIIIIIIIIIIIIIII
41517 ?????+++++IIIIIIIIIIIIIIIIII
41518 ?????++++++++++++++++++++++++
41519 ??????+++++++++++++++++++++++:
41520 ?????++
41521 ?????+++
41522 ??????++
41523 ??????????????????????????????II
41524 ??????????????????????????????IIII
41525 ,?????????????????????????????IIIII+
41526 =???++++++++++++++++++++++++++III?
41527 ?++++++++++++++++++++++++++++I+
41528*/
41529#define export using defs::
41530export string_t;
41531export string;
41532export string_view_t;
41533export string_view;
41534export operator""_string;
41535export operator""_elc_string;
41536export operator""_constexpr_str;
41537#undef export
41538
41539//file_end
41540
41541 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
41542}
41543#if defined(ELC_BASE_STREAM)
41544 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/type_or_function_name_test_output.hpp"
41545//type_or_function_name_test_output.hpp
41546//at namespace ::
41547//multi when ELC_STRING & ELC_BASE_STREAM
41548/*
41549未完成的elc解释器base_stream文件
41550由steve02081504与Alex0125设计、编写
41551转载时请在不对此文件做任何修改的同时注明出处
41552项目地址:https://github.com/ELC-lang/ELC
41553*/
41554/*
41555 ,??????????????????????????
41556 ????????????????????????????
41557 ?????????????????????????????+
41558 ?????+++++++++++++++++++++++++
41559 ?????+++++++++++++++++++++++++
41560 ??????++++++++++++++++++++++++
41561 ?????++
41562 ?????+++
41563 ??????+++IIIIIIIIIIIIIIIIII
41564 ?????+++++IIIIIIIIIIIIIIIIII
41565 ?????++++++++++++++++++++++++
41566 ??????+++++++++++++++++++++++:
41567 ?????++
41568 ?????+++
41569 ??????++
41570 ??????????????????????????????II
41571 ??????????????????????????????IIII
41572 ,?????????????????????????????IIIII+
41573 =???++++++++++++++++++++++++++III?
41574 ?++++++++++++++++++++++++++++I+
41575*/
41576#if !defined(ELC_multi_type_or_function_name_test_output)//pls skip define check as this part is muti
41577#define ELC_multi_type_or_function_name_test_output
41578namespace elc::defs{
41579 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
41580//_defs.hpp
41581/*
41582未完成的elc解释器basic文件
41583由steve02081504与Alex0125设计、编写
41584转载时请在不对此文件做任何修改的同时注明出处
41585项目地址:https://github.com/ELC-lang/ELC
41586*/
41587/*
41588 ,??????????????????????????
41589 ????????????????????????????
41590 ?????????????????????????????+
41591 ?????+++++++++++++++++++++++++
41592 ?????+++++++++++++++++++++++++
41593 ??????++++++++++++++++++++++++
41594 ?????++
41595 ?????+++
41596 ??????+++IIIIIIIIIIIIIIIIII
41597 ?????+++++IIIIIIIIIIIIIIIIII
41598 ?????++++++++++++++++++++++++
41599 ??????+++++++++++++++++++++++:
41600 ?????++
41601 ?????+++
41602 ??????++
41603 ??????????????????????????????II
41604 ??????????????????????????????IIII
41605 ,?????????????????????????????IIIII+
41606 =???++++++++++++++++++++++++++III?
41607 ?++++++++++++++++++++++++++++I+
41608*/
41609#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
41610//_defs.hpp
41611/*
41612未完成的elc解释器_share文件
41613由steve02081504与Alex0125设计、编写
41614转载时请在不对此文件做任何修改的同时注明出处
41615项目地址:https://github.com/ELC-lang/ELC
41616*/
41617/*
41618 ,??????????????????????????
41619 ????????????????????????????
41620 ?????????????????????????????+
41621 ?????+++++++++++++++++++++++++
41622 ?????+++++++++++++++++++++++++
41623 ??????++++++++++++++++++++++++
41624 ?????++
41625 ?????+++
41626 ??????+++IIIIIIIIIIIIIIIIII
41627 ?????+++++IIIIIIIIIIIIIIIIII
41628 ?????++++++++++++++++++++++++
41629 ??????+++++++++++++++++++++++:
41630 ?????++
41631 ?????+++
41632 ??????++
41633 ??????????????????????????????II
41634 ??????????????????????????????IIII
41635 ,?????????????????????????????IIIII+
41636 =???++++++++++++++++++++++++++III?
41637 ?++++++++++++++++++++++++++++I+
41638*/
41639
41640//undefs at "_undefs.hpp"
41641
41642#if defined(ELC_CODE_REALM)
41643 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
41644#endif
41645
41646//set ELC_WARNING_LEVEL default to 4(max)
41647#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
41648
41649#if defined(_MSC_VER)
41650 #pragma warning(push,ELC_WARNING_LEVEL)
41651 #pragma warning(disable:4099)//class与struct混用警告diss
41652 #pragma warning(disable:4584)//重复子类警告diss
41653 #pragma warning(disable:4250)//域控制继承警告diss
41654 #pragma warning(disable:26432)//不完全默认方法警告diss
41655 #pragma warning(disable:26435)//virtual override方法警告diss
41656 #pragma warning(disable:26481)//容器安利diss
41657 #pragma warning(disable:26446)//gsl::at安利diss
41658 #pragma warning(disable:26434)//方法覆盖警告diss
41659 #pragma warning(disable:26429)//gsl::not_null安利diss
41660 #pragma warning(disable:26471)//对void*进行static_cast安利diss
41661 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
41662 #pragma warning(disable:26473)//相同指针显式cast警告diss
41663 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
41664 #pragma warning(disable:26485)//数组作指针警告diss
41665 #pragma warning(disable:26490)//reinterpret_cast警告diss
41666 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
41667 #pragma warning(disable:26482)//非常数数组索引警告diss
41668 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
41669#endif
41670#if defined(__GNUC__)
41671 #pragma GCC diagnostic push
41672 #pragma GCC diagnostic warning "-Wall"//开启所有警告
41673 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
41674#endif
41675#if defined(_MSC_VER)
41676 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
41677 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
41678 #define push_msvc_warning() __pragma(warning(push))
41679 #define pop_msvc_warning() __pragma(warning(pop))
41680 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
41681#else
41682 //#define suppress_msvc_warning(...)
41683 #define disable_msvc_warning(...)
41684 #define push_msvc_warning()
41685 #define pop_msvc_warning()
41686 #define push_and_disable_msvc_warning(...)
41687#endif
41688#if defined(_MSC_VER)
41689 //push pack settings
41690 #pragma pack(push)
41691 #pragma pack()
41692#endif
41693#if defined(_MSC_VER)
41694 //push and undef common macros
41695 #pragma push_macro("new")
41696 #undef new
41697 #pragma push_macro("delete")
41698 #undef delete
41699 #pragma push_macro("min")
41700 #undef min
41701 #pragma push_macro("max")
41702 #undef max
41703 #pragma push_macro("abs")
41704 #undef abs
41705 #pragma push_macro("export")
41706 #undef export
41707 #pragma push_macro("rand")
41708 #undef rand
41709 #pragma push_macro("sqrt")
41710 #undef sqrt
41711 #pragma push_macro("type_info")
41712 #undef type_info
41713 #pragma push_macro("elc")
41714 #undef elc
41715#endif
41716//
41717#if defined(ELC_VOID_NAME)
41718 #undef void
41719#endif
41720//
41721#if defined(ELC_PUBLIC_ALL)
41722 #define protected public
41723 #define private public
41724#endif
41725//
41726#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
41727 #undef rand
41728#endif
41729
41730// #define often_noexcept
41731#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
41732#define noexcept_as_auto MAGIC//哦现在有了
41733#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
41734#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
41735
41736#define using_method_from_base_t(name,...) \
41737template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
41738auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
41739{\
41740 return base_t::name(forward<Args>(rest)...);\
41741}\
41742
41743#define using_method_from_value(name,value_name,...) \
41744template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
41745auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
41746{\
41747 return value_name.name(forward<Args>(rest)...);\
41748}\
41749
41750#define floop while(__builtin_is_my_dick_still_there())
41751#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
41752#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
41753#if defined(_MSC_VER) && _MSC_VER>=1935
41754 //@see https://developercommunity.visualstudio.com/t/10193638
41755 #define enable_adl(name) template<typename=void>void name()noexcept=delete
41756#else
41757 #define enable_adl(name) void name()noexcept=delete
41758#endif
41759
41760#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
41761#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
41762
41763#define declvalue(...) (::std::declval<__VA_ARGS__>())
41764
41766#define template_error(reason) static_assert(template_error_helper<T>,reason)
41768#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
41770#define template_warning(reason) template_warning_helper<T>(reason)
41771
41772//for type_info
41773#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
41774#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
41775
41776#define is_common_attribute(name) public attribute<T,name<T>>
41777#define is_special_attribute(name) public attribute<T,name>
41778
41779#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
41780#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
41781
41782//for float_size_t
41783#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
41784//bitnum_of
41785#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
41786
41787//for attribute
41788#define def_common_attribute_with_nothing(name) \
41789template<typename T>\
41790class name{}\
41791
41792#define def_special_attribute_with_nothing(name) \
41793class name{}\
41794
41795#define common_attribute_t template<class>class
41796#define special_attribute_t class
41797
41806#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
41808#define enabled_by_default class enable_state=void
41810#define disabled_by_default class enable_state= ::std::enable_if_t<false>
41812#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
41814#define enable_flag class enable_state
41815
41816#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
41817#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
41818#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
41819#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
41820#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
41821
41823#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
41825#define get_recursive_λ_caller(name,...) \
41826exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
41827 return name(name,Args...);\
41828}
41830#define λ []
41832#define exλ [&]
41834#define λ_with_catch(...) [__VA_ARGS__]
41836#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
41837//recursive_λ_self_referential_reserved_symbolname
41838#define λ_RLSRRS _my_jb_super_sb_name_
41839
41840#if defined(_MSC_VER) && !defined(__clang__)
41841 #define λ_inline [[msvc::forceinline]]
41842 #define λ_force_inline [[msvc::forceinline]]
41843#elif
41844 #define λ_inline [[gnu::always_inline]]
41845 #define λ_force_inline [[gnu::always_inline]]
41846#else
41847 #define λ_inline
41848 #define λ_force_inline
41849#endif
41850
41851#define MAGIC//ahh,ko no tenno da!
41852
41854#define nothing
41855
41857#define elseif else if
41859#define _big_than_ >
41861#define _small_than_ <
41862
41863#if defined(_MSC_VER)
41864 #define not !
41865 #define and &&
41866 #define or ||
41867#endif
41868
41870#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
41872#define BREAK_NAMESPACE }
41873
41875#define template_name template
41877#define type_name class
41878
41879#if defined(DEBUG) || defined(_DEBUG)
41880 #define not_in_debug 0
41881 #define in_debug 1
41882#else
41883 #define not_in_debug 1
41884 #define in_debug 0
41885#endif
41886
41887#define es U""
41888#define ec(ch) U ## ch
41889
41890#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
41891 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
41892#else
41893 #define ELC_TEST_EVENTNAME(name)
41894#endif
41895
41896#define override_instance_struct \
41897protected:\
41898 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
41899 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
41900 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
41901 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
41902 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
41903
41904#if defined(_MSC_VER) && !defined(__clang__)
41905 #define distinctive __declspec(dllexport)
41906#else
41907 #define distinctive
41908#endif
41909
41910#if defined(_MSC_VER) && !defined(__clang__)
41911 #define force_inline __forceinline
41912#elif defined(__GNUC__) || defined(__clang__)
41913 #define force_inline __attribute__((always_inline)) inline
41914#else
41915 #define force_inline inline
41916#endif
41917
41918#if defined(_MSC_VER) && !defined(__clang__)
41919 #define with_no_vtable __declspec(novtable)
41920#else
41921 #define with_no_vtable
41922#endif
41923
41924#define in_consteval (::std::is_constant_evaluated())
41925
41926#define no_vtable_struct struct with_no_vtable
41927#define no_vtable_class class with_no_vtable
41928
41929//#define get_elc_defs using namespace ::elc::defs
41930
41931//file_end
41932
41933#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
41934
41935//file_end
41936
41937 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/type_or_function_name_test_output.hpp"
41938
41939 namespace stream_n{
41940 //typename output only for text_ostream_t<char_t>
41941 template<text_ostream stream_T>
41942 decltype(auto)operator<<(stream_T&&stream,const type_name_t&name)noexcept(noexcept_text_ostream<stream_T>){
41943 return stream << to_char_t_str(name);
41944 }
41945 //output type_info
41946 template<text_ostream stream_T>
41947 decltype(auto)operator<<(stream_T&&stream,const base_type_info_t&info)noexcept(noexcept_text_ostream<stream_T>){
41948 return stream << info.get_name();
41949 }
41950 //output ::std::type_info
41951 template<text_ostream stream_T>
41952 decltype(auto)operator<<(stream_T&&stream,const ::std::type_info&info)noexcept(noexcept_text_ostream<stream_T>){
41953 return stream << type_name_t{info.name()};
41954 }
41955
41956 //function name output only for text_ostream_t<char_t>
41957 template<text_ostream stream_T>
41958 decltype(auto)operator<<(stream_T&&stream,const function_name_t&name)noexcept(noexcept_text_ostream<stream_T>){
41959 return stream << to_char_t_str(name);
41960 }
41961 }
41962
41963 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
41964//_undefs.hpp
41965/*
41966未完成的elc解释器basic文件
41967由steve02081504与Alex0125设计、编写
41968转载时请在不对此文件做任何修改的同时注明出处
41969项目地址:https://github.com/ELC-lang/ELC
41970*/
41971/*
41972 ,??????????????????????????
41973 ????????????????????????????
41974 ?????????????????????????????+
41975 ?????+++++++++++++++++++++++++
41976 ?????+++++++++++++++++++++++++
41977 ??????++++++++++++++++++++++++
41978 ?????++
41979 ?????+++
41980 ??????+++IIIIIIIIIIIIIIIIII
41981 ?????+++++IIIIIIIIIIIIIIIIII
41982 ?????++++++++++++++++++++++++
41983 ??????+++++++++++++++++++++++:
41984 ?????++
41985 ?????+++
41986 ??????++
41987 ??????????????????????????????II
41988 ??????????????????????????????IIII
41989 ,?????????????????????????????IIIII+
41990 =???++++++++++++++++++++++++++III?
41991 ?++++++++++++++++++++++++++++I+
41992*/
41993#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
41994//_undefs.hpp
41995/*
41996未完成的elc解释器_share文件
41997由steve02081504与Alex0125设计、编写
41998转载时请在不对此文件做任何修改的同时注明出处
41999项目地址:https://github.com/ELC-lang/ELC
42000*/
42001/*
42002 ,??????????????????????????
42003 ????????????????????????????
42004 ?????????????????????????????+
42005 ?????+++++++++++++++++++++++++
42006 ?????+++++++++++++++++++++++++
42007 ??????++++++++++++++++++++++++
42008 ?????++
42009 ?????+++
42010 ??????+++IIIIIIIIIIIIIIIIII
42011 ?????+++++IIIIIIIIIIIIIIIIII
42012 ?????++++++++++++++++++++++++
42013 ??????+++++++++++++++++++++++:
42014 ?????++
42015 ?????+++
42016 ??????++
42017 ??????????????????????????????II
42018 ??????????????????????????????IIII
42019 ,?????????????????????????????IIIII+
42020 =???++++++++++++++++++++++++++III?
42021 ?++++++++++++++++++++++++++++I+
42022*/
42023
42024//defs at "_defs.hpp"
42025
42026#if defined(_MSC_VER)
42027 #pragma warning(pop)
42028#endif
42029//#undef suppress_msvc_warning
42030#undef disable_msvc_warning
42031#undef push_msvc_warning
42032#undef pop_msvc_warning
42033#undef push_and_disable_msvc_warning
42034#if defined(_MSC_VER)
42035 #pragma pack(pop)
42036#endif
42037#if defined(__GNUC__)
42038 #pragma GCC diagnostic pop
42039#endif
42040#if defined(_MSC_VER)
42041 #pragma pop_macro("new")
42042 #pragma pop_macro("delete")
42043 #pragma pop_macro("min")
42044 #pragma pop_macro("max")
42045 #pragma pop_macro("abs")
42046 #pragma pop_macro("export")
42047 #pragma pop_macro("rand")
42048 #pragma pop_macro("sqrt")
42049 #pragma pop_macro("type_info")
42050 #pragma pop_macro("elc")
42051#endif
42052
42053//
42054#if defined(ELC_VOID_NAME)
42055 #define void the_void
42056#endif
42057//
42058#if defined(ELC_PUBLIC_ALL)
42059 #undef protected
42060 #undef private
42061#endif
42062//
42063#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
42064 #define rand the_rand
42065#endif
42066
42067// #undef often_noexcept
42068#undef noexcept_as
42069#undef noexcept_as_auto
42070#undef constexpr_as
42071#undef constexpr_as_auto
42072
42073#undef using_method_from_base_t
42074#undef using_method_from_value
42075
42076#undef floop
42077#undef times
42078#undef debug_times
42079#undef enable_adl
42080
42081#undef re_declvalue
42082#undef re_decltype
42083
42084#undef declvalue
42085
42086#undef template_error
42087#undef template_error_of_type
42088#undef template_warning
42089
42090#undef type_info_of
42091#undef type_name_of
42092
42093#undef is_common_attribute
42094#undef is_special_attribute
42095
42096#undef has_attribute
42097#undef not_has_attribute
42098
42099#undef float_size_of
42100#undef bitnum_of
42101
42102#undef def_common_attribute_with_nothing
42103#undef def_special_attribute_with_nothing
42104
42105#undef common_attribute_t
42106#undef special_attribute_t
42107
42108#undef enable_if
42109#undef enabled_by_default
42110#undef disabled_by_default
42111#undef enable_if_not_ill_form
42112#undef enable_flag
42113
42114#undef was_an_ill_form
42115#undef was_an_ill_form_with_parameter
42116#undef was_not_an_ill_form
42117#undef was_not_an_ill_form_and_noexcept
42118#undef was_not_an_ill_form_with_parameter
42119
42120#undef recursive_λ
42121#undef get_recursive_λ_caller
42122#undef λ
42123#undef exλ
42124#undef λ_with_catch
42125#undef self_recursion
42126#undef λ_RLSRRS
42127#undef λ_inline
42128#undef λ_force_inline
42129
42130#undef MAGIC
42131
42132#undef nothing
42133
42134#undef elseif
42135#undef _big_than_
42136#undef _small_than_
42137
42138#if defined(_MSC_VER)
42139 #undef not
42140 #undef and
42141 #undef or
42142#endif
42143
42144#undef INTER_NAMESPACE
42145#undef BREAK_NAMESPACE
42146
42147#undef szie
42148#undef form
42149
42150#undef template_name
42151#undef type_name
42152
42153#undef not_in_debug
42154
42155#undef es
42156#undef ec
42157
42158#undef ELC_TEST_EVENTNAME
42159
42160#undef override_instance_struct
42161
42162#undef distinctive
42163
42164#undef force_inline
42165
42166#undef with_no_vtable
42167
42168#undef in_consteval
42169
42170#undef no_vtable_struct
42171#undef no_vtable_class
42172
42173//#undef get_elc_defs
42174
42175//file_end
42176
42177#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
42178
42179//file_end
42180
42181 #line 61 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/type_or_function_name_test_output.hpp"
42182}
42183#endif
42184
42185//file_end
42186
42187 #line 59 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
42188#endif
42189#if defined(ELC_CORE)
42190 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/string_arec_as_value.hpp"
42191//string_arec_as_value.hpp
42192//at namespace ::
42193//multi when ELC_STRING & ELC_CORE
42194/*
42195未完成的elc解释器string文件
42196由steve02081504与Alex0125设计、编写
42197转载时请在不对此文件做任何修改的同时注明出处
42198项目地址:https://github.com/ELC-lang/ELC
42199*/
42200/*
42201 ,??????????????????????????
42202 ????????????????????????????
42203 ?????????????????????????????+
42204 ?????+++++++++++++++++++++++++
42205 ?????+++++++++++++++++++++++++
42206 ??????++++++++++++++++++++++++
42207 ?????++
42208 ?????+++
42209 ??????+++IIIIIIIIIIIIIIIIII
42210 ?????+++++IIIIIIIIIIIIIIIIII
42211 ?????++++++++++++++++++++++++
42212 ??????+++++++++++++++++++++++:
42213 ?????++
42214 ?????+++
42215 ??????++
42216 ??????????????????????????????II
42217 ??????????????????????????????IIII
42218 ,?????????????????????????????IIIII+
42219 =???++++++++++++++++++++++++++III?
42220 ?++++++++++++++++++++++++++++I+
42221*/
42222#if !defined(ELC_multi_string_arec_as_value)//pls skip define check as this part is muti
42223#define ELC_multi_string_arec_as_value
42224namespace elc::defs{
42225 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
42226//_defs.hpp
42227/*
42228未完成的elc解释器basic文件
42229由steve02081504与Alex0125设计、编写
42230转载时请在不对此文件做任何修改的同时注明出处
42231项目地址:https://github.com/ELC-lang/ELC
42232*/
42233/*
42234 ,??????????????????????????
42235 ????????????????????????????
42236 ?????????????????????????????+
42237 ?????+++++++++++++++++++++++++
42238 ?????+++++++++++++++++++++++++
42239 ??????++++++++++++++++++++++++
42240 ?????++
42241 ?????+++
42242 ??????+++IIIIIIIIIIIIIIIIII
42243 ?????+++++IIIIIIIIIIIIIIIIII
42244 ?????++++++++++++++++++++++++
42245 ??????+++++++++++++++++++++++:
42246 ?????++
42247 ?????+++
42248 ??????++
42249 ??????????????????????????????II
42250 ??????????????????????????????IIII
42251 ,?????????????????????????????IIIII+
42252 =???++++++++++++++++++++++++++III?
42253 ?++++++++++++++++++++++++++++I+
42254*/
42255#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
42256//_defs.hpp
42257/*
42258未完成的elc解释器_share文件
42259由steve02081504与Alex0125设计、编写
42260转载时请在不对此文件做任何修改的同时注明出处
42261项目地址:https://github.com/ELC-lang/ELC
42262*/
42263/*
42264 ,??????????????????????????
42265 ????????????????????????????
42266 ?????????????????????????????+
42267 ?????+++++++++++++++++++++++++
42268 ?????+++++++++++++++++++++++++
42269 ??????++++++++++++++++++++++++
42270 ?????++
42271 ?????+++
42272 ??????+++IIIIIIIIIIIIIIIIII
42273 ?????+++++IIIIIIIIIIIIIIIIII
42274 ?????++++++++++++++++++++++++
42275 ??????+++++++++++++++++++++++:
42276 ?????++
42277 ?????+++
42278 ??????++
42279 ??????????????????????????????II
42280 ??????????????????????????????IIII
42281 ,?????????????????????????????IIIII+
42282 =???++++++++++++++++++++++++++III?
42283 ?++++++++++++++++++++++++++++I+
42284*/
42285
42286//undefs at "_undefs.hpp"
42287
42288#if defined(ELC_CODE_REALM)
42289 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
42290#endif
42291
42292//set ELC_WARNING_LEVEL default to 4(max)
42293#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
42294
42295#if defined(_MSC_VER)
42296 #pragma warning(push,ELC_WARNING_LEVEL)
42297 #pragma warning(disable:4099)//class与struct混用警告diss
42298 #pragma warning(disable:4584)//重复子类警告diss
42299 #pragma warning(disable:4250)//域控制继承警告diss
42300 #pragma warning(disable:26432)//不完全默认方法警告diss
42301 #pragma warning(disable:26435)//virtual override方法警告diss
42302 #pragma warning(disable:26481)//容器安利diss
42303 #pragma warning(disable:26446)//gsl::at安利diss
42304 #pragma warning(disable:26434)//方法覆盖警告diss
42305 #pragma warning(disable:26429)//gsl::not_null安利diss
42306 #pragma warning(disable:26471)//对void*进行static_cast安利diss
42307 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
42308 #pragma warning(disable:26473)//相同指针显式cast警告diss
42309 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
42310 #pragma warning(disable:26485)//数组作指针警告diss
42311 #pragma warning(disable:26490)//reinterpret_cast警告diss
42312 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
42313 #pragma warning(disable:26482)//非常数数组索引警告diss
42314 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
42315#endif
42316#if defined(__GNUC__)
42317 #pragma GCC diagnostic push
42318 #pragma GCC diagnostic warning "-Wall"//开启所有警告
42319 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
42320#endif
42321#if defined(_MSC_VER)
42322 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
42323 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
42324 #define push_msvc_warning() __pragma(warning(push))
42325 #define pop_msvc_warning() __pragma(warning(pop))
42326 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
42327#else
42328 //#define suppress_msvc_warning(...)
42329 #define disable_msvc_warning(...)
42330 #define push_msvc_warning()
42331 #define pop_msvc_warning()
42332 #define push_and_disable_msvc_warning(...)
42333#endif
42334#if defined(_MSC_VER)
42335 //push pack settings
42336 #pragma pack(push)
42337 #pragma pack()
42338#endif
42339#if defined(_MSC_VER)
42340 //push and undef common macros
42341 #pragma push_macro("new")
42342 #undef new
42343 #pragma push_macro("delete")
42344 #undef delete
42345 #pragma push_macro("min")
42346 #undef min
42347 #pragma push_macro("max")
42348 #undef max
42349 #pragma push_macro("abs")
42350 #undef abs
42351 #pragma push_macro("export")
42352 #undef export
42353 #pragma push_macro("rand")
42354 #undef rand
42355 #pragma push_macro("sqrt")
42356 #undef sqrt
42357 #pragma push_macro("type_info")
42358 #undef type_info
42359 #pragma push_macro("elc")
42360 #undef elc
42361#endif
42362//
42363#if defined(ELC_VOID_NAME)
42364 #undef void
42365#endif
42366//
42367#if defined(ELC_PUBLIC_ALL)
42368 #define protected public
42369 #define private public
42370#endif
42371//
42372#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
42373 #undef rand
42374#endif
42375
42376// #define often_noexcept
42377#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
42378#define noexcept_as_auto MAGIC//哦现在有了
42379#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
42380#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
42381
42382#define using_method_from_base_t(name,...) \
42383template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
42384auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
42385{\
42386 return base_t::name(forward<Args>(rest)...);\
42387}\
42388
42389#define using_method_from_value(name,value_name,...) \
42390template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
42391auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
42392{\
42393 return value_name.name(forward<Args>(rest)...);\
42394}\
42395
42396#define floop while(__builtin_is_my_dick_still_there())
42397#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
42398#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
42399#if defined(_MSC_VER) && _MSC_VER>=1935
42400 //@see https://developercommunity.visualstudio.com/t/10193638
42401 #define enable_adl(name) template<typename=void>void name()noexcept=delete
42402#else
42403 #define enable_adl(name) void name()noexcept=delete
42404#endif
42405
42406#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
42407#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
42408
42409#define declvalue(...) (::std::declval<__VA_ARGS__>())
42410
42412#define template_error(reason) static_assert(template_error_helper<T>,reason)
42414#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
42416#define template_warning(reason) template_warning_helper<T>(reason)
42417
42418//for type_info
42419#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
42420#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
42421
42422#define is_common_attribute(name) public attribute<T,name<T>>
42423#define is_special_attribute(name) public attribute<T,name>
42424
42425#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
42426#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
42427
42428//for float_size_t
42429#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
42430//bitnum_of
42431#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
42432
42433//for attribute
42434#define def_common_attribute_with_nothing(name) \
42435template<typename T>\
42436class name{}\
42437
42438#define def_special_attribute_with_nothing(name) \
42439class name{}\
42440
42441#define common_attribute_t template<class>class
42442#define special_attribute_t class
42443
42452#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
42454#define enabled_by_default class enable_state=void
42456#define disabled_by_default class enable_state= ::std::enable_if_t<false>
42458#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
42460#define enable_flag class enable_state
42461
42462#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
42463#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
42464#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
42465#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
42466#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
42467
42469#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
42471#define get_recursive_λ_caller(name,...) \
42472exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
42473 return name(name,Args...);\
42474}
42476#define λ []
42478#define exλ [&]
42480#define λ_with_catch(...) [__VA_ARGS__]
42482#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
42483//recursive_λ_self_referential_reserved_symbolname
42484#define λ_RLSRRS _my_jb_super_sb_name_
42485
42486#if defined(_MSC_VER) && !defined(__clang__)
42487 #define λ_inline [[msvc::forceinline]]
42488 #define λ_force_inline [[msvc::forceinline]]
42489#elif
42490 #define λ_inline [[gnu::always_inline]]
42491 #define λ_force_inline [[gnu::always_inline]]
42492#else
42493 #define λ_inline
42494 #define λ_force_inline
42495#endif
42496
42497#define MAGIC//ahh,ko no tenno da!
42498
42500#define nothing
42501
42503#define elseif else if
42505#define _big_than_ >
42507#define _small_than_ <
42508
42509#if defined(_MSC_VER)
42510 #define not !
42511 #define and &&
42512 #define or ||
42513#endif
42514
42516#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
42518#define BREAK_NAMESPACE }
42519
42521#define template_name template
42523#define type_name class
42524
42525#if defined(DEBUG) || defined(_DEBUG)
42526 #define not_in_debug 0
42527 #define in_debug 1
42528#else
42529 #define not_in_debug 1
42530 #define in_debug 0
42531#endif
42532
42533#define es U""
42534#define ec(ch) U ## ch
42535
42536#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
42537 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
42538#else
42539 #define ELC_TEST_EVENTNAME(name)
42540#endif
42541
42542#define override_instance_struct \
42543protected:\
42544 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
42545 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
42546 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
42547 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
42548 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
42549
42550#if defined(_MSC_VER) && !defined(__clang__)
42551 #define distinctive __declspec(dllexport)
42552#else
42553 #define distinctive
42554#endif
42555
42556#if defined(_MSC_VER) && !defined(__clang__)
42557 #define force_inline __forceinline
42558#elif defined(__GNUC__) || defined(__clang__)
42559 #define force_inline __attribute__((always_inline)) inline
42560#else
42561 #define force_inline inline
42562#endif
42563
42564#if defined(_MSC_VER) && !defined(__clang__)
42565 #define with_no_vtable __declspec(novtable)
42566#else
42567 #define with_no_vtable
42568#endif
42569
42570#define in_consteval (::std::is_constant_evaluated())
42571
42572#define no_vtable_struct struct with_no_vtable
42573#define no_vtable_class class with_no_vtable
42574
42575//#define get_elc_defs using namespace ::elc::defs
42576
42577//file_end
42578
42579#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
42580
42581//file_end
42582
42583 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/string_arec_as_value.hpp"
42584
42585 namespace string_n{
42586 template<class char_T>
42587 value arec_as_value(string_t<char_T>&str,const value index){
42588 size_t i=size_t(use_as<int_t>(index));
42589 if(!i)
42590 i=size_t(use_as<uint_t>(index));
42591 struct arec_data_t final:instance_struct<arec_data_t>
42592 ,value::base_data_t{
42594 arec_data_t(string_t<char_T>&str,size_t index)noexcept:_m(&str,index){};
42595 arec_data_t(const arec_data_t&ref)noexcept:_m(special_init,ref._m){}
42596 virtual ~arec_data_t()noexcept override final=default;
42597
42598 virtual void be_set(ptr a)noexcept override final{move(_m)=use_as<char_T>(a);}
42599 [[nodiscard]]virtual ptr get_value()noexcept override final{return core::make_binary_node_from<char_T>(move(_m));}
42600 [[nodiscard]]virtual base_data_t*copy()const noexcept override final{return get<arec_data_t>(*this);}
42601 [[nodiscard]]virtual base_type_info_t get_type_info()const noexcept override final{return type_info<arec_data_t>;}
42602 };
42603 return get<arec_data_t>(str,i);
42604 }
42605 }
42606
42607 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
42608//_undefs.hpp
42609/*
42610未完成的elc解释器basic文件
42611由steve02081504与Alex0125设计、编写
42612转载时请在不对此文件做任何修改的同时注明出处
42613项目地址:https://github.com/ELC-lang/ELC
42614*/
42615/*
42616 ,??????????????????????????
42617 ????????????????????????????
42618 ?????????????????????????????+
42619 ?????+++++++++++++++++++++++++
42620 ?????+++++++++++++++++++++++++
42621 ??????++++++++++++++++++++++++
42622 ?????++
42623 ?????+++
42624 ??????+++IIIIIIIIIIIIIIIIII
42625 ?????+++++IIIIIIIIIIIIIIIIII
42626 ?????++++++++++++++++++++++++
42627 ??????+++++++++++++++++++++++:
42628 ?????++
42629 ?????+++
42630 ??????++
42631 ??????????????????????????????II
42632 ??????????????????????????????IIII
42633 ,?????????????????????????????IIIII+
42634 =???++++++++++++++++++++++++++III?
42635 ?++++++++++++++++++++++++++++I+
42636*/
42637#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
42638//_undefs.hpp
42639/*
42640未完成的elc解释器_share文件
42641由steve02081504与Alex0125设计、编写
42642转载时请在不对此文件做任何修改的同时注明出处
42643项目地址:https://github.com/ELC-lang/ELC
42644*/
42645/*
42646 ,??????????????????????????
42647 ????????????????????????????
42648 ?????????????????????????????+
42649 ?????+++++++++++++++++++++++++
42650 ?????+++++++++++++++++++++++++
42651 ??????++++++++++++++++++++++++
42652 ?????++
42653 ?????+++
42654 ??????+++IIIIIIIIIIIIIIIIII
42655 ?????+++++IIIIIIIIIIIIIIIIII
42656 ?????++++++++++++++++++++++++
42657 ??????+++++++++++++++++++++++:
42658 ?????++
42659 ?????+++
42660 ??????++
42661 ??????????????????????????????II
42662 ??????????????????????????????IIII
42663 ,?????????????????????????????IIIII+
42664 =???++++++++++++++++++++++++++III?
42665 ?++++++++++++++++++++++++++++I+
42666*/
42667
42668//defs at "_defs.hpp"
42669
42670#if defined(_MSC_VER)
42671 #pragma warning(pop)
42672#endif
42673//#undef suppress_msvc_warning
42674#undef disable_msvc_warning
42675#undef push_msvc_warning
42676#undef pop_msvc_warning
42677#undef push_and_disable_msvc_warning
42678#if defined(_MSC_VER)
42679 #pragma pack(pop)
42680#endif
42681#if defined(__GNUC__)
42682 #pragma GCC diagnostic pop
42683#endif
42684#if defined(_MSC_VER)
42685 #pragma pop_macro("new")
42686 #pragma pop_macro("delete")
42687 #pragma pop_macro("min")
42688 #pragma pop_macro("max")
42689 #pragma pop_macro("abs")
42690 #pragma pop_macro("export")
42691 #pragma pop_macro("rand")
42692 #pragma pop_macro("sqrt")
42693 #pragma pop_macro("type_info")
42694 #pragma pop_macro("elc")
42695#endif
42696
42697//
42698#if defined(ELC_VOID_NAME)
42699 #define void the_void
42700#endif
42701//
42702#if defined(ELC_PUBLIC_ALL)
42703 #undef protected
42704 #undef private
42705#endif
42706//
42707#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
42708 #define rand the_rand
42709#endif
42710
42711// #undef often_noexcept
42712#undef noexcept_as
42713#undef noexcept_as_auto
42714#undef constexpr_as
42715#undef constexpr_as_auto
42716
42717#undef using_method_from_base_t
42718#undef using_method_from_value
42719
42720#undef floop
42721#undef times
42722#undef debug_times
42723#undef enable_adl
42724
42725#undef re_declvalue
42726#undef re_decltype
42727
42728#undef declvalue
42729
42730#undef template_error
42731#undef template_error_of_type
42732#undef template_warning
42733
42734#undef type_info_of
42735#undef type_name_of
42736
42737#undef is_common_attribute
42738#undef is_special_attribute
42739
42740#undef has_attribute
42741#undef not_has_attribute
42742
42743#undef float_size_of
42744#undef bitnum_of
42745
42746#undef def_common_attribute_with_nothing
42747#undef def_special_attribute_with_nothing
42748
42749#undef common_attribute_t
42750#undef special_attribute_t
42751
42752#undef enable_if
42753#undef enabled_by_default
42754#undef disabled_by_default
42755#undef enable_if_not_ill_form
42756#undef enable_flag
42757
42758#undef was_an_ill_form
42759#undef was_an_ill_form_with_parameter
42760#undef was_not_an_ill_form
42761#undef was_not_an_ill_form_and_noexcept
42762#undef was_not_an_ill_form_with_parameter
42763
42764#undef recursive_λ
42765#undef get_recursive_λ_caller
42766#undef λ
42767#undef exλ
42768#undef λ_with_catch
42769#undef self_recursion
42770#undef λ_RLSRRS
42771#undef λ_inline
42772#undef λ_force_inline
42773
42774#undef MAGIC
42775
42776#undef nothing
42777
42778#undef elseif
42779#undef _big_than_
42780#undef _small_than_
42781
42782#if defined(_MSC_VER)
42783 #undef not
42784 #undef and
42785 #undef or
42786#endif
42787
42788#undef INTER_NAMESPACE
42789#undef BREAK_NAMESPACE
42790
42791#undef szie
42792#undef form
42793
42794#undef template_name
42795#undef type_name
42796
42797#undef not_in_debug
42798
42799#undef es
42800#undef ec
42801
42802#undef ELC_TEST_EVENTNAME
42803
42804#undef override_instance_struct
42805
42806#undef distinctive
42807
42808#undef force_inline
42809
42810#undef with_no_vtable
42811
42812#undef in_consteval
42813
42814#undef no_vtable_struct
42815#undef no_vtable_class
42816
42817//#undef get_elc_defs
42818
42819//file_end
42820
42821#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
42822
42823//file_end
42824
42825 #line 59 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/string_arec_as_value.hpp"
42826}
42827#endif
42828
42829//file_end
42830
42831 #line 62 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/string/_body.hpp"
42832#endif
42833
42834//file_end
42835
42836 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
42837#endif
42838
42839//file_end
42840
42841 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
42842 #define ELC_LIB_LOADER
42843 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
42844//_body.hpp
42845//at namespace ::
42846/*
42847未完成的elc解释器template文件
42848由steve02081504与Alex0125设计、编写
42849转载时请在不对此文件做任何修改的同时注明出处
42850项目地址:https://github.com/ELC-lang/ELC
42851*/
42852/*
42853 ,??????????????????????????
42854 ????????????????????????????
42855 ?????????????????????????????+
42856 ?????+++++++++++++++++++++++++
42857 ?????+++++++++++++++++++++++++
42858 ??????++++++++++++++++++++++++
42859 ?????++
42860 ?????+++
42861 ??????+++IIIIIIIIIIIIIIIIII
42862 ?????+++++IIIIIIIIIIIIIIIIII
42863 ?????++++++++++++++++++++++++
42864 ??????+++++++++++++++++++++++:
42865 ?????++
42866 ?????+++
42867 ??????++
42868 ??????????????????????????????II
42869 ??????????????????????????????IIII
42870 ,?????????????????????????????IIIII+
42871 =???++++++++++++++++++++++++++III?
42872 ?++++++++++++++++++++++++++++I+
42873*/
42874#if defined(ELC_TEST)
42875 #error "this part cannot be tested."
42876#endif
42877//include APIs:elc中可能根据编译环境而修改的底层函数
42878#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
42879//str_code_convert.hpp
42880/*
42881未完成的elc解释器_share文件
42882由steve02081504与Alex0125设计、编写
42883转载时请在不对此文件做任何修改的同时注明出处
42884项目地址:https://github.com/ELC-lang/ELC
42885*/
42886/*
42887 ,??????????????????????????
42888 ????????????????????????????
42889 ?????????????????????????????+
42890 ?????+++++++++++++++++++++++++
42891 ?????+++++++++++++++++++++++++
42892 ??????++++++++++++++++++++++++
42893 ?????++
42894 ?????+++
42895 ??????+++IIIIIIIIIIIIIIIIII
42896 ?????+++++IIIIIIIIIIIIIIIIII
42897 ?????++++++++++++++++++++++++
42898 ??????+++++++++++++++++++++++:
42899 ?????++
42900 ?????+++
42901 ??????++
42902 ??????????????????????????????II
42903 ??????????????????????????????IIII
42904 ,?????????????????????????????IIIII+
42905 =???++++++++++++++++++++++++++III?
42906 ?++++++++++++++++++++++++++++I+
42907*/
42908/*
42909APIs说明
42910elc依赖的基础函数.
42911调整这些,实现快速移植,快速优化与行为自定义.
42912*/
42913#line 84 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
42914
42915//file_end
42916
42917#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
42918#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
42919//library_load.hpp
42920/*
42921未完成的elc解释器_share文件
42922由steve02081504与Alex0125设计、编写
42923转载时请在不对此文件做任何修改的同时注明出处
42924项目地址:https://github.com/ELC-lang/ELC
42925*/
42926/*
42927 ,??????????????????????????
42928 ????????????????????????????
42929 ?????????????????????????????+
42930 ?????+++++++++++++++++++++++++
42931 ?????+++++++++++++++++++++++++
42932 ??????++++++++++++++++++++++++
42933 ?????++
42934 ?????+++
42935 ??????+++IIIIIIIIIIIIIIIIII
42936 ?????+++++IIIIIIIIIIIIIIIIII
42937 ?????++++++++++++++++++++++++
42938 ??????+++++++++++++++++++++++:
42939 ?????++
42940 ?????+++
42941 ??????++
42942 ??????????????????????????????II
42943 ??????????????????????????????IIII
42944 ,?????????????????????????????IIIII+
42945 =???++++++++++++++++++++++++++III?
42946 ?++++++++++++++++++++++++++++I+
42947*/
42948/*
42949APIs说明
42950elc依赖的基础函数.
42951调整这些,实现快速移植,快速优化与行为自定义.
42952*/
42953#if !defined(ELC_APIS_library_load)
42954 #define ELC_APIS_library_load
42955 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/decl_system_type.hpp"
42956//decl_system_type.hpp
42957/*
42958未完成的elc解释器_share文件
42959由steve02081504与Alex0125设计、编写
42960转载时请在不对此文件做任何修改的同时注明出处
42961项目地址:https://github.com/ELC-lang/ELC
42962*/
42963/*
42964 ,??????????????????????????
42965 ????????????????????????????
42966 ?????????????????????????????+
42967 ?????+++++++++++++++++++++++++
42968 ?????+++++++++++++++++++++++++
42969 ??????++++++++++++++++++++++++
42970 ?????++
42971 ?????+++
42972 ??????+++IIIIIIIIIIIIIIIIII
42973 ?????+++++IIIIIIIIIIIIIIIIII
42974 ?????++++++++++++++++++++++++
42975 ??????+++++++++++++++++++++++:
42976 ?????++
42977 ?????+++
42978 ??????++
42979 ??????????????????????????????II
42980 ??????????????????????????????IIII
42981 ,?????????????????????????????IIIII+
42982 =???++++++++++++++++++++++++++III?
42983 ?++++++++++++++++++++++++++++I+
42984*/
42985//copy&rewrite from steve02081504/steve.h
42986#define linux 2
42987#define windows 3
42988#define other 4
42989#if defined(__linux)||defined(__linux__)||defined(__gnu_linux__)
42990 #define SYSTEM_TYPE linux
42991#elif defined(_WIN32)||defined(__MINGW32__)||defined(__CYGWIN__)
42992 #define SYSTEM_TYPE windows
42993#else
42994 #define SYSTEM_TYPE other
42995#endif
42996#define ERROR_MSG_UNABLE_OS "Unable OS,edit this file on your own or contact ELC's producers."
42997
42998//file_end
42999
43000 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
43001 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
43002//string
43003//at namespace ::
43004/*@
43005未完成的elc解释器include文件
43006由steve02081504与Alex0125设计、编写
43007转载时请在不对此文件做任何修改的同时注明出处
43008项目地址:https://github.com/ELC-lang/ELC
43009*/
43010/*
43011 ,??????????????????????????
43012 ????????????????????????????
43013 ?????????????????????????????+
43014 ?????+++++++++++++++++++++++++
43015 ?????+++++++++++++++++++++++++
43016 ??????++++++++++++++++++++++++
43017 ?????++
43018 ?????+++
43019 ??????+++IIIIIIIIIIIIIIIIII
43020 ?????+++++IIIIIIIIIIIIIIIIII
43021 ?????++++++++++++++++++++++++
43022 ??????+++++++++++++++++++++++:
43023 ?????++
43024 ?????+++
43025 ??????++
43026 ??????????????????????????????II
43027 ??????????????????????????????IIII
43028 ,?????????????????????????????IIIII+
43029 =???++++++++++++++++++++++++++III?
43030 ?++++++++++++++++++++++++++++I+
43031*/
43032#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
43033//pre_checks.hpp
43034/*
43035未完成的elc解释器_share文件
43036由steve02081504与Alex0125设计、编写
43037转载时请在不对此文件做任何修改的同时注明出处
43038项目地址:https://github.com/ELC-lang/ELC
43039*/
43040/*
43041 ,??????????????????????????
43042 ????????????????????????????
43043 ?????????????????????????????+
43044 ?????+++++++++++++++++++++++++
43045 ?????+++++++++++++++++++++++++
43046 ??????++++++++++++++++++++++++
43047 ?????++
43048 ?????+++
43049 ??????+++IIIIIIIIIIIIIIIIII
43050 ?????+++++IIIIIIIIIIIIIIIIII
43051 ?????++++++++++++++++++++++++
43052 ??????+++++++++++++++++++++++:
43053 ?????++
43054 ?????+++
43055 ??????++
43056 ??????????????????????????????II
43057 ??????????????????????????????IIII
43058 ,?????????????????????????????IIIII+
43059 =???++++++++++++++++++++++++++III?
43060 ?++++++++++++++++++++++++++++I+
43061*/
43062//__cplusplus needs 20+
43063#if !defined(__cplusplus)||__cplusplus<202002L
43064 //if msvc, check _MSVC_LANG
43065 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
43066 //ok
43067 #else
43068 #error "elc files needs c++20 or higher"
43069 #endif
43070#endif
43071
43072//check if the compiler is msvc
43073#if defined(_MSC_VER)
43074 //check if _CPPRTTI
43075 #if !defined(_CPPRTTI)
43076 #error "elc files needs rtti"
43077 #endif
43078 //check _MSC_VER at last 1932
43079 #if _MSC_VER<1932
43080 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
43081 #endif
43082#endif
43083
43084//file_end
43085
43086#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
43087#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
43088
43089//file_end
43090
43091 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
43092 #if SYSTEM_TYPE == linux
43093 #include <dlfcn.h>
43094 #elif SYSTEM_TYPE == windows
43095 #define NOMINMAX
43096 #include <Windows.h>
43097 #include <Libloaderapi.h>
43098 #include <Errhandlingapi.h>//GetLastError
43099 //to_string
43100 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
43101//numerical_representation
43102//at namespace ::
43103/*@
43104未完成的elc解释器include文件
43105由steve02081504与Alex0125设计、编写
43106转载时请在不对此文件做任何修改的同时注明出处
43107项目地址:https://github.com/ELC-lang/ELC
43108*/
43109/*
43110 ,??????????????????????????
43111 ????????????????????????????
43112 ?????????????????????????????+
43113 ?????+++++++++++++++++++++++++
43114 ?????+++++++++++++++++++++++++
43115 ??????++++++++++++++++++++++++
43116 ?????++
43117 ?????+++
43118 ??????+++IIIIIIIIIIIIIIIIII
43119 ?????+++++IIIIIIIIIIIIIIIIII
43120 ?????++++++++++++++++++++++++
43121 ??????+++++++++++++++++++++++:
43122 ?????++
43123 ?????+++
43124 ??????++
43125 ??????????????????????????????II
43126 ??????????????????????????????IIII
43127 ,?????????????????????????????IIIII+
43128 =???++++++++++++++++++++++++++III?
43129 ?++++++++++++++++++++++++++++I+
43130*/
43131#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
43132//pre_checks.hpp
43133/*
43134未完成的elc解释器_share文件
43135由steve02081504与Alex0125设计、编写
43136转载时请在不对此文件做任何修改的同时注明出处
43137项目地址:https://github.com/ELC-lang/ELC
43138*/
43139/*
43140 ,??????????????????????????
43141 ????????????????????????????
43142 ?????????????????????????????+
43143 ?????+++++++++++++++++++++++++
43144 ?????+++++++++++++++++++++++++
43145 ??????++++++++++++++++++++++++
43146 ?????++
43147 ?????+++
43148 ??????+++IIIIIIIIIIIIIIIIII
43149 ?????+++++IIIIIIIIIIIIIIIIII
43150 ?????++++++++++++++++++++++++
43151 ??????+++++++++++++++++++++++:
43152 ?????++
43153 ?????+++
43154 ??????++
43155 ??????????????????????????????II
43156 ??????????????????????????????IIII
43157 ,?????????????????????????????IIIII+
43158 =???++++++++++++++++++++++++++III?
43159 ?++++++++++++++++++++++++++++I+
43160*/
43161//__cplusplus needs 20+
43162#if !defined(__cplusplus)||__cplusplus<202002L
43163 //if msvc, check _MSVC_LANG
43164 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
43165 //ok
43166 #else
43167 #error "elc files needs c++20 or higher"
43168 #endif
43169#endif
43170
43171//check if the compiler is msvc
43172#if defined(_MSC_VER)
43173 //check if _CPPRTTI
43174 #if !defined(_CPPRTTI)
43175 #error "elc files needs rtti"
43176 #endif
43177 //check _MSC_VER at last 1932
43178 #if _MSC_VER<1932
43179 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
43180 #endif
43181#endif
43182
43183//file_end
43184
43185#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
43186#if !defined(ELC_NUMERICAL_REPRESENTATION)
43187 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
43188//string
43189//at namespace ::
43190/*@
43191未完成的elc解释器include文件
43192由steve02081504与Alex0125设计、编写
43193转载时请在不对此文件做任何修改的同时注明出处
43194项目地址:https://github.com/ELC-lang/ELC
43195*/
43196/*
43197 ,??????????????????????????
43198 ????????????????????????????
43199 ?????????????????????????????+
43200 ?????+++++++++++++++++++++++++
43201 ?????+++++++++++++++++++++++++
43202 ??????++++++++++++++++++++++++
43203 ?????++
43204 ?????+++
43205 ??????+++IIIIIIIIIIIIIIIIII
43206 ?????+++++IIIIIIIIIIIIIIIIII
43207 ?????++++++++++++++++++++++++
43208 ??????+++++++++++++++++++++++:
43209 ?????++
43210 ?????+++
43211 ??????++
43212 ??????????????????????????????II
43213 ??????????????????????????????IIII
43214 ,?????????????????????????????IIIII+
43215 =???++++++++++++++++++++++++++III?
43216 ?++++++++++++++++++++++++++++I+
43217*/
43218#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
43219//pre_checks.hpp
43220/*
43221未完成的elc解释器_share文件
43222由steve02081504与Alex0125设计、编写
43223转载时请在不对此文件做任何修改的同时注明出处
43224项目地址:https://github.com/ELC-lang/ELC
43225*/
43226/*
43227 ,??????????????????????????
43228 ????????????????????????????
43229 ?????????????????????????????+
43230 ?????+++++++++++++++++++++++++
43231 ?????+++++++++++++++++++++++++
43232 ??????++++++++++++++++++++++++
43233 ?????++
43234 ?????+++
43235 ??????+++IIIIIIIIIIIIIIIIII
43236 ?????+++++IIIIIIIIIIIIIIIIII
43237 ?????++++++++++++++++++++++++
43238 ??????+++++++++++++++++++++++:
43239 ?????++
43240 ?????+++
43241 ??????++
43242 ??????????????????????????????II
43243 ??????????????????????????????IIII
43244 ,?????????????????????????????IIIII+
43245 =???++++++++++++++++++++++++++III?
43246 ?++++++++++++++++++++++++++++I+
43247*/
43248//__cplusplus needs 20+
43249#if !defined(__cplusplus)||__cplusplus<202002L
43250 //if msvc, check _MSVC_LANG
43251 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
43252 //ok
43253 #else
43254 #error "elc files needs c++20 or higher"
43255 #endif
43256#endif
43257
43258//check if the compiler is msvc
43259#if defined(_MSC_VER)
43260 //check if _CPPRTTI
43261 #if !defined(_CPPRTTI)
43262 #error "elc files needs rtti"
43263 #endif
43264 //check _MSC_VER at last 1932
43265 #if _MSC_VER<1932
43266 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
43267 #endif
43268#endif
43269
43270//file_end
43271
43272#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
43273#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
43274
43275//file_end
43276
43277 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
43278 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/bignum"
43279//bignum
43280//at namespace ::
43281/*@
43282未完成的elc解释器include文件
43283由steve02081504与Alex0125设计、编写
43284转载时请在不对此文件做任何修改的同时注明出处
43285项目地址:https://github.com/ELC-lang/ELC
43286*/
43287/*
43288 ,??????????????????????????
43289 ????????????????????????????
43290 ?????????????????????????????+
43291 ?????+++++++++++++++++++++++++
43292 ?????+++++++++++++++++++++++++
43293 ??????++++++++++++++++++++++++
43294 ?????++
43295 ?????+++
43296 ??????+++IIIIIIIIIIIIIIIIII
43297 ?????+++++IIIIIIIIIIIIIIIIII
43298 ?????++++++++++++++++++++++++
43299 ??????+++++++++++++++++++++++:
43300 ?????++
43301 ?????+++
43302 ??????++
43303 ??????????????????????????????II
43304 ??????????????????????????????IIII
43305 ,?????????????????????????????IIIII+
43306 =???++++++++++++++++++++++++++III?
43307 ?++++++++++++++++++++++++++++I+
43308*/
43309#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
43310//pre_checks.hpp
43311/*
43312未完成的elc解释器_share文件
43313由steve02081504与Alex0125设计、编写
43314转载时请在不对此文件做任何修改的同时注明出处
43315项目地址:https://github.com/ELC-lang/ELC
43316*/
43317/*
43318 ,??????????????????????????
43319 ????????????????????????????
43320 ?????????????????????????????+
43321 ?????+++++++++++++++++++++++++
43322 ?????+++++++++++++++++++++++++
43323 ??????++++++++++++++++++++++++
43324 ?????++
43325 ?????+++
43326 ??????+++IIIIIIIIIIIIIIIIII
43327 ?????+++++IIIIIIIIIIIIIIIIII
43328 ?????++++++++++++++++++++++++
43329 ??????+++++++++++++++++++++++:
43330 ?????++
43331 ?????+++
43332 ??????++
43333 ??????????????????????????????II
43334 ??????????????????????????????IIII
43335 ,?????????????????????????????IIIII+
43336 =???++++++++++++++++++++++++++III?
43337 ?++++++++++++++++++++++++++++I+
43338*/
43339//__cplusplus needs 20+
43340#if !defined(__cplusplus)||__cplusplus<202002L
43341 //if msvc, check _MSVC_LANG
43342 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
43343 //ok
43344 #else
43345 #error "elc files needs c++20 or higher"
43346 #endif
43347#endif
43348
43349//check if the compiler is msvc
43350#if defined(_MSC_VER)
43351 //check if _CPPRTTI
43352 #if !defined(_CPPRTTI)
43353 #error "elc files needs rtti"
43354 #endif
43355 //check _MSC_VER at last 1932
43356 #if _MSC_VER<1932
43357 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
43358 #endif
43359#endif
43360
43361//file_end
43362
43363#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/bignum"
43364#if !defined(ELC_BIGNUM)
43365 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
43366//base
43367//at namespace ::
43368/*@
43369未完成的elc解释器include文件
43370由steve02081504与Alex0125设计、编写
43371转载时请在不对此文件做任何修改的同时注明出处
43372项目地址:https://github.com/ELC-lang/ELC
43373*/
43374/*
43375 ,??????????????????????????
43376 ????????????????????????????
43377 ?????????????????????????????+
43378 ?????+++++++++++++++++++++++++
43379 ?????+++++++++++++++++++++++++
43380 ??????++++++++++++++++++++++++
43381 ?????++
43382 ?????+++
43383 ??????+++IIIIIIIIIIIIIIIIII
43384 ?????+++++IIIIIIIIIIIIIIIIII
43385 ?????++++++++++++++++++++++++
43386 ??????+++++++++++++++++++++++:
43387 ?????++
43388 ?????+++
43389 ??????++
43390 ??????????????????????????????II
43391 ??????????????????????????????IIII
43392 ,?????????????????????????????IIIII+
43393 =???++++++++++++++++++++++++++III?
43394 ?++++++++++++++++++++++++++++I+
43395*/
43396#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
43397//pre_checks.hpp
43398/*
43399未完成的elc解释器_share文件
43400由steve02081504与Alex0125设计、编写
43401转载时请在不对此文件做任何修改的同时注明出处
43402项目地址:https://github.com/ELC-lang/ELC
43403*/
43404/*
43405 ,??????????????????????????
43406 ????????????????????????????
43407 ?????????????????????????????+
43408 ?????+++++++++++++++++++++++++
43409 ?????+++++++++++++++++++++++++
43410 ??????++++++++++++++++++++++++
43411 ?????++
43412 ?????+++
43413 ??????+++IIIIIIIIIIIIIIIIII
43414 ?????+++++IIIIIIIIIIIIIIIIII
43415 ?????++++++++++++++++++++++++
43416 ??????+++++++++++++++++++++++:
43417 ?????++
43418 ?????+++
43419 ??????++
43420 ??????????????????????????????II
43421 ??????????????????????????????IIII
43422 ,?????????????????????????????IIIII+
43423 =???++++++++++++++++++++++++++III?
43424 ?++++++++++++++++++++++++++++I+
43425*/
43426//__cplusplus needs 20+
43427#if !defined(__cplusplus)||__cplusplus<202002L
43428 //if msvc, check _MSVC_LANG
43429 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
43430 //ok
43431 #else
43432 #error "elc files needs c++20 or higher"
43433 #endif
43434#endif
43435
43436//check if the compiler is msvc
43437#if defined(_MSC_VER)
43438 //check if _CPPRTTI
43439 #if !defined(_CPPRTTI)
43440 #error "elc files needs rtti"
43441 #endif
43442 //check _MSC_VER at last 1932
43443 #if _MSC_VER<1932
43444 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
43445 #endif
43446#endif
43447
43448//file_end
43449
43450#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
43451#line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
43452
43453//file_end
43454
43455 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/bignum"
43456 #define ELC_BIGNUM
43457 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
43458//_body.hpp
43459//at namespace ::
43460/*
43461未完成的elc解释器bignum文件
43462由steve02081504与Alex0125设计、编写
43463转载时请在不对此文件做任何修改的同时注明出处
43464项目地址:https://github.com/ELC-lang/ELC
43465*/
43466/*
43467 ,??????????????????????????
43468 ????????????????????????????
43469 ?????????????????????????????+
43470 ?????+++++++++++++++++++++++++
43471 ?????+++++++++++++++++++++++++
43472 ??????++++++++++++++++++++++++
43473 ?????++
43474 ?????+++
43475 ??????+++IIIIIIIIIIIIIIIIII
43476 ?????+++++IIIIIIIIIIIIIIIIII
43477 ?????++++++++++++++++++++++++
43478 ??????+++++++++++++++++++++++:
43479 ?????++
43480 ?????+++
43481 ??????++
43482 ??????????????????????????????II
43483 ??????????????????????????????IIII
43484 ,?????????????????????????????IIIII+
43485 =???++++++++++++++++++++++++++III?
43486 ?++++++++++++++++++++++++++++I+
43487*/
43488#if defined(ELC_TEST)
43489 #error "this part cannot be tested."
43490#endif
43491namespace elc::defs{
43492 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
43493//_defs.hpp
43494/*
43495未完成的elc解释器basic文件
43496由steve02081504与Alex0125设计、编写
43497转载时请在不对此文件做任何修改的同时注明出处
43498项目地址:https://github.com/ELC-lang/ELC
43499*/
43500/*
43501 ,??????????????????????????
43502 ????????????????????????????
43503 ?????????????????????????????+
43504 ?????+++++++++++++++++++++++++
43505 ?????+++++++++++++++++++++++++
43506 ??????++++++++++++++++++++++++
43507 ?????++
43508 ?????+++
43509 ??????+++IIIIIIIIIIIIIIIIII
43510 ?????+++++IIIIIIIIIIIIIIIIII
43511 ?????++++++++++++++++++++++++
43512 ??????+++++++++++++++++++++++:
43513 ?????++
43514 ?????+++
43515 ??????++
43516 ??????????????????????????????II
43517 ??????????????????????????????IIII
43518 ,?????????????????????????????IIIII+
43519 =???++++++++++++++++++++++++++III?
43520 ?++++++++++++++++++++++++++++I+
43521*/
43522#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
43523//_defs.hpp
43524/*
43525未完成的elc解释器_share文件
43526由steve02081504与Alex0125设计、编写
43527转载时请在不对此文件做任何修改的同时注明出处
43528项目地址:https://github.com/ELC-lang/ELC
43529*/
43530/*
43531 ,??????????????????????????
43532 ????????????????????????????
43533 ?????????????????????????????+
43534 ?????+++++++++++++++++++++++++
43535 ?????+++++++++++++++++++++++++
43536 ??????++++++++++++++++++++++++
43537 ?????++
43538 ?????+++
43539 ??????+++IIIIIIIIIIIIIIIIII
43540 ?????+++++IIIIIIIIIIIIIIIIII
43541 ?????++++++++++++++++++++++++
43542 ??????+++++++++++++++++++++++:
43543 ?????++
43544 ?????+++
43545 ??????++
43546 ??????????????????????????????II
43547 ??????????????????????????????IIII
43548 ,?????????????????????????????IIIII+
43549 =???++++++++++++++++++++++++++III?
43550 ?++++++++++++++++++++++++++++I+
43551*/
43552
43553//undefs at "_undefs.hpp"
43554
43555#if defined(ELC_CODE_REALM)
43556 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
43557#endif
43558
43559//set ELC_WARNING_LEVEL default to 4(max)
43560#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
43561
43562#if defined(_MSC_VER)
43563 #pragma warning(push,ELC_WARNING_LEVEL)
43564 #pragma warning(disable:4099)//class与struct混用警告diss
43565 #pragma warning(disable:4584)//重复子类警告diss
43566 #pragma warning(disable:4250)//域控制继承警告diss
43567 #pragma warning(disable:26432)//不完全默认方法警告diss
43568 #pragma warning(disable:26435)//virtual override方法警告diss
43569 #pragma warning(disable:26481)//容器安利diss
43570 #pragma warning(disable:26446)//gsl::at安利diss
43571 #pragma warning(disable:26434)//方法覆盖警告diss
43572 #pragma warning(disable:26429)//gsl::not_null安利diss
43573 #pragma warning(disable:26471)//对void*进行static_cast安利diss
43574 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
43575 #pragma warning(disable:26473)//相同指针显式cast警告diss
43576 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
43577 #pragma warning(disable:26485)//数组作指针警告diss
43578 #pragma warning(disable:26490)//reinterpret_cast警告diss
43579 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
43580 #pragma warning(disable:26482)//非常数数组索引警告diss
43581 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
43582#endif
43583#if defined(__GNUC__)
43584 #pragma GCC diagnostic push
43585 #pragma GCC diagnostic warning "-Wall"//开启所有警告
43586 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
43587#endif
43588#if defined(_MSC_VER)
43589 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
43590 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
43591 #define push_msvc_warning() __pragma(warning(push))
43592 #define pop_msvc_warning() __pragma(warning(pop))
43593 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
43594#else
43595 //#define suppress_msvc_warning(...)
43596 #define disable_msvc_warning(...)
43597 #define push_msvc_warning()
43598 #define pop_msvc_warning()
43599 #define push_and_disable_msvc_warning(...)
43600#endif
43601#if defined(_MSC_VER)
43602 //push pack settings
43603 #pragma pack(push)
43604 #pragma pack()
43605#endif
43606#if defined(_MSC_VER)
43607 //push and undef common macros
43608 #pragma push_macro("new")
43609 #undef new
43610 #pragma push_macro("delete")
43611 #undef delete
43612 #pragma push_macro("min")
43613 #undef min
43614 #pragma push_macro("max")
43615 #undef max
43616 #pragma push_macro("abs")
43617 #undef abs
43618 #pragma push_macro("export")
43619 #undef export
43620 #pragma push_macro("rand")
43621 #undef rand
43622 #pragma push_macro("sqrt")
43623 #undef sqrt
43624 #pragma push_macro("type_info")
43625 #undef type_info
43626 #pragma push_macro("elc")
43627 #undef elc
43628#endif
43629//
43630#if defined(ELC_VOID_NAME)
43631 #undef void
43632#endif
43633//
43634#if defined(ELC_PUBLIC_ALL)
43635 #define protected public
43636 #define private public
43637#endif
43638//
43639#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
43640 #undef rand
43641#endif
43642
43643// #define often_noexcept
43644#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
43645#define noexcept_as_auto MAGIC//哦现在有了
43646#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
43647#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
43648
43649#define using_method_from_base_t(name,...) \
43650template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
43651auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
43652{\
43653 return base_t::name(forward<Args>(rest)...);\
43654}\
43655
43656#define using_method_from_value(name,value_name,...) \
43657template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
43658auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
43659{\
43660 return value_name.name(forward<Args>(rest)...);\
43661}\
43662
43663#define floop while(__builtin_is_my_dick_still_there())
43664#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
43665#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
43666#if defined(_MSC_VER) && _MSC_VER>=1935
43667 //@see https://developercommunity.visualstudio.com/t/10193638
43668 #define enable_adl(name) template<typename=void>void name()noexcept=delete
43669#else
43670 #define enable_adl(name) void name()noexcept=delete
43671#endif
43672
43673#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
43674#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
43675
43676#define declvalue(...) (::std::declval<__VA_ARGS__>())
43677
43679#define template_error(reason) static_assert(template_error_helper<T>,reason)
43681#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
43683#define template_warning(reason) template_warning_helper<T>(reason)
43684
43685//for type_info
43686#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
43687#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
43688
43689#define is_common_attribute(name) public attribute<T,name<T>>
43690#define is_special_attribute(name) public attribute<T,name>
43691
43692#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
43693#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
43694
43695//for float_size_t
43696#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
43697//bitnum_of
43698#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
43699
43700//for attribute
43701#define def_common_attribute_with_nothing(name) \
43702template<typename T>\
43703class name{}\
43704
43705#define def_special_attribute_with_nothing(name) \
43706class name{}\
43707
43708#define common_attribute_t template<class>class
43709#define special_attribute_t class
43710
43719#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
43721#define enabled_by_default class enable_state=void
43723#define disabled_by_default class enable_state= ::std::enable_if_t<false>
43725#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
43727#define enable_flag class enable_state
43728
43729#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
43730#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
43731#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
43732#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
43733#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
43734
43736#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
43738#define get_recursive_λ_caller(name,...) \
43739exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
43740 return name(name,Args...);\
43741}
43743#define λ []
43745#define exλ [&]
43747#define λ_with_catch(...) [__VA_ARGS__]
43749#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
43750//recursive_λ_self_referential_reserved_symbolname
43751#define λ_RLSRRS _my_jb_super_sb_name_
43752
43753#if defined(_MSC_VER) && !defined(__clang__)
43754 #define λ_inline [[msvc::forceinline]]
43755 #define λ_force_inline [[msvc::forceinline]]
43756#elif
43757 #define λ_inline [[gnu::always_inline]]
43758 #define λ_force_inline [[gnu::always_inline]]
43759#else
43760 #define λ_inline
43761 #define λ_force_inline
43762#endif
43763
43764#define MAGIC//ahh,ko no tenno da!
43765
43767#define nothing
43768
43770#define elseif else if
43772#define _big_than_ >
43774#define _small_than_ <
43775
43776#if defined(_MSC_VER)
43777 #define not !
43778 #define and &&
43779 #define or ||
43780#endif
43781
43783#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
43785#define BREAK_NAMESPACE }
43786
43788#define template_name template
43790#define type_name class
43791
43792#if defined(DEBUG) || defined(_DEBUG)
43793 #define not_in_debug 0
43794 #define in_debug 1
43795#else
43796 #define not_in_debug 1
43797 #define in_debug 0
43798#endif
43799
43800#define es U""
43801#define ec(ch) U ## ch
43802
43803#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
43804 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
43805#else
43806 #define ELC_TEST_EVENTNAME(name)
43807#endif
43808
43809#define override_instance_struct \
43810protected:\
43811 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
43812 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
43813 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
43814 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
43815 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
43816
43817#if defined(_MSC_VER) && !defined(__clang__)
43818 #define distinctive __declspec(dllexport)
43819#else
43820 #define distinctive
43821#endif
43822
43823#if defined(_MSC_VER) && !defined(__clang__)
43824 #define force_inline __forceinline
43825#elif defined(__GNUC__) || defined(__clang__)
43826 #define force_inline __attribute__((always_inline)) inline
43827#else
43828 #define force_inline inline
43829#endif
43830
43831#if defined(_MSC_VER) && !defined(__clang__)
43832 #define with_no_vtable __declspec(novtable)
43833#else
43834 #define with_no_vtable
43835#endif
43836
43837#define in_consteval (::std::is_constant_evaluated())
43838
43839#define no_vtable_struct struct with_no_vtable
43840#define no_vtable_class class with_no_vtable
43841
43842//#define get_elc_defs using namespace ::elc::defs
43843
43844//file_end
43845
43846#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
43847
43848//file_end
43849
43850 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
43851
43852 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_decl.hpp"
43853//_decl.hpp
43854//at namespace elc::defs
43855/*
43856未完成的elc解释器bignum文件
43857由steve02081504与Alex0125设计、编写
43858转载时请在不对此文件做任何修改的同时注明出处
43859项目地址:https://github.com/ELC-lang/ELC
43860*/
43861/*
43862 ,??????????????????????????
43863 ????????????????????????????
43864 ?????????????????????????????+
43865 ?????+++++++++++++++++++++++++
43866 ?????+++++++++++++++++++++++++
43867 ??????++++++++++++++++++++++++
43868 ?????++
43869 ?????+++
43870 ??????+++IIIIIIIIIIIIIIIIII
43871 ?????+++++IIIIIIIIIIIIIIIIII
43872 ?????++++++++++++++++++++++++
43873 ??????+++++++++++++++++++++++:
43874 ?????++
43875 ?????+++
43876 ??????++
43877 ??????????????????????????????II
43878 ??????????????????????????????IIII
43879 ,?????????????????????????????IIIII+
43880 =???++++++++++++++++++++++++++III?
43881 ?++++++++++++++++++++++++++++I+
43882*/
43883namespace bignum_n{
43884 class bigint;
43885 class ubigint;
43886 class bigfloat;
43887 class ubigfloat;
43888}
43889using namespace bignum_n;//干净的符号导出!
43890
43891//注入math::arithmetic_type_info_prover
43892namespace base::math{
43893 using namespace bignum_n;
43894 template<>struct arithmetic_type_info_prover<bigint>{
43895 //bool:是否是算数类型
43896 static constexpr bool is_arithmetic_type = true;
43897 //bool:是否是基础类型
43898 static constexpr bool is_basic_type = false;
43899 //bool:是否是大数类型
43900 static constexpr bool is_big_type = true;
43901 //bool:是否是浮点类型
43902 static constexpr bool is_float_type = false;
43903 //浮点数类型:是指数记录法还是分数记录法
43904 static constexpr bool is_exponent_float_type=false;
43905 static constexpr bool is_fraction_float_type=false;
43906 //bool:是否是整数类型
43907 static constexpr bool is_integer_type = true;
43908 //bool:是否是有符号类型
43909 static constexpr bool is_signed = true;
43910 //bool:是否有NaN
43911 static constexpr bool has_NaN = false;
43912 //bool:是否有inf
43913 static constexpr bool has_inf = false;
43914 //bool:是否有min
43915 static constexpr bool has_min = false;
43916 //bool:是否有max
43917 static constexpr bool has_max = false;
43918 //bool:是否有默认极限值
43919 static constexpr bool has_ε = false;
43920 //对应的无符号和有符号类型
43921 using unsigned_type = ubigint;
43922 using signed_type = bigint;
43923 using float_type = bigfloat;
43924 using integer_type = bigint;
43925 };
43926
43927 template<>struct arithmetic_type_info_prover<ubigint>{
43928 //bool:是否是算数类型
43929 static constexpr bool is_arithmetic_type = true;
43930 //bool:是否是基础类型
43931 static constexpr bool is_basic_type = false;
43932 //bool:是否是大数类型
43933 static constexpr bool is_big_type = true;
43934 //bool:是否是浮点类型
43935 static constexpr bool is_float_type = false;
43936 //浮点数类型:是指数记录法还是分数记录法
43937 static constexpr bool is_exponent_float_type=false;
43938 static constexpr bool is_fraction_float_type=false;
43939 //bool:是否是整数类型
43940 static constexpr bool is_integer_type = true;
43941 //bool:是否是有符号类型
43942 static constexpr bool is_signed = false;
43943 //bool:是否有NaN
43944 static constexpr bool has_NaN = false;
43945 //bool:是否有inf
43946 static constexpr bool has_inf = false;
43947 //bool:是否有min
43948 static constexpr bool has_min = true;
43949 //min
43950 static ubigint min()noexcept;
43951 //bool:是否有max
43952 static constexpr bool has_max = false;
43953 //bool:是否有默认极限值
43954 static constexpr bool has_ε = false;
43955 //对应的无符号和有符号类型
43956 using unsigned_type = ubigint;
43957 using signed_type = bigint;
43958 using float_type = ubigfloat;
43959 using integer_type = ubigint;
43960 };
43961
43962 template<>struct arithmetic_type_info_prover<bigfloat>{
43963 //bool:是否是算数类型
43964 static constexpr bool is_arithmetic_type = true;
43965 //bool:是否是基础类型
43966 static constexpr bool is_basic_type = false;
43967 //bool:是否是大数类型
43968 static constexpr bool is_big_type = true;
43969 //bool:是否是浮点类型
43970 static constexpr bool is_float_type = true;
43971 //浮点数类型:是指数记录法还是分数记录法
43972 static constexpr bool is_exponent_float_type=false;
43973 static constexpr bool is_fraction_float_type=true;
43974 //bool:是否是整数类型
43975 static constexpr bool is_integer_type = false;
43976 //bool:是否是有符号类型
43977 static constexpr bool is_signed = true;
43978 //bool:是否有NaN
43979 static constexpr bool has_NaN = false;
43980 //bool:是否有inf
43981 static constexpr bool has_inf = true;
43982 //bool:是否有min
43983 static constexpr bool has_min = false;
43984 //bool:是否有max
43985 static constexpr bool has_max = false;
43986 //bool:是否有默认极限值
43987 static constexpr bool has_ε = false;
43988 //对应的无符号和有符号类型
43989 using unsigned_type = ubigfloat;
43990 using signed_type = bigfloat;
43991 using float_type = bigfloat;
43992 using integer_type = bigint;
43993 };
43994
43995 template<>struct arithmetic_type_info_prover<ubigfloat>{
43996 //bool:是否是算数类型
43997 static constexpr bool is_arithmetic_type = true;
43998 //bool:是否是基础类型
43999 static constexpr bool is_basic_type = false;
44000 //bool:是否是大数类型
44001 static constexpr bool is_big_type = true;
44002 //bool:是否是浮点类型
44003 static constexpr bool is_float_type = true;
44004 //浮点数类型:是指数记录法还是分数记录法
44005 static constexpr bool is_exponent_float_type=false;
44006 static constexpr bool is_fraction_float_type=true;
44007 //bool:是否是整数类型
44008 static constexpr bool is_integer_type = false;
44009 //bool:是否是有符号类型
44010 static constexpr bool is_signed = false;
44011 //bool:是否有NaN
44012 static constexpr bool has_NaN = false;
44013 //bool:是否有inf
44014 static constexpr bool has_inf = true;
44015 //bool:是否有min
44016 static constexpr bool has_min = true;
44017 //min
44018 static ubigfloat min()noexcept;
44019 //bool:是否有max
44020 static constexpr bool has_max = false;
44021 //bool:是否有默认极限值
44022 static constexpr bool has_ε = false;
44023 //对应的无符号和有符号类型
44024 using unsigned_type = ubigfloat;
44025 using signed_type = bigfloat;
44026 using float_type = ubigfloat;
44027 using integer_type = ubigint;
44028 };
44029}
44030
44031//file_end
44032
44033 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
44034 namespace bignum_n{
44035 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_body.hpp"
44036//_body.hpp
44037//at namespace elc::defs::bignum_n
44038/*
44039未完成的elc解释器bignum文件
44040由steve02081504与Alex0125设计、编写
44041转载时请在不对此文件做任何修改的同时注明出处
44042项目地址:https://github.com/ELC-lang/ELC
44043*/
44044/*
44045 ,??????????????????????????
44046 ????????????????????????????
44047 ?????????????????????????????+
44048 ?????+++++++++++++++++++++++++
44049 ?????+++++++++++++++++++++++++
44050 ??????++++++++++++++++++++++++
44051 ?????++
44052 ?????+++
44053 ??????+++IIIIIIIIIIIIIIIIII
44054 ?????+++++IIIIIIIIIIIIIIIIII
44055 ?????++++++++++++++++++++++++
44056 ??????+++++++++++++++++++++++:
44057 ?????++
44058 ?????+++
44059 ??????++
44060 ??????????????????????????????II
44061 ??????????????????????????????IIII
44062 ,?????????????????????????????IIIII+
44063 =???++++++++++++++++++++++++++III?
44064 ?++++++++++++++++++++++++++++I+
44065*/
44066#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/ubigint.hpp"
44067//ubigint.hpp
44068//at namespace elc::defs::bignum_n
44069/*
44070未完成的elc解释器bignum文件
44071由steve02081504与Alex0125设计、编写
44072转载时请在不对此文件做任何修改的同时注明出处
44073项目地址:https://github.com/ELC-lang/ELC
44074*/
44075/*
44076 ,??????????????????????????
44077 ????????????????????????????
44078 ?????????????????????????????+
44079 ?????+++++++++++++++++++++++++
44080 ?????+++++++++++++++++++++++++
44081 ??????++++++++++++++++++++++++
44082 ?????++
44083 ?????+++
44084 ??????+++IIIIIIIIIIIIIIIIII
44085 ?????+++++IIIIIIIIIIIIIIIIII
44086 ?????++++++++++++++++++++++++
44087 ??????+++++++++++++++++++++++:
44088 ?????++
44089 ?????+++
44090 ??????++
44091 ??????????????????????????????II
44092 ??????????????????????????????IIII
44093 ,?????????????????????????????IIIII+
44094 =???++++++++++++++++++++++++++III?
44095 ?++++++++++++++++++++++++++++I+
44096*/
44097class ubigint{
44098public:
44099 #if in_debug && !defined(ELC_SPEED_TEST)
44100 typedef unsigned char base_type;
44101 #else
44102 typedef unsigned_specific_size_fast_t<sizeof(uintmax_t)/2> base_type;
44103 #endif
44104private:
44105 typedef array_t<base_type> data_type;
44106 typedef array_like_view_t<const base_type> data_view_type;
44107
44108 template<unsigned_basic_integer_type T>
44109 static constexpr size_t base_type_size_of=ceil_div(sizeof(T),sizeof(base_type));
44110 static constexpr auto base_type_mod=number_of_possible_values_per<base_type>;
44111
44112 data_type _data;
44113
44114 explicit ubigint(const data_type&data)noexcept:_data(data){}
44115 explicit ubigint(data_type&&data)noexcept:_data(move(data)){}
44116public:
44117 ubigint()noexcept = default;
44118 ubigint(const ubigint&)noexcept = default;
44119 ubigint(ubigint&&)noexcept = default;
44120 ubigint(const zero_t&)noexcept:ubigint(){}
44121 ubigint& operator=(const ubigint&)&noexcept = default;
44122 ubigint& operator=(ubigint&&)&noexcept = default;
44123 ubigint& operator=(const zero_t&)noexcept{
44124 _data.clear();
44125 return*this;
44126 }
44127
44128 ~ubigint() = default;
44129public:
44130 template<unsigned_basic_integer_type T>
44131 ubigint(T value)noexcept{
44132 constexpr auto size = base_type_size_of<T>;
44133 _data.resize(size);
44134 auto i=_data.begin();
44135 while(value){
44136 const auto info=divmod(value,base_type_mod);
44137 *i=base_type(info.mod);
44138 value=T(info.quot);
44139 i++;
44140 }
44141 const auto used_size=i-_data.begin();
44142 if(used_size!=size)
44143 _data.resize(used_size);
44144 }
44145 template<basic_float_type T>
44146 explicit ubigint(T&&value)noexcept{
44147 remove_cvref<T> int_part;
44148 discard(::std::modf(value,&int_part));
44149 const auto info=get_precision_and_exponent(int_part);
44150 *this=ubigint(info.precision);
44151 *this<<=info.exponent;
44152 }
44153public:
44154 template<arithmetic_type T>
44155 [[nodiscard]]bool is_safe_convert_to()const noexcept{
44156 if constexpr(type_info<T>!=type_info<ubigint>){
44157 if constexpr(has_min<T>){
44158 constexpr auto min_value=min(type_info<T>);
44159 if constexpr(min_value)
44160 if(*this<min_value)
44161 return false;
44162 }
44163 if constexpr(has_max<T>){
44164 constexpr auto max_value=max(type_info<T>);
44165 constexpr size_t max_byte_size=ceil_div(get_bitnum(max_value),bitnum_of(byte));
44166 if(_data.size_in_byte()>max_byte_size)
44167 return false;
44168 if constexpr(not all_bit_is_one(max_byte_size))
44169 if(*this>max_value)
44170 return false;
44171 }
44172 }
44173 return true;
44174 }
44175 template<arithmetic_type T>
44176 [[nodiscard]]T convert_to()const noexcept{
44177 if constexpr(type_info<T>!=type_info<ubigint>){
44178 T value=0;
44179 auto i=_data.rbegin();
44180 while(i!=_data.rend()){
44181 value=T(value*base_type_mod);
44182 value+=*i++;
44183 }
44184 return value;
44185 }
44186 else
44187 return *this;
44188 }
44189
44190 //explicit operator T
44191 template<arithmetic_type T>
44192 [[nodiscard]]explicit operator T()&&noexcept{
44193 return move(*this).convert_to<T>();
44194 }
44195 template<arithmetic_type T>
44196 [[nodiscard]]explicit operator T()const&noexcept{
44197 return convert_to<T>();
44198 }
44199public:
44200 //rand所需
44201 friend void apply_basetype_to_head(ubigint&x,base_type value)noexcept{
44202 x._data.push_back(value);
44203 }
44204 friend void end_apply_basetypes(ubigint&x)noexcept{
44205 shrink_to_fit(x._data);
44206 }
44207private:
44208 static void shrink_to_fit(data_type&a)noexcept{
44209 auto size=a.size();
44210 while(size--)
44211 if(a[size]!=0){
44212 a.resize(size+1);
44213 return;
44214 }
44215 a.clear();
44216 }
44217 void shrink_to_fit()noexcept{
44218 shrink_to_fit(_data);
44219 }
44220 [[nodiscard]]static data_view_type get_data_view_of_data(const base_type*data,size_t size)noexcept{
44221 return data_view_type{data,size};
44222 }
44223 [[nodiscard]]static data_view_type get_shrinked_data_view_of_data(const base_type*data,size_t size)noexcept{
44224 size_t i = size;
44225 while(i--)
44226 if(data[i]!=0)
44227 break;
44228 return data_view_type{data,i+1};
44229 }
44230 [[nodiscard]]static data_view_type get_data_view_of_data(const data_type&a)noexcept{
44231 return get_data_view_of_data(a.data(), a.size());
44232 }
44233 [[nodiscard]]static data_view_type get_shrinked_data_view_of_data(const data_type&a)noexcept{
44234 return get_shrinked_data_view_of_data(a.data(), a.size());
44235 }
44236 [[nodiscard]]data_view_type get_data_view()const noexcept{
44237 return get_data_view_of_data(_data);
44238 }
44239 [[nodiscard]]data_view_type get_shrinked_data_view()const noexcept{
44240 return get_shrinked_data_view_of_data(_data);
44241 }
44242 [[nodiscard]]static data_view_type re_shrink(data_view_type a)noexcept{
44243 return get_shrinked_data_view_of_data(a.data(), a.size());
44244 }
44245public:
44246 //operator==
44247 [[nodiscard]]bool operator==(const ubigint& other)const noexcept{
44248 return equal(get_data_view(),other.get_data_view());
44249 }
44250 template<integer_type T>
44251 [[nodiscard]]bool operator==(T other)const noexcept{
44252 if constexpr(signed_type<T>){
44253 if(is_negative(other))return false;
44254 return *this==to_unsigned_t<T>(other);
44255 }else{
44256 auto i=_data.begin();
44257 const auto end=_data.end();
44258 while(i!=end){
44259 if(other<*i)
44260 return false;
44261 other-=*i;
44262 other=T(other/base_type_mod);
44263 i++;
44264 }
44265 return other==0;
44266 }
44267 }
44268 //operator<=>
44269private:
44270 //由于低位在前,不能使用elc的默认compare
44271 [[nodiscard]]static auto compare(data_view_type a, data_view_type b)noexcept{
44272 if(const auto tmp=a.size()<=>b.size(); tmp!=0)
44273 return tmp;
44274
44275 auto i=a.size();
44276 while(i--)
44277 if(const auto tmp=a[i]<=>b[i]; tmp!=0)
44278 return tmp;
44279 return strong_ordering::equivalent;
44280 }
44281 [[nodiscard]]static auto compare(const data_type&a, const data_type&b)noexcept{
44282 return compare(get_data_view_of_data(a), get_data_view_of_data(b));
44283 }
44284 [[nodiscard]]static auto compare(const data_type&a, data_view_type b)noexcept{
44285 return compare(get_data_view_of_data(a), b);
44286 }
44287 [[nodiscard]]static auto compare(data_view_type a, const data_type&b)noexcept{
44288 return compare(a, get_data_view_of_data(b));
44289 }
44290public:
44291 [[nodiscard]]auto operator<=>(const ubigint& other)const noexcept{
44292 return compare(get_data_view(),other.get_data_view());
44293 }
44294 template<integer_type T>
44295 [[nodiscard]]auto operator<=>(T other)const noexcept{
44296 if constexpr(signed_type<T>){
44297 if(is_negative(other))return strong_ordering::greater;
44298 return *this<=>to_unsigned_t<T>(other);
44299 }else{
44300 if constexpr(is_basic_type<T>)
44301 if(auto tmp=_data.size()<=>base_type_size_of<T>;tmp!=0)//根据位数快速判断大小
44302 return tmp;
44303 auto i=_data.begin();
44304 const auto end=_data.end();
44305 while(i!=end){
44306 if(other<*i)//this>other
44307 return strong_ordering::greater;
44308 other-=*i;
44309 other=T(other/base_type_mod);
44310 i++;
44311 }
44312 return other==0?strong_ordering::equivalent:strong_ordering::less;
44313 }
44314 }
44315private:
44316 //operator+-*/%s
44317 typedef unsigned_specific_size_fast_t<2*sizeof(base_type)> calc_type;
44318 //+
44319 [[nodiscard]]static size_t get_safety_add_buf_size_diff(data_view_type a,data_view_type b)noexcept{
44320 //判断进位所需空间
44321 if(a.size()!=b.size()){
44322 auto i = a.size();
44323 while(i-- != b.size())//判断进位区是否没有足够的空间以至于需要进位
44324 if(a[i]!=max(type_info<base_type>))//任意一位不是最大值就不需要进位
44325 return 0;
44326 return 1;
44327 }
44328 else{
44329 //只需要判断最高位是否需要进位
44330 const auto res=calc_type(a.back())+calc_type(b.back())+1;//+1是因为次高位可能进位
44331 return static_cast<size_t>(res>>bitnum_of(base_type));
44332 }
44333 }
44334 [[nodiscard]]static size_t get_safety_add_buf_size(data_view_type a,data_view_type b)noexcept{
44335 return a.size()+get_safety_add_buf_size_diff(a,b);
44336 }
44337 [[nodiscard]]static size_t get_safety_add_buf_size_with_not_compared_buf(data_view_type a,data_view_type b)noexcept{
44338 if(a.size()<b.size())
44339 swap(a,b);
44340 return get_safety_add_buf_size(a,b);
44341 }
44342 [[nodiscard]]static data_type add_base(data_view_type a,data_view_type b)noexcept{
44343 if(a.size()<b.size())
44344 swap(a,b);
44345 if(!b.size())return data_type(a);
44346 auto base_size = a.size();
44347 const auto size_diff = get_safety_add_buf_size_diff(a,b);
44348 const auto size = base_size+size_diff;
44349
44350 array_t<base_type> tmp(note::size(size));
44351 copy_assign[base_size](tmp.data(),a.data());
44352 copy_assign[size_diff](note::to(tmp.data()+base_size),base_type{0});
44353 add_to_base(tmp.data(),b);
44354 if(size_diff)
44355 shrink_to_fit(tmp);
44356 return tmp;
44357 }
44358 static void add_to_base(data_type&a,data_view_type b)noexcept{
44359 if(!b.size())return;
44360 const auto this_view = get_data_view_of_data(a);
44361 if(!this_view.size()){a=b;return;}
44362 const auto&other_view = b;
44363 const auto origin_size = this_view.size();
44364 const auto new_size = get_safety_add_buf_size_with_not_compared_buf(this_view,other_view);
44365 const auto size_diff = new_size - origin_size;
44366 if(size_diff)
44367 a.insert(origin_size,size_diff,base_type{0});
44368 add_to_base(a.data(),other_view);
44369 if(size_diff)
44370 shrink_to_fit(a);
44371 }
44372 static void add_to_base(data_type&a,const data_type&b)noexcept{
44373 add_to_base(a,get_data_view_of_data(b));
44374 }
44375 static void add_to_base(base_type*buf,data_view_type b)noexcept{
44376 bool is_overflows = 0;
44377 const auto end_size = b.size();
44378 auto other_begin = b.begin();
44379
44380 for(size_t i=0;i<end_size;++i)
44381 *buf++ = add_carry(*buf,*other_begin++,is_overflows);
44382 while(is_overflows)
44383 *buf++ = add_carry(*buf,is_overflows);
44384 }
44385 static void add_to_base(base_type*buf,const data_type&b)noexcept{
44386 add_to_base(buf,get_data_view_of_data(b));
44387 }
44388 template<unsigned_basic_integer_type T>
44389 static void add_to_base(data_type&buf,T num)noexcept{
44390 //定义运算类型:若T比calc_type大,则使用T,否则使用calc_type
44391 using calc_t = conditional<(sizeof(T) > sizeof(calc_type)),T,calc_type>;
44392 //初始化
44393 calc_t tmp=num;
44394 base_type*iter=buf.begin();
44395 const auto end=buf.end();
44396 bool is_overflows = 0;
44397 while(iter!=end && tmp){
44398 tmp=add_carry(calc_t(*iter),tmp,is_overflows);
44399 *iter++=base_type(tmp);
44400 tmp>>=bitnum_of(base_type);
44401 }
44402 if(tmp){
44403 {
44404 const auto iter_pos=iter-buf.begin();
44405 buf.resize(buf.size()+ceil_div(sizeof(tmp),sizeof(base_type)));
44406 iter=buf.begin()+iter_pos;
44407 }
44408 while(tmp){
44409 *iter=add_carry(base_type(tmp),is_overflows);
44410 tmp>>=bitnum_of(base_type);
44411 ++iter;
44412 }
44413 buf.resize(iter-buf.begin());
44414 }
44415 }
44418 static void offset_add_to_base(base_type*buf,const data_type&b,size_t offset)noexcept{
44419 add_to_base(buf+offset,get_data_view_of_data(b));
44420 }
44421 static void offset_add_to_base(data_type&buf,data_view_type b,size_t offset)noexcept{
44422 //检查是否需要扩容
44423 if(buf.size()<=offset+b.size()){
44424 const auto size_now = buf.size();
44425 const auto size_need = offset+b.size()+1;//考虑进位
44426 const auto size_diff = size_need - size_now;
44427 buf.insert(size_now,size_diff,base_type{0});//扩容&填充0
44428 }
44429 offset_add_to_base(buf.data(),b,offset);
44430 shrink_to_fit(buf);
44431 }
44432 auto& offset_add_to_base(data_view_type b,size_t offset)noexcept{
44433 offset_add_to_base(_data,b,offset);
44434 return*this;
44435 }
44436 auto& offset_add_to_base(const data_type&b,size_t offset)noexcept{
44437 return offset_add_to_base(get_data_view_of_data(b),offset);
44438 }
44439 auto& offset_add_to_base(const ubigint&b,size_t offset)noexcept{
44440 return offset_add_to_base(b._data,offset);
44441 }
44442 //-
44443 [[nodiscard]]static data_type sub_base(data_view_type a,data_view_type b)noexcept{
44444 //调用方保证a>=b
44445 const auto size = a.size();
44446
44447 array_t<base_type> tmp(note::size(size));
44448 copy_assign[size](tmp.data(),a.data());
44449 sub_with_base(tmp,b);//already shrink_to_fit ed
44450 return tmp;
44451 }
44452 static void sub_with_base(base_type*buf,data_view_type b)noexcept{
44453 //调用方保证a>=b
44454 bool is_overflows = 0;
44455 const auto end_size = b.size();
44456 auto other_begin = b.begin();
44457
44458 for(size_t i=0;i<end_size;++i)
44459 *buf++ = sub_borrow(*buf,*other_begin++,is_overflows);
44460 while(is_overflows)
44461 *buf++ = sub_borrow(*buf,is_overflows);
44462 }
44463 static void sub_with_base(base_type*buf,const data_type&b)noexcept{
44464 sub_with_base(buf,get_data_view_of_data(b));
44465 }
44466 static void sub_with_base(data_type&buf,data_view_type b)noexcept{
44467 sub_with_base(buf.data(),b);
44468 shrink_to_fit(buf);
44469 }
44470 static void sub_with_base(data_type&buf,const data_type&b)noexcept{
44471 sub_with_base(buf,get_data_view_of_data(b));
44472 }
44473 [[nodiscard]]static data_type sub_base(data_view_type a,const data_type&b)noexcept{
44474 return sub_base(a,get_data_view_of_data(b));
44475 }
44476 [[nodiscard]]static data_type sub_base(const data_type&a,data_view_type b)noexcept{
44477 return sub_base(get_data_view_of_data(a),b);
44478 }
44479 [[nodiscard]]static data_type sub_base(const data_type&a,const data_type&b)noexcept{
44480 return sub_base(get_data_view_of_data(a),get_data_view_of_data(b));
44481 }
44482 //++
44483 //add_one_to_base
44484 static void add_one_to_base(data_type&buf)noexcept{
44485 base_type*iter=buf.begin();
44486 const auto end=buf.end();
44487 while(iter!=end){
44488 ++*iter;
44489 if(*iter)
44490 return;
44491 ++iter;
44492 }
44493 buf.resize(buf.size()+1);
44494 buf.back()=1;
44495 }
44496 void add_one_to_base()noexcept{
44497 add_one_to_base(_data);
44498 }
44499 //--
44500 //sub_one_from_base
44501 static void sub_one_from_base(data_type&buf)noexcept{
44502 base_type*iter=buf.begin();
44503 const auto end=buf.end();
44504 while(iter!=end){
44505 if(*iter){
44506 if((!--*iter) && iter==buf.rbegin())
44507 buf.resize(buf.size()-1);
44508 return;
44509 }
44510 *iter=max(type_info<base_type>);
44511 }
44512 //整个buf都是0,说明buf是0,不需要做任何操作
44513 }
44514 void sub_one_from_base()noexcept{
44515 sub_one_from_base(_data);
44516 }
44517 //*
44518 //这些东西比subview快,因为没有无用的检查
44519 //**不要使用subview替代**
44520 //shrink_of_end_zeros
44521 //去掉(数理上)末尾的(实现上)开头的0以减少乘法的次数
44522 [[nodiscard]]static size_t shrink_of_end_zeros(data_view_type&buf)noexcept{
44523 if(buf.empty())
44524 return 0;
44525 auto begin=buf.begin();
44526 const auto end=buf.end();
44527 while(begin!=end && !*begin)
44528 ++begin;
44529 const size_t aret=begin-buf.begin();
44530 const size_t size=end-begin;
44531 buf=get_data_view_of_data(begin,size);
44532 return aret;
44533 }
44534 //unshrink_of_end_zeros
44535 //就是他妈的撤销
44536 [[nodiscard]]static data_view_type unshrink_of_end_zeros(data_view_type a,size_t zeros)noexcept{
44537 return get_data_view_of_data(a.begin()-zeros,a.size()+zeros);
44538 }
44539 //apply_shrink_of_end_zeros
44540 //对于data_type和data_view_type应用已经获得的zeros大小进行shrink
44541 static void apply_shrink_of_end_zeros(data_type&buf,size_t zeros)noexcept{
44542 if(zeros)
44543 buf.forward_resize(buf.size()-zeros);
44544 }
44545 static void apply_shrink_of_end_zeros(data_view_type&buf,size_t zeros)noexcept{
44546 if(zeros)
44547 buf=get_data_view_of_data(buf.begin()+zeros,buf.size()-zeros);
44548 }
44549 [[nodiscard]]static data_type muti_base(data_view_type a,base_type b)noexcept{
44550 array_t<base_type> tmp(note::size(a.size()+1));
44551 muti_with_base(tmp.data(),a,b);
44552 shrink_to_fit(tmp);
44553 return tmp;
44554 }
44555 static void muti_with_base_no_optimisation(base_type*buf,data_view_type a,base_type b)noexcept{
44556 size_t i=0;
44557 calc_type num=0;
44558 while(i!=a.size()){
44559 num+=calc_type(a[i++])*calc_type(b);
44560 *buf++ = base_type(num%base_type_mod);
44561 num/=base_type_mod;
44562 }
44563 *buf = base_type(num);
44564 }
44565 static void muti_with_base(base_type*buf,data_view_type a,base_type b)noexcept{
44566 if(!b){
44567 copy_assign[a.size()+1](note::to(buf),base_type{0});
44568 return;
44569 }
44570 {
44571 const auto zeros=shrink_of_end_zeros(a);
44572 copy_assign[zeros](note::to(buf),base_type{0});
44573 buf+=zeros;
44574 }
44575 return muti_with_base_no_optimisation(buf,a,b);
44576 }
44577 static void muti_with_base(base_type*buf,data_view_type a,data_view_type b)noexcept{
44578 {
44579 const auto zeros=shrink_of_end_zeros(a)+shrink_of_end_zeros(b);
44580 copy_assign[zeros](note::to(buf),base_type{0});
44581 buf+=zeros;
44582 }
44583 array_t<base_type> tmp(note::size(a.size()+1));
44584 size_t muti_scale=0;
44585 while(muti_scale!=b.size()){
44586 if(b[muti_scale]){
44587 muti_with_base_no_optimisation(tmp.data(),a,b[muti_scale]);
44588 add_to_base(buf+muti_scale,get_shrinked_data_view_of_data(tmp));
44589 }
44590 muti_scale++;
44591 }
44592 }
44593 [[nodiscard]]static data_type muti_base(data_view_type a,data_view_type b)noexcept{
44594 if(a.size()<b.size())swap(a,b);//大数在前循环数小
44595 array_t<base_type> tmp(note::size(a.size()+b.size()),0);
44596 muti_with_base(tmp.data(),a,b);
44597 shrink_to_fit(tmp);
44598 return tmp;
44599 }
44600 //分割乘法以提高效率
44601 [[nodiscard]]static data_type fast_muti_base(data_view_type a,data_view_type b)noexcept{
44602 constexpr auto fast_muti_base_threshold=1<<6;//对小于1000的随机数阶乘测试后选择此数
44603 if(min(a.size(),b.size())<fast_muti_base_threshold)
44604 return muti_base(a,b);
44605 //计算分割点
44606 const auto split_point=max(
44607 min((a.size()+1)/2,b.size()-1),
44608 min(a.size()-1,(b.size()+1)/2)
44609 );
44610 //拆成4个数
44611 const auto a_split_point=a.data()+split_point;
44612 const data_view_type a_low=get_shrinked_data_view_of_data(a.data(),split_point);
44613 const data_view_type a_high{a_split_point,a.size()-split_point};
44614 const auto b_split_point=b.data()+split_point;
44615 const data_view_type b_low=get_shrinked_data_view_of_data(b.data(),split_point);
44616 const data_view_type b_high{b_split_point,b.size()-split_point};
44617 //计算结果
44618 ubigint high{fast_muti_base(a_high,b_high)};
44619 ubigint low{fast_muti_base(a_low,b_low)};
44620 ubigint middle{fast_muti_base(add_base(a_high,a_low),add_base(b_high,b_low))};
44621 //合并结果
44622 middle -= high+low;
44623 return move(low.offset_add_to_base(high,split_point*2).
44624 offset_add_to_base(middle,split_point)._data);
44625 }
44626 [[nodiscard]]static data_type fast_muti_base(const data_type& a,const data_type& b)noexcept{
44627 return fast_muti_base(get_data_view_of_data(a),get_data_view_of_data(b));
44628 }
44629 [[nodiscard]]static data_type fast_muti_base(const data_type& a,data_view_type b)noexcept{
44630 return fast_muti_base(get_data_view_of_data(a),b);
44631 }
44632 [[nodiscard]]static data_type fast_muti_base(data_view_type a,const data_type& b)noexcept{
44633 return fast_muti_base(a,get_data_view_of_data(b));
44634 }
44635 [[nodiscard]]static data_type fast_muti_base(data_view_type a,const ubigint& b)noexcept{
44636 return fast_muti_base(a,b.get_data_view());
44637 }
44639 //除法优化:在不需要余数的情况下可以进行的优化
44640 [[nodiscard]]static size_t get_no_mod_optimisation_size(const data_type&a,data_view_type b)noexcept{
44641 return get_no_mod_optimisation_size(get_data_view_of_data(a),b);
44642 }
44643 [[nodiscard]]static size_t get_no_mod_optimisation_size(data_view_type a,data_view_type b)noexcept{
44644 return no_mod_optimisation_of_div(a,b);
44645 }
44646 static size_t no_mod_optimisation_of_div(data_view_type&a,data_view_type&b)noexcept{
44647 size_t aret=0;
44648 //去除末尾0
44649 {
44650 const auto zeros=shrink_of_end_zeros(b);
44651 apply_shrink_of_end_zeros(a,zeros);
44652 aret+=zeros;
44653 }
44654 //被除数不及两倍除数长度减2时,可以忽略一部分最低位且不影响结果
44655 if ((b.size()-1)*2 > a.size()) {
44656 const auto ans_len = a.size() - b.size() + 2;
44657 const auto shr = b.size() - ans_len;
44658 a=a.subview(shr);
44659 b=b.subview(shr);
44660 aret+=shr;
44661 aret+=no_mod_optimisation_of_div(a,b);
44662 }
44663 return aret;
44664 }
44665 static size_t no_mod_optimisation_of_div(data_type&a,data_view_type&b)noexcept{
44666 size_t aret=0;
44667 //去除末尾0
44668 {
44669 const auto zeros=shrink_of_end_zeros(b);
44670 apply_shrink_of_end_zeros(a,zeros);
44671 aret+=zeros;
44672 }
44673 //被除数不及两倍除数长度减2时,可以忽略一部分最低位且不影响结果
44674 if ((b.size()-1)*2 > a.size()) {
44675 const auto ans_len = a.size() - b.size() + 2;
44676 const auto shr = b.size() - ans_len;
44677 a.forward_resize(a.size()-shr);
44678 b=b.subview(shr);
44679 aret+=shr;
44680 aret+=no_mod_optimisation_of_div(a,b);
44681 }
44682 return aret;
44683 }
44684 //除法实现
44685 [[nodiscard]]static base_type div_with_base_no_optimisation(data_type&buf,base_type*a,data_view_type b)noexcept{
44686 data_view_type tryto{a,b.size()+1};
44687 const auto dividend=(calc_type)exλ{
44688 const base_type*p=tryto.rbegin();
44689 return calc_type(*p)*base_type_mod+calc_type(p[-1]);
44690 }();
44691 const calc_type divisor=calc_type(b.back());
44692 calc_type left=dividend/(divisor+1);
44693 calc_type right=calc_type(dividend/divisor);
44694 right=min(right,(calc_type)max(type_info<base_type>));
44695 if(right==0)return 0;//a/b<=right==0
44696 base_type last_work_able=0;
44697 //left<=a/b<=right
44698 tryto=get_shrinked_data_view_of_data(tryto.data(),tryto.size());
44699 while(left<=right) {
44700 const calc_type test=(left+right)/2;//二分法
44701 muti_with_base(buf.data(),b,base_type(test));
44702 const auto myview=get_shrinked_data_view_of_data(buf);
44703 const auto cmp=compare(tryto,myview);
44704 if(cmp>=0)
44705 last_work_able=base_type(test);
44706 if(cmp>0){//tryto>myview:测试值太小或合适
44707 left=test+1;
44708 if(!base_type(left))//溢出了,test是最大的可用值
44709 break;
44710 }
44711 elseif(cmp<0)//tryto<myview:测试值太大
44712 right=test-1;
44713 else//tryto==myview:测试值合适
44714 break;
44715 }
44716 if(last_work_able==0)return 0;
44717 muti_with_base(buf.data(),b,last_work_able);
44718 sub_with_base(a,get_shrinked_data_view_of_data(buf));
44719 return last_work_able;
44720 }
44721 [[nodiscard]]static base_type div_with_base(data_type&buf,base_type*a,data_view_type b)noexcept{
44722 return div_with_base_no_optimisation(buf,a,b);
44723 }
44724 [[nodiscard]]static base_type div_base(base_type*a,data_view_type b)noexcept{
44725 array_t<base_type> fortry(note::size(b.size()+1));
44726 return div_with_base(fortry,a,b);
44727 }
44728 static data_type div_with_base_no_optimisation_impl(data_type&a,data_view_type b)noexcept{
44729 array_t<base_type> tmp(note::size(a.size()-b.size()),0);
44730 const auto end=a.rend();
44731 auto begin=a.rbegin()+b.size();
44732 auto tmpwritter=tmp.rbegin();
44733 array_t<base_type> fortry(note::size(b.size()+1));
44734 while(begin!=end){
44735 auto result=div_with_base(fortry,begin,b);
44736 *tmpwritter=result;
44737 tmpwritter++;
44738 begin++;
44739 };
44740 shrink_to_fit(tmp);
44741 return tmp;
44742 }
44743 static data_type div_with_base_no_optimisation(data_type&a,data_view_type b)noexcept{
44744 a.push_back(0);
44745 return div_with_base_no_optimisation_impl(a,b);
44746 }
44747 static data_type div_with_base(data_type&a,data_view_type b)noexcept{
44748 no_mod_optimisation_of_div(a,b);
44749 return div_with_base_no_optimisation(a,b);
44750 }
44751 [[nodiscard]]static data_type div_with_base(ubigint&a,const ubigint&b)noexcept{
44752 return div_with_base(a._data,b.get_data_view());
44753 }
44754 [[nodiscard]]static data_type div_base_no_optimisation(data_view_type a,data_view_type b)noexcept{
44755 array_t<base_type> tmp(note::size(a.size()+1));
44756 copy_assign[a.size()](tmp.data(), a.data());
44757 tmp.back()=0;
44758 tmp=div_with_base_no_optimisation_impl(tmp,b);
44759 return tmp;
44760 }
44761 [[nodiscard]]static data_type div_base(data_view_type a,data_view_type b)noexcept{
44762 no_mod_optimisation_of_div(a,b);
44763 return div_base_no_optimisation(a,b);
44764 }
44765 //%
44766 static void mod_with_base_impl(data_type&a,data_view_type b)noexcept{
44767 const auto end=a.rend();
44768 auto begin=a.rbegin()+b.size();
44769 array_t<base_type> fortry(note::size(b.size()+1));
44770 while(begin!=end){
44771 discard(div_with_base_no_optimisation(fortry,begin,b));
44772 begin++;
44773 };
44774 }
44775 static void mod_with_base(data_type&a,data_view_type b)noexcept{
44776 a.push_back(0);
44777 mod_with_base_impl(a,b);
44778 shrink_to_fit(a);
44779 }
44780 [[nodiscard]]static data_type mod_base(data_view_type a,data_view_type b)noexcept{
44781 array_t<base_type> tmp(note::size(a.size()+1));
44782 copy_assign[a.size()](tmp.data(), a.data());
44783 tmp.back()=0;
44784 mod_with_base_impl(tmp,b);
44785 shrink_to_fit(tmp);
44786 return tmp;
44787 }
44788 //divmod
44789 template<class=void>
44790 struct divmod_result_t_base{
44791 ubigint quot;
44792 ubigint mod;
44793 };
44794public:
44795 typedef divmod_result_t_base<void> divmod_result_t;
44796private:
44797 [[nodiscard]]static divmod_result_t divmod_with_base(data_type&a,data_view_type b)noexcept{
44798 const auto opt_size=get_no_mod_optimisation_size(a,b);
44799 if(!opt_size){
44800 data_type quot = div_with_base_no_optimisation(a, b);
44801 shrink_to_fit(a);
44802 return {ubigint{move(quot)},ubigint{move(a)}};
44803 }
44804 else{
44805 const auto a_view=get_data_view_of_data(a).subview(opt_size);
44806 const auto ori_b_view=b; b=b.subview(opt_size);
44807 data_type quot = div_base_no_optimisation(a_view, b);
44808 sub_with_base(a,fast_muti_base(quot,ori_b_view));//already shrink_to_fit ed
44809 return {ubigint{move(quot)},ubigint{move(a)}};
44810 }
44811 }
44812 [[nodiscard]]static divmod_result_t divmod_base(data_view_type a,data_view_type b)noexcept{
44813 array_t<base_type> tmp=a;
44814 return divmod_with_base(tmp,b);
44815 }
44816 //除法分治:阈值
44817 static constexpr auto fast_div_base_threshold=1<<5;
44818 //除法分治:规则化
44819 [[nodiscard]]static auto fast_div_regularisation(data_view_type a,data_view_type b)noexcept{
44820 constexpr auto max_calc_type=min(max(type_info<calc_type>),base_type_mod*base_type_mod-1);
44821 const auto first2=(b.back()*base_type_mod+*(b.rbegin()+1)+1);
44822 ubigint muti=max_calc_type/first2;
44823 ubigint a_after_reg{fast_muti_base(a,muti)};
44824 ubigint b_after_reg{fast_muti_base(b,muti)};
44825 struct result_t{
44826 ubigint a_after_reg;
44827 ubigint b_after_reg;
44828 ubigint muti;
44829 };
44830 return result_t{move(a_after_reg),move(b_after_reg),move(muti)};
44831 }
44832 [[nodiscard]]static divmod_result_t fast_divmod_base(data_view_type a,data_view_type b)noexcept{
44833 if(a.size()<=fast_div_base_threshold)return divmod_base(a,b);
44834 const auto [a_after_reg,b_after_reg,muti]=fast_div_regularisation(a,b);
44835 auto result=fast_divmod_base_impl(a_after_reg,b_after_reg);
44836 result.mod/=muti;
44837 return result;
44838 }
44839 [[nodiscard]]static divmod_result_t fast_divmod_base(const ubigint&a,const ubigint&b)noexcept{
44840 return fast_divmod_base(a.get_data_view(),b.get_data_view());
44841 }
44842 [[nodiscard]]static data_type fast_div_base(data_view_type a,data_view_type b)noexcept{
44843 no_mod_optimisation_of_div(a,b);
44844 if(a.size()<=fast_div_base_threshold)return div_base_no_optimisation(a,b);
44845 const auto [a_after_reg,b_after_reg,muti]=fast_div_regularisation(a,b);
44846 return fast_divmod_base_impl(a_after_reg,b_after_reg).quot._data;
44847 }
44848 static void fast_mod_with_base(data_type&a,data_view_type b)noexcept{
44849 if(a.size()<=fast_div_base_threshold)return mod_with_base(a,b);
44850 const auto [a_after_reg,b_after_reg,muti]=fast_div_regularisation(get_data_view_of_data(a),b);
44851 auto result=fast_divmod_base_impl(a_after_reg,b_after_reg);
44852 result.mod/=muti;
44853 a=move(result.mod._data);
44854 }
44855 [[nodiscard]]static data_type fast_mod_base(data_view_type a,data_view_type b)noexcept{
44856 if(a.size()<=fast_div_base_threshold)return mod_base(a,b);
44857 const auto [a_after_reg,b_after_reg,muti]=fast_div_regularisation(a,b);
44858 auto result=fast_divmod_base_impl(a_after_reg,b_after_reg);
44859 result.mod/=muti;
44860 return move(result.mod._data);
44861 }
44862 //除法分治:递归
44863 [[nodiscard]]static divmod_result_t fast_divmod_base_impl(data_view_type a,data_view_type b)noexcept{
44864 if(compare(a,b)<0)return {ubigint{},ubigint{a}};
44865 if(a.size()<=fast_div_base_threshold)return divmod_base(a,b);
44866 size_t base = (b.size()+1) / 2;
44867 //符合3/2时,进行试商
44868 if(a.size() <= base*3) {
44869 base = to_size_t(b.size() / magic_number::e);
44870 auto a_high = a.subview(base);//不需要re_shrink:subview是舍弃低位,下同
44871 auto b_high = b.subview(base);
44872 //数值优化,这意味着余数不可用(下方的remain确实被舍弃了所以可以这样优化)
44873 no_mod_optimisation_of_div(a_high,b_high);
44874 auto result=fast_divmod_base_impl(a_high, b_high);
44875 auto&ans_base=result.quot._data;auto&remain=result.mod._data;
44876 remain=fast_muti_base(ans_base,b);
44877 while (compare(remain, a) > 0) {
44878 sub_with_base(remain, b);
44879 sub_one_from_base(ans_base);
44880 }
44881 remain=sub_base(a,remain);
44882 return result;
44883 }
44884 //不符合3/2时,进行递归
44885 //选择合适的base长度做分割
44886 if(a.size() > base*4)
44887 base = a.size() / 2;
44888 const auto a_high = a.subview(base);
44889 auto result=fast_divmod_base_impl(a_high, b);
44890 auto&ans_base=result.quot._data;auto&remain=result.mod._data;
44891 ans_base.insert(0,base,base_type{0});
44892 data_type m{note::size(base + remain.size())};
44893 copy_assign[base](note::from(a.data()),note::to(m.data()));
44894 copy_assign[remain.size()](add_const(remain.data()),m.data()+base);
44895 //这里不需要对m进行shrink,因为remain是已经shrink过的
44896 {
44897 auto another_result=fast_divmod_base_impl(m, b);
44898 add_to_base(ans_base, move(another_result.quot._data));
44899 remain=move(another_result.mod._data);
44900 }
44901 return result;
44902 }
44903 [[nodiscard]]static divmod_result_t fast_divmod_base_impl(const data_type&a,data_view_type b)noexcept{
44904 return fast_divmod_base_impl(get_data_view_of_data(a),b);
44905 }
44906 [[nodiscard]]static divmod_result_t fast_divmod_base_impl(const data_type&a,const data_type&b)noexcept{
44907 return fast_divmod_base_impl(get_data_view_of_data(a),get_data_view_of_data(b));
44908 }
44909 [[nodiscard]]static divmod_result_t fast_divmod_base_impl(const ubigint&a,const ubigint&b)noexcept{
44910 return fast_divmod_base_impl(a._data,b._data);
44911 }
44912public:
44913 //friend abs
44914 [[nodiscard]]friend ubigint abs(const ubigint& a)noexcept{
44915 return a;
44916 }
44917 [[nodiscard]]friend ubigint&& abs(ubigint&& a)noexcept{
44918 return move(a);
44919 }
44920 //friend is_negative
44921 [[nodiscard]]friend bool is_negative(const ubigint&)noexcept{
44922 return false;
44923 }
44924 //friend to_size_t
44925 [[nodiscard]]friend size_t to_size_t(const ubigint& a)noexcept{
44926 return a.convert_to<size_t>();
44927 }
44928 //operator+
44929 [[nodiscard]]ubigint operator+(const ubigint& other)const&noexcept{
44930 return ubigint{add_base(get_data_view(), other.get_data_view())};
44931 }
44932 //operator-
44933 [[nodiscard]]ubigint operator-(const ubigint& other)const&noexcept{
44934 const auto this_view = get_data_view();
44935 const auto other_view = other.get_data_view();
44936 if(compare(this_view, other_view)<0)
44937 return ubigint{};
44938 return ubigint{sub_base(this_view, other_view)};
44939 }
44940 //operator*
44941 [[nodiscard]]ubigint operator*(const ubigint& other)const&noexcept{
44942 const auto this_view = get_data_view();
44943 const auto other_view = other.get_data_view();
44944 return ubigint{fast_muti_base(this_view, other_view)};
44945 }
44946 //operator/
44947 [[nodiscard]]ubigint operator/(const ubigint& other)const&noexcept{
44948 const auto other_view = other.get_data_view();
44949 if(other_view.empty())return ubigint{};
44950 const auto this_view = get_data_view();
44951 if(this_view.size() < other_view.size())return ubigint{};
44952 return ubigint{fast_div_base(this_view, other_view)};
44953 }
44954 //operator%
44955 [[nodiscard]]ubigint operator%(const ubigint& other)const&noexcept{
44956 const auto other_view = other.get_data_view();
44957 if(other_view.empty())return ubigint{};
44958 const auto this_view = get_data_view();
44959 if(this_view.size() < other_view.size())return*this;
44960 return ubigint{fast_mod_base(this_view, other_view)};
44961 }
44962 //friend divmod
44963 [[nodiscard]]friend divmod_result_t divmod(const ubigint& a,const ubigint& b)noexcept{
44964 const auto b_view = b.get_data_view();
44965 if(b_view.empty())return {};
44966 const auto a_view = a.get_data_view();
44967 if(a_view.size() < b_view.size())return {ubigint{},a};
44968 return fast_divmod_base(a_view,b_view);
44969 }
44970 [[nodiscard]]friend divmod_result_t divmod(ubigint&& a,const ubigint& b)noexcept{
44971 const auto b_view = b.get_data_view();
44972 if(b_view.empty())return {};
44973 const auto a_view = a.get_data_view();
44974 if(a_view.size() < b_view.size())return {ubigint{},move(a)};
44975 if(a_view.size()<=fast_div_base_threshold)//若不是很大的数
44976 return divmod_with_base(a._data,b_view);//直接使用a的内存而避免不必要的分配
44977 else
44978 return fast_divmod_base(a_view,b_view);
44979 }
44980 //left_shift_in_base_type
44981 template<integer_type T>
44982 [[nodiscard]]ubigint left_shift_in_base_type(T n)const&noexcept{
44983 if constexpr(signed_type<T>){
44984 if(is_negative(n))return right_shift_in_base_type(abs(n));
44985 else return left_shift_in_base_type(abs(n));
44986 }
44987 else{
44988 if(!*this)return ubigint{};
44989 const auto oldsize=_data.size();
44990 const auto newsize_diff=to_size_t(n);
44991 const auto newsize=oldsize+newsize_diff;
44992 data_type aret{note::size(newsize)};
44993 if(newsize_diff)
44994 copy_assign[newsize_diff](note::to(aret.data()),base_type{0});
44995 copy_assign[oldsize](aret.data()+newsize_diff,_data.data());
44996 return ubigint{move(aret)};
44997 }
44998 }
44999 //operator<<
45000 template<integer_type T>
45001 [[nodiscard]]ubigint operator<<(T n)const&noexcept{
45002 if constexpr(signed_type<T>){
45003 if(is_negative(n))return*this>>abs(n);
45004 else return*this<<abs(n);
45005 }
45006 else{
45007 if(!*this)return ubigint{};
45008 const auto oldsize=_data.size();
45009 const auto newsize_diff=to_size_t(n/bitnum_of(base_type));
45010 const auto newsize=oldsize+newsize_diff;
45011 data_type aret{note::size(newsize)};
45012 if(newsize_diff){
45013 copy_assign[newsize_diff](note::to(aret.data()),base_type{0});
45014 n%=bitnum_of(base_type);
45015 }
45016 if(n){
45017 size_t i=0;
45018 const auto end=oldsize;
45019 const auto offset=to_size_t(n);
45020 const auto another_offset=bitnum_of(base_type)-offset;
45021 base_type carry=0;
45022 for(;i<end;++i){
45023 const auto tmp=_data[i];
45024 aret[i+newsize_diff]=(tmp<<offset)|carry;
45025 carry=tmp>>another_offset;
45026 }
45027 if(carry)aret.push_back(carry);
45028 }
45029 else
45030 copy_assign[oldsize](aret.data()+newsize_diff,_data.data());
45031 return ubigint{move(aret)};
45032 }
45033 }
45034 //right_shift_in_base_type
45035 template<integer_type T>
45036 [[nodiscard]]ubigint right_shift_in_base_type(T n)const&noexcept{
45037 if constexpr(signed_type<T>){
45038 if(is_negative(n))return left_shift_in_base_type(abs(n));
45039 else return right_shift_in_base_type(abs(n));
45040 }
45041 else{
45042 if(!*this)return ubigint{};
45043 const auto oldsize=_data.size();
45044 const auto newsize_diff=to_size_t(n);
45045 const auto newsize=oldsize-newsize_diff;
45046 if(newsize_diff>=oldsize)return ubigint{};
45047 data_type aret{note::size(newsize)};
45048 copy_assign[newsize](aret.data(),_data.data()+newsize_diff);
45049 return ubigint{move(aret)};
45050 }
45051 }
45052 //operator>>
45053 template<integer_type T>
45054 [[nodiscard]]ubigint operator>>(T n)const&noexcept{
45055 if constexpr(signed_type<T>){
45056 if(is_negative(n))return*this<<abs(n);
45057 else return*this>>abs(n);
45058 }
45059 else{
45060 if(!*this)return ubigint{};
45061 const auto oldsize=_data.size();
45062 const auto newsize_diff=to_size_t(n/bitnum_of(base_type));
45063 const auto newsize=oldsize-newsize_diff;
45064 if(newsize_diff>=oldsize)return ubigint{};
45065 data_type aret{note::size(newsize)};
45066 if(newsize_diff)
45067 n%=bitnum_of(base_type);
45068 if(n){
45069 size_t i=oldsize;
45070 const auto offset=to_size_t(n);
45071 const auto another_offset=bitnum_of(base_type)-offset;
45072 base_type carry=0;
45073 for(;i--;){
45074 const auto tmp=_data[i];
45075 aret[i-newsize_diff]=(tmp>>offset)|carry;
45076 carry=tmp<<another_offset;
45077 }
45078 shrink_to_fit(aret);
45079 }
45080 else
45081 copy_assign[newsize](aret.data(),_data.data()+newsize_diff);
45082 return ubigint{move(aret)};
45083 }
45084 }
45085 //operator+=
45086 ubigint& operator+=(const ubigint& other)&noexcept{
45087 //using add_to_base to avoid new alloc
45088 add_to_base(_data,other._data);
45089 return*this;
45090 }
45091 template<unsigned_basic_integer_type T>
45092 ubigint& operator+=(T other)&noexcept{
45093 //using add_to_base to avoid new alloc
45094 add_to_base(_data,other);
45095 return*this;
45096 }
45097 template<unsigned_basic_integer_type T>
45098 [[nodiscard]]ubigint&& operator+(T&&other)&&noexcept{
45099 //using add_to_base to avoid new alloc
45100 add_to_base(_data,other);
45101 return move(*this);
45102 }
45103 //operator-=
45104 ubigint& operator-=(const ubigint& other)&noexcept{
45105 const auto this_view = get_data_view();
45106 const auto other_view = other.get_data_view();
45107 if(compare(this_view, other_view)<0)
45108 _data.clear();
45109 else
45110 sub_with_base(_data,other_view);//already shrink_to_fit ed
45111 return*this;
45112 }
45113 //operator*=
45114 ubigint& operator*=(const ubigint& other)&noexcept{
45115 //as muti always need new alloc, so we use just use operator*.
45116 *this = *this * other;
45117 return*this;
45118 }
45119 //operator/=
45120 ubigint& operator/=(const ubigint& other)&noexcept{
45121 //as div always need new alloc, so we use just use operator/.
45122 *this = *this / other;
45123 return*this;
45124 }
45125 //operator%=
45126 ubigint& operator%=(const ubigint& other)&noexcept{
45127 //using mod_with_base to avoid new alloc
45128 const auto other_view = other.get_data_view();
45129 if(other_view.empty()){
45130 _data.clear();
45131 return*this;
45132 }
45133 const auto this_view = get_data_view();
45134 if(this_view.size() < other_view.size())return*this;
45135 fast_mod_with_base(_data,other_view);
45136 return*this;
45137 }
45138 //operator<<=
45139 template<integer_type T>
45140 inline ubigint& operator<<=(T n)&noexcept{
45141 if constexpr(signed_type<T>){
45142 if(is_negative(n))return*this>>=abs(n);
45143 else return*this<<=abs(n);
45144 }
45145 else{
45146 if(!*this)return*this;
45147 const auto oldsize=_data.size();
45148 const auto newsize_diff=to_size_t(n/bitnum_of(base_type));
45149 const auto newsize=oldsize+newsize_diff;
45150 if(newsize_diff){
45151 _data.insert(0,newsize_diff,base_type{0});
45152 n%=bitnum_of(base_type);
45153 }
45154 if(n){
45155 auto i=newsize_diff;
45156 const auto end=newsize;
45157 const auto offset=to_size_t(n);
45158 const auto another_offset=bitnum_of(base_type)-offset;
45159 base_type carry=0;
45160 for(;i<end;++i){
45161 const auto tmp=_data[i];
45162 _data[i]=(tmp<<offset)|carry;
45163 carry=tmp>>another_offset;
45164 }
45165 if(carry)_data.push_back(carry);
45166 }
45167 return*this;
45168 }
45169 }
45170 //operator>>=
45171 template<integer_type T>
45172 inline ubigint& operator>>=(T n)&noexcept{
45173 if constexpr(signed_type<T>){
45174 if(is_negative(n))return*this<<=abs(n);
45175 else return*this>>=abs(n);
45176 }
45177 else{
45178 if(!*this)return*this;
45179 const auto oldsize=_data.size();
45180 const auto newsize_diff=to_size_t(n/bitnum_of(base_type));
45181 const auto newsize=oldsize-newsize_diff;
45182 if(newsize_diff){
45183 if(newsize_diff>=oldsize)return*this=zero;
45184 _data.forward_resize(newsize);
45185 n%=bitnum_of(base_type);
45186 }
45187 if(n){
45188 auto i=newsize;
45189 const auto offset=to_size_t(n);
45190 const auto another_offset=bitnum_of(base_type)-offset;
45191 base_type carry=0;
45192 for(;i--;){
45193 const auto tmp=_data[i];
45194 _data[i]=(tmp>>offset)|carry;
45195 carry=tmp<<another_offset;
45196 }
45197 shrink_to_fit();
45198 }
45199 return*this;
45200 }
45201 }
45202 //operatorX for rvalue
45203 template<unsigned_integer_type T>
45204 [[nodiscard]]ubigint&& operator+(T&&n)&&noexcept{
45205 return move(*this+=forward<T>(n));
45206 }
45207 template<unsigned_integer_type T>
45208 [[nodiscard]]ubigint&& operator-(T&&n)&&noexcept{
45209 return move(*this-=forward<T>(n));
45210 }
45211 template<unsigned_integer_type T>
45212 [[nodiscard]]ubigint&& operator*(T&&n)&&noexcept{
45213 return move(*this*=forward<T>(n));
45214 }
45215 template<unsigned_integer_type T>
45216 [[nodiscard]]ubigint&& operator/(T&&n)&&noexcept{
45217 return move(*this/=forward<T>(n));
45218 }
45219 template<unsigned_integer_type T>
45220 [[nodiscard]]ubigint&& operator%(T&&n)&&noexcept{
45221 return move(*this%=forward<T>(n));
45222 }
45223 template<integer_type T>
45224 [[nodiscard]]ubigint&& operator<<(T&&n)&&noexcept{
45225 return move(*this<<=n);
45226 }
45227 template<integer_type T>
45228 [[nodiscard]]ubigint&& operator>>(T&&n)&&noexcept{
45229 return move(*this>>=n);
45230 }
45231 //operator!
45232 [[nodiscard]]bool operator!()const noexcept{
45233 return get_data_view().empty();
45234 }
45235 [[nodiscard]]explicit operator bool()const noexcept{
45236 return !operator!();
45237 }
45238 //operator++
45239 ubigint& operator++()&noexcept{
45240 add_one_to_base();
45241 return*this;
45242 }
45243 [[nodiscard]]ubigint operator++(int)&noexcept{
45244 auto tmp = *this;
45245 ++*this;
45246 return tmp;
45247 }
45248 //operator--
45249 ubigint& operator--()&noexcept{
45250 sub_one_from_base();
45251 return*this;
45252 }
45253 [[nodiscard]]ubigint operator--(int)&noexcept{
45254 auto tmp = *this;
45255 --*this;
45256 return tmp;
45257 }
45258 //friend countr_zero
45259 [[nodiscard]]friend size_t countr_zero(const ubigint& x)noexcept{
45260 size_t aret=0;
45261 auto i=x._data.begin();
45262 const auto end=x._data.end();
45263 while(i!=end){
45264 if(!*i)
45265 aret+=bitnum_of(base_type);
45266 else{
45267 aret+=countr_zero(*i);
45268 break;
45269 }
45270 ++i;
45271 }
45272 return aret;
45273 }
45274 //bit_at
45275 [[nodiscard]]bit_type bit_at(size_t n)noexcept{
45276 const auto reslut=divmod(n,bitnum_of(base_type));
45277 const auto index=reslut.quot;
45278 if(index>=_data.size())return false;
45279 return _data[index]&(1u<<reslut.mod);
45280 }
45281 //friend get_bitnum
45282 [[nodiscard]]friend size_t get_bitnum(const ubigint& x)noexcept{
45283 auto&data=x._data;
45284 if(data.empty())return 0;
45285 return data.size()*bitnum_of(base_type)-countl_zero(data.back());
45286 }
45287 //memory_usage
45288 [[nodiscard]]force_inline size_t memory_usage()const noexcept{
45289 return _data.size_in_byte();
45290 }
45291 //size_in_byte
45292 [[nodiscard]]force_inline size_t size_in_byte()const noexcept{
45293 return _data.size_in_byte();
45294 }
45295 //size_in_base_type
45296 [[nodiscard]]force_inline size_t size_in_base_type()const noexcept{
45297 return _data.size();
45298 }
45299 //fast_size_method
45300 [[nodiscard]]force_inline size_t fast_size_method()const noexcept{
45301 return _data.size();
45302 }
45303 //row_data
45304 [[nodiscard]]force_inline data_type& row_data()noexcept{
45305 return _data;
45306 }
45307 [[nodiscard]]force_inline const data_type& row_data()const noexcept{
45308 return _data;
45309 }
45310 //friend base_type_num
45311 [[nodiscard]]friend force_inline size_t base_type_num(const ubigint& x)noexcept{
45312 return x._data.size();
45313 }
45314 //friend is_odd
45315 [[nodiscard]]friend bool is_odd(const ubigint& x)noexcept{
45316 return x._data.empty()?false:x._data.front()&1u;
45317 }
45318 //friend is_even
45319 [[nodiscard]]friend bool is_even(const ubigint& x)noexcept{
45320 return !is_odd(x);
45321 }
45322 //hash
45323 [[nodiscard]]force_inline hash_t hash()const noexcept{
45324 return hash_n::hash(_data);
45325 }
45326 //swap_with
45327 force_inline void swap_with(ubigint& other)noexcept{
45328 swap(_data,other._data);
45329 }
45330 //friend swap
45331 friend force_inline void swap(ubigint& a,ubigint& b)noexcept{
45332 a.swap_with(b);
45333 }
45334};
45335
45336template<typename T>
45337concept ubigint_cvref=type_info<remove_cvref<T>> == type_info<ubigint>;
45338
45339template<integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<ubigint>)
45340[[nodiscard]]inline auto operator+(T&&a,ubigint_t&&b)noexcept{
45341 return forward<ubigint_t>(b)+forward<T>(a);
45342}
45343template<unsigned_integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<ubigint>)
45344[[nodiscard]]inline auto operator-(T&&a,ubigint_t&&b)noexcept{
45345 return remove_cvref<T>(ubigint{forward<T>(a)}-forward<ubigint_t>(b));
45346}
45347template<unsigned_integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<ubigint>)
45348[[nodiscard]]inline auto operator*(T&&a,ubigint_t&&b)noexcept{
45349 return forward<ubigint_t>(b)*forward<T>(a);
45350}
45351template<integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<ubigint>)
45352[[nodiscard]]inline auto operator/(T&&a,ubigint_t&&b)noexcept{
45353 const bool sign=is_negative(a);
45354 return copy_as_negative(remove_cvref<T>(ubigint{abs(forward<T>(a))}/forward<ubigint_t>(b)),sign);
45355}
45356template<integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<ubigint>)
45357[[nodiscard]]inline auto operator%(T&&a,ubigint_t&&b)noexcept{
45358 const bool sign=is_negative(a);
45359 return copy_as_negative(remove_cvref<T>(ubigint{abs(forward<T>(a))}%forward<ubigint_t>(b)),sign);
45360}
45361
45363//注入math::arithmetic_type_info_prover
45364namespace base::math{
45365 using namespace bignum_n;
45366 inline ubigint arithmetic_type_info_prover<ubigint>::min()noexcept{
45367 return ubigint{};
45368 }
45369}
45370INTER_NAMESPACE(bignum_n)
45371
45372//file_end
45373
45374#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_body.hpp"
45375#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/bigint.hpp"
45376//bigint.hpp
45377//at namespace elc::defs::bignum_n
45378/*
45379未完成的elc解释器bignum文件
45380由steve02081504与Alex0125设计、编写
45381转载时请在不对此文件做任何修改的同时注明出处
45382项目地址:https://github.com/ELC-lang/ELC
45383*/
45384/*
45385 ,??????????????????????????
45386 ????????????????????????????
45387 ?????????????????????????????+
45388 ?????+++++++++++++++++++++++++
45389 ?????+++++++++++++++++++++++++
45390 ??????++++++++++++++++++++++++
45391 ?????++
45392 ?????+++
45393 ??????+++IIIIIIIIIIIIIIIIII
45394 ?????+++++IIIIIIIIIIIIIIIIII
45395 ?????++++++++++++++++++++++++
45396 ??????+++++++++++++++++++++++:
45397 ?????++
45398 ?????+++
45399 ??????++
45400 ??????????????????????????????II
45401 ??????????????????????????????IIII
45402 ,?????????????????????????????IIIII+
45403 =???++++++++++++++++++++++++++III?
45404 ?++++++++++++++++++++++++++++I+
45405*/
45406class bigint;
45407[[nodiscard]]bigint copy_as_negative(const ubigint&,bool sign=true)noexcept;
45408[[nodiscard]]bigint copy_as_negative(ubigint&&,bool sign=true)noexcept;
45409using math::copy_as_negative;//避免可能的符号覆盖
45410
45411[[nodiscard]]inline bigint operator-(const ubigint&num)noexcept;
45412[[nodiscard]]inline bigint operator-(ubigint&&num)noexcept;
45413
45414class bigint{
45415 bool _is_negative=0;
45416 ubigint _num;
45417
45418 bigint(const ubigint&num,bool is_negative)noexcept:_num(num),_is_negative(is_negative){
45419 if(!_num)_is_negative = false;
45420 }
45421 bigint(ubigint&&num,bool is_negative)noexcept:_num(move(num)),_is_negative(is_negative){
45422 if(!_num)_is_negative = false;
45423 }
45424public:
45425 bigint()noexcept = default;
45426 bigint(const bigint&)noexcept = default;
45427 bigint(bigint&&)noexcept = default;
45428
45429 bigint& operator=(const bigint&)&noexcept = default;
45430 bigint& operator=(bigint&&)&noexcept = default;
45431 template<integer_type T>
45432 bigint(T&&value)noexcept:_is_negative(is_negative(value)),_num(abs(forward<T>(value))){}
45433 template<basic_float_type T>
45434 explicit bigint(T&&value)noexcept:_is_negative(is_negative(value)),_num(abs(forward<T>(value))){}
45435
45436 ~bigint() = default;
45437public:
45438 //operator==
45439 template<integer_type T>
45440 [[nodiscard]]bool operator==(T&&value)const noexcept{
45441 if(_is_negative != is_negative(value))
45442 return false;
45443 return _num == abs(forward<T>(value));
45444 }
45445 //operator<=>
45446 template<integer_type T>
45447 [[nodiscard]]auto operator<=>(T&&value)const noexcept{
45448 if(_is_negative != is_negative(value))
45449 return _is_negative?strong_ordering::less:strong_ordering::greater;
45450 auto tmp = _num <=> abs(forward<T>(value));
45451 if(_is_negative)
45452 tmp=compare.reverse(tmp);
45453 return tmp;
45454 }
45455public:
45456 template<arithmetic_type T>
45457 [[nodiscard]]bool is_safe_convert_to()const noexcept{
45458 if constexpr(type_info<T>!=type_info<bigint>){
45459 if constexpr(has_min<T>){
45460 constexpr auto min_value=min(type_info<T>);
45461 if(min_value)
45462 if(*this<min_value)
45463 return false;
45464 }
45465 if constexpr(has_max<T>){
45466 constexpr auto max_value=max(type_info<T>);
45467 if(*this>max_value)
45468 return false;
45469 }
45470 }
45471 return true;
45472 }
45473 template<arithmetic_type T>
45474 [[nodiscard]]T convert_to()const noexcept{
45475 if constexpr(signed_type<T>)
45476 return copy_as_negative(move(_num).convert_to<to_unsigned_t<T>>(),_is_negative);
45477 else
45478 return _num.convert_to<T>();
45479 }
45480 //explicit operator T
45481 template<arithmetic_type T>
45482 [[nodiscard]]explicit operator T()&&noexcept{
45483 return move(*this).convert_to<T>();
45484 }
45485 template<arithmetic_type T>
45486 [[nodiscard]]explicit operator T()const&noexcept{
45487 return convert_to<T>();
45488 }
45489public:
45490 [[nodiscard]]bigint operator-()const&noexcept{
45491 return {_num,!_is_negative};
45492 }
45493 [[nodiscard]]bigint&& operator-()&&noexcept{
45494 _is_negative=!_is_negative;
45495 return move(*this);
45496 }
45497 //friend abs
45498 [[nodiscard]]friend ubigint abs(const bigint& a)noexcept{
45499 return a._num;
45500 }
45501 [[nodiscard]]friend ubigint&& abs(bigint&& a)noexcept{
45502 return move(a._num);
45503 }
45504 //friend is_negative
45505 [[nodiscard]]friend bool is_negative(const bigint& a)noexcept{
45506 return a._is_negative;
45507 }
45508 //friend copy_as_negative
45509 [[nodiscard]]friend bigint copy_as_negative(const ubigint& a,bool sign)noexcept{
45510 return {a,sign};
45511 }
45512 [[nodiscard]]friend bigint copy_as_negative(ubigint&& a,bool sign)noexcept{
45513 return {move(a),sign};
45514 }
45515 //friend to_size_t
45516 [[nodiscard]]friend size_t to_size_t(const bigint& a)noexcept{
45517 return a.convert_to<size_t>();
45518 }
45519 //operator+
45520 template<integer_type T>
45521 [[nodiscard]]bigint operator+(T&&other)const&noexcept{
45522 if(_is_negative == is_negative(other))
45523 return {_num+abs(forward<T>(other)),_is_negative};
45524 elseif(_is_negative)
45525 return forward<T>(other)-(-*this);
45526 else
45527 return *this-(-forward<T>(other));
45528 }
45529 //operator-
45530 template<integer_type T>
45531 [[nodiscard]]bigint operator-(T&&other)const&noexcept{
45532 const bool sign = _is_negative;
45533 const auto other_sign = is_negative(other);
45534 const auto other_abs = abs(forward<T>(other));
45535 if(_is_negative != other_sign)
45536 return {_num+other_abs,sign};
45537 if(_num < other_abs){
45538 sign=!sign;
45539 return {other_abs-_num,sign};
45540 }
45541 return {_num-other_abs,sign};
45542 }
45543 //operator*
45544 template<integer_type T>
45545 [[nodiscard]]bigint operator*(T&&other)const&noexcept{
45546 const bool sign = _is_negative != is_negative(other);
45547 return bigint{_num*abs(forward<T>(other)),sign};
45548 }
45549 //operator/
45550 template<integer_type T>
45551 [[nodiscard]]bigint operator/(T&&other)const&noexcept{
45552 const bool sign = _is_negative != is_negative(other);
45553 return bigint{_num/abs(forward<T>(other)),sign};
45554 }
45555 //operator%
45556 template<integer_type T>
45557 [[nodiscard]]bigint operator%(T&&other)const&noexcept{
45558 return bigint{_num%abs(forward<T>(other)),_is_negative};
45559 }
45560 //operator<<
45561 template<integer_type T>
45562 [[nodiscard]]bigint operator<<(T n)const&noexcept{
45563 return bigint{_num<<n,_is_negative};
45564 }
45565 //operator>>
45566 template<integer_type T>
45567 [[nodiscard]]bigint operator>>(T n)const&noexcept{
45568 return bigint{_num>>n,_is_negative};
45569 }
45570 //friend operator<< and operator>> for ubigint
45571 [[nodiscard]]friend bigint operator<<(const ubigint& a,const bigint& b)noexcept{
45572 if(b._is_negative)
45573 return a>>b._num;
45574 else
45575 return a<<b._num;
45576 }
45577 [[nodiscard]]friend bigint operator>>(const ubigint& a,const bigint& b)noexcept{
45578 if(b._is_negative)
45579 return a<<b._num;
45580 else
45581 return a>>b._num;
45582 }
45583 //operator+=
45584 template<integer_type T>
45585 bigint& operator+=(T&& other)&noexcept{
45586 if(_is_negative == is_negative(other))
45587 _num+=abs(forward<T>(other));
45588 elseif(_is_negative)
45589 *this = forward<T>(other)-(-move(*this));
45590 else
45591 *this -= -forward<T>(other);
45592 return *this;
45593 }
45594 //operator-=
45595 template<integer_type T>
45596 bigint& operator-=(T&& other)&noexcept{
45597 const auto other_sign = is_negative(other);
45598 const auto other_abs = abs(forward<T>(other));
45599 if(_is_negative == other_sign)
45600 _num+=other_abs;
45601 if(_num < other_abs){
45602 _is_negative=!_is_negative;
45603 _num = other_abs-_num;
45604 }
45605 else
45606 _num-=other_abs;
45607 return*this;
45608 }
45609 //operator*=
45610 template<integer_type T>
45611 bigint& operator*=(T&&other)&noexcept{
45612 _is_negative = _is_negative != is_negative(other);
45613 _num *= abs(forward<T>(other));
45614 return*this;
45615 }
45616 //operator/=
45617 template<integer_type T>
45618 bigint& operator/=(T&&other)&noexcept{
45619 _is_negative = _is_negative != is_negative(other);
45620 _num /= abs(forward<T>(other));
45621 return*this;
45622 }
45623 //operator%=
45624 template<integer_type T>
45625 bigint& operator%=(T&&other)&noexcept{
45626 //_is_negative = _is_negative;
45627 _num %= abs(forward<T>(other));
45628 return*this;
45629 }
45630 //operator<<=
45631 template<integer_type T>
45632 bigint& operator<<=(T n)&noexcept{
45633 _num <<= n;
45634 return*this;
45635 }
45636 //operator>>=
45637 template<integer_type T>
45638 bigint& operator>>=(T n)&noexcept{
45639 _num >>= n;
45640 return*this;
45641 }
45642 //operatorX for rvalue
45643 [[nodiscard]]bigint&& operator+(const bigint& other)&&noexcept{
45644 return move(*this+=other);
45645 }
45646 [[nodiscard]]bigint&& operator-(const bigint& other)&&noexcept{
45647 return move(*this-=other);
45648 }
45649 template<integer_type T>
45650 [[nodiscard]]bigint&& operator*(T&&other)&&noexcept{
45651 return move(*this*=forward<T>(other));
45652 }
45653 template<integer_type T>
45654 [[nodiscard]]bigint&& operator/(T&&other)&&noexcept{
45655 return move(*this/=forward<T>(other));
45656 }
45657 template<integer_type T>
45658 [[nodiscard]]bigint&& operator%(T&&other)&&noexcept{
45659 return move(*this%=forward<T>(other));
45660 }
45661 template<integer_type T>
45662 [[nodiscard]]bigint&& operator<<(T&&other)&&noexcept{
45663 return move(*this<<=forward<T>(other));
45664 }
45665 template<integer_type T>
45666 [[nodiscard]]bigint&& operator>>(T&&other)&&noexcept{
45667 return move(*this>>=forward<T>(other));
45668 }
45669 [[nodiscard]]bigint&& operator+(bigint&& other)const&noexcept{
45670 return move(move(other)+*this);
45671 }
45672 [[nodiscard]]bigint&& operator-(bigint&& other)const&noexcept{
45673 return move((-move(other))+*this);
45674 }
45675 [[nodiscard]]bigint&& operator*(bigint&& other)const&noexcept{
45676 return move(move(other)**this);
45677 }
45678 //operator!
45679 [[nodiscard]]bool operator!()const noexcept{
45680 return!_num;
45681 }
45682 [[nodiscard]]explicit operator bool()const noexcept{
45683 return !operator!();
45684 }
45685 //operator++
45686 bigint& operator++()&noexcept{
45687 if(_is_negative){
45688 --_num;
45689 if(!_num)
45690 _is_negative=false;
45691 }
45692 else
45693 ++_num;
45694 return*this;
45695 }
45696 [[nodiscard]]bigint operator++(int)&noexcept{
45697 auto tmp = *this;
45698 ++*this;
45699 return tmp;
45700 }
45701 //operator--
45702 bigint& operator--()&noexcept{
45703 if(!_is_negative && !_num)
45704 _is_negative=true;
45705 if(_is_negative)
45706 ++_num;
45707 else
45708 --_num;
45709 return*this;
45710 }
45711 [[nodiscard]]bigint operator--(int)&noexcept{
45712 auto tmp = *this;
45713 --*this;
45714 return tmp;
45715 }
45716 //friend is_odd
45717 friend [[nodiscard]] bool is_odd(const bigint& n)noexcept{
45718 return is_odd(n._num);
45719 }
45720 //friend is_even
45721 friend [[nodiscard]] bool is_even(const bigint& n)noexcept{
45722 return is_even(n._num);
45723 }
45724 //hash
45725 [[nodiscard]]force_inline hash_t hash()const noexcept{
45726 const auto tmp = hash_n::hash(_num)._value;
45727 return hash_t{_is_negative?tmp*7u:tmp};
45728 }
45729 //swap_with
45730 void swap_with(bigint& other)noexcept{
45731 swap(_is_negative,other._is_negative);
45732 swap(_num,other._num);
45733 }
45734 //friend swap
45735 friend force_inline void swap(bigint& a,bigint& b)noexcept{
45736 a.swap_with(b);
45737 }
45738};
45739
45740[[nodiscard]]inline bigint operator-(const ubigint& num)noexcept{
45741 return copy_as_negative(num);
45742}
45743[[nodiscard]]inline bigint operator-(ubigint&& num)noexcept{
45744 return copy_as_negative(move(num));
45745}
45746
45747template<typename T>
45748concept bigint_cvref=type_info<remove_cvref<T>> == type_info<bigint>;
45749
45750template<integer_type T,bigint_cvref bigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45751[[nodiscard]]inline auto operator+(T&&a,bigint_t&&b)noexcept{
45752 return forward<bigint_t>(b)+forward<T>(a);
45753}
45754template<integer_type T,bigint_cvref bigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45755[[nodiscard]]inline auto operator-(T&&a,bigint_t&&b)noexcept{
45756 return -forward<bigint_t>(b)+forward<T>(a);
45757}
45758template<integer_type T,bigint_cvref bigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45759[[nodiscard]]inline auto operator*(T&&a,bigint_t&&b)noexcept{
45760 return forward<bigint_t>(b)*forward<T>(a);
45761}
45762template<integer_type T,bigint_cvref bigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45763[[nodiscard]]inline auto operator/(T&&a,bigint_t&&b)noexcept{
45764 const bool sign=is_negative(a) != is_negative(b);
45765 return copy_as_negative(remove_cvref<T>(bigint{abs(forward<T>(a))}/forward<bigint_t>(b)),sign);
45766}
45767template<integer_type T,bigint_cvref bigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45768[[nodiscard]]inline auto operator%(T&&a,bigint_t&&b)noexcept{
45769 const bool sign=is_negative(a);
45770 return copy_as_negative(remove_cvref<T>(bigint{abs(forward<T>(a))}%forward<bigint_t>(b)),sign);
45771}
45772
45773template<signed_integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45774[[nodiscard]]inline auto operator-(T&&a,ubigint_t&&b)noexcept{
45775 return bigint{forward<T>(a)}-forward<ubigint_t>(b);
45776}
45777template<signed_integer_type T,ubigint_cvref ubigint_t> requires(type_info<remove_cvref<T>> != type_info<bigint>)
45778[[nodiscard]]inline auto operator*(T&&a,ubigint_t&&b)noexcept{
45779 return bigint{forward<T>(a)}*forward<ubigint_t>(b);
45780}
45781
45782//file_end
45783
45784#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_body.hpp"
45785#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/ubigfloat.hpp"
45786//ubigfloat.hpp
45787//at namespace elc::defs::bignum_n
45788/*
45789未完成的elc解释器bignum文件
45790由steve02081504与Alex0125设计、编写
45791转载时请在不对此文件做任何修改的同时注明出处
45792项目地址:https://github.com/ELC-lang/ELC
45793*/
45794/*
45795 ,??????????????????????????
45796 ????????????????????????????
45797 ?????????????????????????????+
45798 ?????+++++++++++++++++++++++++
45799 ?????+++++++++++++++++++++++++
45800 ??????++++++++++++++++++++++++
45801 ?????++
45802 ?????+++
45803 ??????+++IIIIIIIIIIIIIIIIII
45804 ?????+++++IIIIIIIIIIIIIIIIII
45805 ?????++++++++++++++++++++++++
45806 ??????+++++++++++++++++++++++:
45807 ?????++
45808 ?????+++
45809 ??????++
45810 ??????????????????????????????II
45811 ??????????????????????????????IIII
45812 ,?????????????????????????????IIIII+
45813 =???++++++++++++++++++++++++++III?
45814 ?++++++++++++++++++++++++++++I+
45815*/
45816class ubigfloat{
45817 ubigint _numerator;
45818 ubigint _denominator=1u;
45819public:
45820 //constructors
45821 ubigfloat()noexcept=default;
45822 ubigfloat(const ubigfloat& other)noexcept=default;
45823 ubigfloat(ubigfloat&& other)noexcept=default;
45824 ubigfloat& operator=(const ubigfloat& other)&noexcept=default;
45825 ubigfloat& operator=(ubigfloat&& other)&noexcept=default;
45826
45827 template<unsigned_integer_type T>
45828 ubigfloat(T&&num)noexcept:_numerator(forward<T>(num)){}
45829 template<basic_float_type T>
45830 ubigfloat(T num)noexcept{
45831 if(isNaN(num))return;
45832 //将一个浮点类型无损的转换为两个bigint相除
45833 if(isInf(num)){
45834 _numerator = 1u;
45835 _denominator = zero;
45836 return;
45837 }
45838 if(is_negative(num))num = -num;
45839 const auto info=get_precision_and_exponent(num);
45840 if(info.exponent<0){//小数,有猜测价值
45841 //优先进行猜测以处理近似的简单分数
45842 const auto divide=to_divide(num);
45843 if(divide){
45844 _numerator = (ubigint)divide.numerator;
45845 _denominator = (ubigint)divide.denominator;
45846 return;
45847 }
45848 }
45849 _numerator = info.precision;
45850 _denominator = 1u;
45851 if(info.exponent){
45852 if(info.exponent>0)
45853 _numerator<<=info.exponent;
45854 else
45855 _denominator<<=abs(info.exponent);
45856 }
45857 simplify();
45858 }
45859public:
45860 template<arithmetic_type T>
45861 [[nodiscard]]bool is_safe_convert_to()const noexcept{
45862 if constexpr(type_info<T>!=type_info<ubigfloat>){
45863 if constexpr(has_min<T>){
45864 constexpr auto min_value=min(type_info<T>);
45865 if(min_value)
45866 if(*this<min_value)
45867 return false;
45868 }
45869 if constexpr(has_max<T>){
45870 constexpr auto max_value=max(type_info<T>);
45871 if(*this>max_value)
45872 return false;
45873 }
45874 }
45875 if constexpr(integer_type<T>)
45876 if(_numerator%_denominator)
45877 return false;
45878 return true;
45879 }
45880 template<arithmetic_type T>
45881 [[nodiscard]]T convert_to()&&noexcept{//只对于右值,便于编写。
45882 //左值版本只需要创建一个临时变量,然后调用右值版本即可。
45883 if constexpr(integer_type<T>)
45884 return trunc(move(*this)).convert_to<T>();
45885 elseif constexpr(type_info<T>!=type_info<ubigfloat>){//浮点数
45886 if(!_denominator)
45887 if constexpr(has_inf<T>)
45889 else
45891
45892 constexpr auto precision_base_bitnum = bitnum_of(float_precision_base_t<T>);
45893 //将大分数转换为合适的指数和基数的组合
45894 signed_specific_size_fast_t<max(sizeof(float_exponent_t<T>),sizeof(ptrdiff_t))> exp=0;
45895 //将分子分母的指数部分提取出来
45896 {
45897 const auto tmp=countr_zero(_numerator);
45898 _numerator>>=tmp;
45899 exp+=tmp;
45900 }
45901 {
45902 const auto tmp=countr_zero(_denominator);
45903 _denominator>>=tmp;
45904 exp-=tmp;
45905 }
45906 //将精度调整到T的精度,获取有精度损失但仍然可能过精的数
45907 {
45908 auto result=divmod(_numerator,_denominator);//同时获取商和余数
45909 while(result.mod && !(result.quot>>precision_base_bitnum)){
45910 _numerator<<=precision_base_bitnum;//扩大数字来容纳可能在除法中产生的数
45911 exp-=precision_base_bitnum;//指数相应的减少
45912 result=divmod(_numerator,_denominator);
45913 }
45914 _numerator=move(result.quot);//有损舍入精度
45915 const auto tmp=countr_zero(_numerator);
45916 _numerator>>=tmp;
45917 exp+=tmp;
45918 }
45919 {
45920 //对多余的精度进行舍入,仍然,这是可能有损的
45921 const auto bitnum_now=get_bitnum(_numerator);
45922 const ptrdiff_t diff=bitnum_now-bitnum_of(basic_environment::float_precision_base_t<T>);
45923 if(diff>0){
45924 _numerator>>=diff;
45925 ++_numerator;
45926 exp+=diff;
45927 }
45928 }
45929 {
45930 //大数转换为基础类型
45931 const auto num=_numerator.convert_to<float_precision_base_t<T>>();
45932 //num与exp满足关系:num*BIT_POSSIBILITY^exp≈原始数
45933
45934 //现在我们有了一个合适的基数和合适的指数!
45935 //接下来只需要将它们转换为T即可
45936 return make_float<T>(num,float_exponent_t<T>(exp));
45937 }
45938 }
45939 else
45940 return move(*this);
45941 }
45942 template<arithmetic_type T>
45943 [[nodiscard]]T convert_to()const&noexcept{
45944 if constexpr(integer_type<T>)
45945 return trunc(*this).convert_to<T>();
45946 else
45947 return ubigfloat(*this).convert_to<T>();
45948 }
45949 //explicit operator T
45950 template<arithmetic_type T>
45951 [[nodiscard]]explicit operator T()&&noexcept{
45952 return move(*this).convert_to<T>();
45953 }
45954 template<arithmetic_type T>
45955 [[nodiscard]]explicit operator T()const&noexcept{
45956 return convert_to<T>();
45957 }
45958private:
45959 ubigfloat(ubigint&& numerator, ubigint&& denominator)noexcept:
45960 _numerator(move(numerator)),
45961 _denominator(move(denominator))
45962 {}
45963 ubigfloat(const ubigint& numerator, const ubigint& denominator)noexcept:
45964 _numerator(numerator),
45965 _denominator(denominator)
45966 {}
45967public:
45968 //build_from_numerator_and_denominator
45969 static ubigfloat build_from_numerator_and_denominator(const ubigint& numerator,const ubigint& denominator)noexcept{
45970 return ubigfloat{numerator,denominator};
45971 }
45972 //friend abs
45973 [[nodiscard]]friend const ubigfloat& abs(const ubigfloat& a)noexcept{
45974 return a;
45975 }
45976 [[nodiscard]]friend ubigfloat abs(ubigfloat& a)noexcept{
45977 return a;
45978 }
45979 [[nodiscard]]friend ubigfloat&& abs(ubigfloat&& a)noexcept{
45980 return move(a);
45981 }
45982 //friend is_negative
45983 [[nodiscard]]friend bool is_negative(const ubigfloat&)noexcept{
45984 return false;
45985 }
45986 //friend reciprocal
45987 [[nodiscard]]friend ubigfloat reciprocal(const ubigfloat& a)noexcept{
45988 return ubigfloat{a._denominator,a._numerator};
45989 }
45990 [[nodiscard]]friend ubigfloat&& reciprocal(ubigfloat&& a)noexcept{
45991 return swap(a._denominator,a._numerator),move(a);
45992 }
45993 //friend get_numerator
45994 [[nodiscard]]friend const ubigint& get_numerator(const ubigfloat& a)noexcept{
45995 return a._numerator;
45996 }
45997 [[nodiscard]]friend ubigint&& get_numerator(ubigfloat&& a)noexcept{
45998 return move(a._numerator);
45999 }
46000 [[nodiscard]]friend ubigint& get_numerator_as_ref(ubigfloat& a)noexcept{
46001 return a._numerator;
46002 }
46003 //friend get_denominator
46004 [[nodiscard]]friend const ubigint& get_denominator(const ubigfloat& a)noexcept{
46005 return a._denominator;
46006 }
46007 [[nodiscard]]friend ubigint&& get_denominator(ubigfloat&& a)noexcept{
46008 return move(a._denominator);
46009 }
46010 [[nodiscard]]friend ubigint& get_denominator_as_ref(ubigfloat& a)noexcept{
46011 return a._denominator;
46012 }
46013 //friend isNaN
46014 [[nodiscard]]friend constexpr bool isNaN(const ubigfloat&)noexcept{
46015 return false;
46016 }
46017 //friend isInf
46018 [[nodiscard]]friend bool isInf(const ubigfloat&a)noexcept{
46019 return!a._denominator;
46020 }
46021 //friend trunc
46022 [[nodiscard]]friend ubigint trunc(const ubigfloat& a)noexcept{
46023 return a._numerator/a._denominator;
46024 }
46025 [[nodiscard]]friend ubigint trunc(ubigfloat&& a)noexcept{
46026 return move(a._numerator)/move(a._denominator);
46027 }
46028 //friend split
46029 template<class=void>
46030 struct split_result_t_base{
46031 ubigint integer;
46032 ubigfloat fraction;
46033 };
46034 typedef split_result_t_base<> split_result_t;
46035 [[nodiscard]]friend auto split(const ubigfloat& a)noexcept{
46036 auto result=divmod(a._numerator,a._denominator);
46037 return split_result_t{move(result.quot),ubigfloat{move(result.mod),a._denominator}};
46038 }
46039 [[nodiscard]]friend auto split(ubigfloat&& a)noexcept{
46040 auto result=divmod(move(a._numerator),a._denominator);
46041 return split_result_t{move(result.quot),ubigfloat{move(result.mod),move(a._denominator)}};
46042 }
46043 //friend trunc_with_sub
46044 [[nodiscard]]friend ubigint trunc_with_sub(ubigfloat& a)noexcept{
46045 auto result=divmod(move(a._numerator),a._denominator);
46046 a._numerator=move(result.mod);
46047 return result.quot;
46048 }
46049 //friend to_size_t
46050 [[nodiscard]]friend size_t to_size_t(const ubigfloat& a)noexcept{
46051 return to_size_t(trunc(a));
46052 }
46053 [[nodiscard]]friend size_t to_size_t(ubigfloat&& a)noexcept{
46054 return to_size_t(trunc(move(a)));
46055 }
46056 //operator+
46057 [[nodiscard]]ubigfloat operator+(const ubigfloat& other)const&noexcept{
46058 auto numerator = _numerator * other._denominator + other._numerator * _denominator;
46059 auto denominator = _denominator * other._denominator;
46060 return ubigfloat{move(numerator), move(denominator)};
46061 }
46062 template<unsigned_integer_type T>
46063 [[nodiscard]]ubigfloat operator+(T&& other)const&noexcept{
46064 auto numerator = _numerator + forward<T>(other) * _denominator;
46065 return ubigfloat{move(numerator), _denominator};
46066 }
46067 template<signed_integer_type T>
46068 [[nodiscard]]ubigfloat operator+(T&& other)const&noexcept{
46069 if(is_negative(other))
46070 return *this - abs(forward<T>(other));
46071 else
46072 return *this + abs(forward<T>(other));
46073 }
46074 //operator-
46075 [[nodiscard]]ubigfloat operator-(const ubigfloat& other)const&noexcept{
46076 auto numerator = _numerator * other._denominator - other._numerator * _denominator;
46077 auto denominator = _denominator * other._denominator;
46078 return ubigfloat{move(numerator), move(denominator)};
46079 }
46080 template<unsigned_integer_type T>
46081 [[nodiscard]]ubigfloat operator-(T&& other)const&noexcept{
46082 auto numerator = _numerator - forward<T>(other) * _denominator;
46083 return ubigfloat{move(numerator), _denominator};
46084 }
46085 template<signed_integer_type T>
46086 [[nodiscard]]ubigfloat operator-(T&& other)const&noexcept{
46087 if(is_negative(other))
46088 return *this + abs(forward<T>(other));
46089 else
46090 return *this - abs(forward<T>(other));
46091 }
46092 //operator*
46093 [[nodiscard]]ubigfloat operator*(const ubigfloat& other)const&noexcept{
46094 auto numerator = _numerator * other._numerator;
46095 auto denominator = _denominator * other._denominator;
46096 return ubigfloat{move(numerator), move(denominator)};
46097 }
46098 template<unsigned_integer_type T>
46099 [[nodiscard]]ubigfloat operator*(T&& other)const&noexcept{
46100 auto numerator = _numerator * forward<T>(other);
46101 return ubigfloat{move(numerator), _denominator};
46102 }
46103 //operator/
46104 [[nodiscard]]ubigfloat operator/(const ubigfloat& other)const&noexcept{
46105 auto numerator = _numerator * other._denominator;
46106 auto denominator = _denominator * other._numerator;
46107 return ubigfloat{move(numerator), move(denominator)};
46108 }
46109 template<unsigned_integer_type T>
46110 [[nodiscard]]ubigfloat operator/(T&& other)const&noexcept{
46111 auto denominator = _denominator * forward<T>(other);
46112 return ubigfloat{_numerator, move(denominator)};
46113 }
46114 //operator+=
46115 ubigfloat& operator+=(const ubigfloat& other)&noexcept{
46116 _numerator = _numerator * other._denominator + other._numerator * _denominator;
46117 _denominator *= other._denominator;
46118 return*this;
46119 }
46120 template<unsigned_integer_type T>
46121 ubigfloat& operator+=(T&& other)&noexcept{
46122 _numerator += forward<T>(other) * _denominator;
46123 return*this;
46124 }
46125 template<signed_integer_type T>
46126 ubigfloat& operator+=(T&& other)&noexcept{
46127 if(is_negative(other))
46128 return*this -= abs(forward<T>(other));
46129 else
46130 return*this += abs(forward<T>(other));
46131 }
46132 //operator-=
46133 ubigfloat& operator-=(const ubigfloat& other)&noexcept{
46134 _numerator = _numerator * other._denominator - other._numerator * _denominator;
46135 _denominator *= other._denominator;
46136 return*this;
46137 }
46138 template<unsigned_integer_type T>
46139 ubigfloat& operator-=(T&& other)&noexcept{
46140 _numerator -= forward<T>(other) * _denominator;
46141 return*this;
46142 }
46143 template<signed_integer_type T>
46144 ubigfloat& operator-=(T&& other)&noexcept{
46145 if(is_negative(other))
46146 return*this += abs(forward<T>(other));
46147 else
46148 return*this -= abs(forward<T>(other));
46149 }
46150 //operator*=
46151 ubigfloat& operator*=(const ubigfloat& other)&noexcept{
46152 _numerator *= other._numerator;
46153 _denominator *= other._denominator;
46154 return*this;
46155 }
46156 template<unsigned_integer_type T>
46157 ubigfloat& operator*=(T&& other)&noexcept{
46158 _numerator *= forward<T>(other);
46159 return*this;
46160 }
46161 //operator/=
46162 ubigfloat& operator/=(const ubigfloat& other)&noexcept{
46163 _numerator *= other._denominator;
46164 _denominator *= other._numerator;
46165 return*this;
46166 }
46167 template<unsigned_integer_type T>
46168 ubigfloat& operator/=(T&& other)&noexcept{
46169 _denominator *= forward<T>(other);
46170 return*this;
46171 }
46172 //operator==
46173 [[nodiscard]]bool operator==(const ubigfloat& other)const noexcept{
46174 return _numerator * other._denominator == other._numerator * _denominator;
46175 }
46176 template<integer_type T>
46177 [[nodiscard]]bool operator==(T&& other)const noexcept{
46178 if constexpr(is_signed<T>)
46179 if(is_negative(other))return false;
46180 return _numerator == abs(forward<T>(other)) * _denominator;
46181 }
46182 //operator<=>
46183 [[nodiscard]]auto operator<=>(const ubigfloat& other)const noexcept{
46184 return _numerator * other._denominator <=> other._numerator * _denominator;
46185 }
46186 template<integer_type T>
46187 [[nodiscard]]auto operator<=>(T&& other)const noexcept{
46188 if constexpr(is_signed<T>)
46189 if(is_negative(other))return strong_ordering::greater;
46190 return _numerator <=> abs(forward<T>(other)) * _denominator;
46191 }
46192 //operatorX for rvalue
46193 [[nodiscard]]ubigfloat&& operator+(const ubigfloat& other)&&noexcept{
46194 return move(*this += other);
46195 }
46196 template<unsigned_integer_type T>
46197 [[nodiscard]]ubigfloat&& operator+(T&& other)&&noexcept{
46198 return move(*this += forward<T>(other));
46199 }
46200 template<signed_integer_type T>
46201 [[nodiscard]]ubigfloat&& operator+(T&& other)&&noexcept{
46202 return move(*this += forward<T>(other));
46203 }
46204 [[nodiscard]]ubigfloat&& operator-(const ubigfloat& other)&&noexcept{
46205 return move(*this -= other);
46206 }
46207 template<unsigned_integer_type T>
46208 [[nodiscard]]ubigfloat&& operator-(T&& other)&&noexcept{
46209 return move(*this -= forward<T>(other));
46210 }
46211 template<signed_integer_type T>
46212 [[nodiscard]]ubigfloat&& operator-(T&& other)&&noexcept{
46213 return move(*this -= forward<T>(other));
46214 }
46215 [[nodiscard]]ubigfloat&& operator*(const ubigfloat& other)&&noexcept{
46216 return move(*this *= other);
46217 }
46218 [[nodiscard]]ubigfloat&& operator*(ubigfloat&& other)&&noexcept{
46219 return move(*this *= move(other));
46220 }
46221 template<unsigned_integer_type T>
46222 [[nodiscard]]ubigfloat&& operator*(T&& other)&&noexcept{
46223 return move(*this *= other);
46224 }
46225 [[nodiscard]]ubigfloat&& operator/(const ubigfloat& other)&&noexcept{
46226 return move(*this /= other);
46227 }
46228 template<unsigned_integer_type T>
46229 [[nodiscard]]ubigfloat&& operator/(T&& other)&&noexcept{
46230 return move(*this /= other);
46231 }
46232 [[nodiscard]]ubigfloat&& operator+(ubigfloat&& other)const&noexcept{
46233 return move(move(other) + *this);
46234 }
46235 [[nodiscard]]ubigfloat&& operator*(ubigfloat&& other)const&noexcept{
46236 return move(move(other) * *this);
46237 }
46238 //operator!
46239 [[nodiscard]]bool operator!()const noexcept{
46240 return!_numerator;
46241 }
46242 [[nodiscard]]explicit operator bool()const noexcept{
46243 return !operator!();
46244 }
46245public:
46246 //化简
46247 void simplify()noexcept{
46248 ubigint g=gcd(_numerator,_denominator);
46249 _numerator/=g;
46250 _denominator/=g;
46251 }
46252 //friend simplify
46253 friend auto& simplify(ubigfloat& a)noexcept{
46254 a.simplify();
46255 return a;
46256 }
46257 friend decltype(auto) simplify(ubigfloat&& a)noexcept{
46258 a.simplify();
46259 return move(a);
46260 }
46261 //friend pow
46262 friend [[nodiscard]] ubigfloat pow(ubigfloat base,bigint exp)noexcept{
46263 ubigfloat aret;
46264 if(is_negative(exp))
46265 aret={base._denominator,base._numerator};
46266 else
46267 aret=base;
46268 ubigint uexp=abs(move(exp));
46269 return math::pow(move(aret),move(uexp));
46270 }
46271 //强转
46272 [[nodiscard]]explicit operator ubigint()const&noexcept{
46273 return trunc(*this);
46274 }
46275 [[nodiscard]]explicit operator ubigint()&&noexcept{
46276 return trunc(move(*this));
46277 }
46278 [[nodiscard]]explicit operator bigint()const&noexcept{
46279 return this->operator ubigint();
46280 }
46281 [[nodiscard]]explicit operator bigint()&&noexcept{
46282 return move(*this).operator ubigint();
46283 }
46284 //hash
46285 [[nodiscard]]force_inline hash_t hash()const noexcept{
46286 return hash_t{hash_n::hash(_numerator)._value*13+hash_n::hash(_denominator)._value};
46287 }
46288 //swap_with
46289 void swap_with(ubigfloat& other)noexcept{
46290 swap(_numerator,other._numerator);
46291 swap(_denominator,other._denominator);
46292 }
46293 //friend swap
46294 friend force_inline void swap(ubigfloat& a,ubigfloat& b)noexcept{
46295 a.swap_with(b);
46296 }
46297};
46298
46299template<typename T>
46300concept ubigfloat_cvref=type_info<remove_cvref<T>> == type_info<ubigfloat>;
46301
46302//pow of bigint
46303using math::pow;
46304template<signed_integer_type T,ubigint_cvref ubigint_t>
46305[[nodiscard]]inline ubigfloat pow(ubigint_t base,T&&exp)noexcept{
46306 if(is_negative(exp))
46307 return ubigfloat{1u} / pow(forward<ubigint_t>(base),abs(forward<T>(exp)));
46308 else
46309 return pow(forward<ubigint_t>(base),abs(forward<T>(exp)));
46310}
46311template<unsigned_basic_integer_type T1,signed_integer_type T2>
46312[[nodiscard]]inline ubigfloat pow(T1&& base,T2&& exp)noexcept{
46313 return pow(ubigint{forward<T1>(base)},forward<T2>(exp));
46314}
46315
46316template<unsigned_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<ubigfloat>)
46317[[nodiscard]]inline ubigfloat operator+(T&& lhs,ubigfloat_t&& rhs)noexcept{
46318 return forward<ubigfloat_t>(rhs) + forward<T>(lhs);
46319}
46320template<unsigned_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<ubigfloat>)
46321[[nodiscard]]inline ubigfloat operator-(T&& lhs,ubigfloat_t&& rhs)noexcept{
46322 return ubigfloat{forward<T>(lhs)} - forward<ubigfloat_t>(rhs);
46323}
46324template<unsigned_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<ubigfloat>)
46325[[nodiscard]]inline ubigfloat operator*(T&& lhs,ubigfloat_t&& rhs)noexcept{
46326 return forward<ubigfloat_t>(rhs) * forward<T>(lhs);
46327}
46328template<unsigned_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<ubigfloat>)
46329[[nodiscard]]inline ubigfloat operator/(T&& lhs,ubigfloat_t&& rhs)noexcept{
46330 return ubigfloat{forward<T>(lhs)} / forward<ubigfloat_t>(rhs);
46331}
46332
46334//注入math::arithmetic_type_info_prover
46335namespace base::math{
46336 using namespace bignum_n;
46337 inline ubigfloat arithmetic_type_info_prover<ubigfloat>::min()noexcept{
46338 return ubigfloat{};
46339 }
46340}
46341INTER_NAMESPACE(bignum_n)
46342
46343//file_end
46344
46345#line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_body.hpp"
46346#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/bigfloat.hpp"
46347//bigfloat.hpp
46348//at namespace elc::defs::bignum_n
46349/*
46350未完成的elc解释器bignum文件
46351由steve02081504与Alex0125设计、编写
46352转载时请在不对此文件做任何修改的同时注明出处
46353项目地址:https://github.com/ELC-lang/ELC
46354*/
46355/*
46356 ,??????????????????????????
46357 ????????????????????????????
46358 ?????????????????????????????+
46359 ?????+++++++++++++++++++++++++
46360 ?????+++++++++++++++++++++++++
46361 ??????++++++++++++++++++++++++
46362 ?????++
46363 ?????+++
46364 ??????+++IIIIIIIIIIIIIIIIII
46365 ?????+++++IIIIIIIIIIIIIIIIII
46366 ?????++++++++++++++++++++++++
46367 ??????+++++++++++++++++++++++:
46368 ?????++
46369 ?????+++
46370 ??????++
46371 ??????????????????????????????II
46372 ??????????????????????????????IIII
46373 ,?????????????????????????????IIIII+
46374 =???++++++++++++++++++++++++++III?
46375 ?++++++++++++++++++++++++++++I+
46376*/
46377class bigfloat;
46378[[nodiscard]]bigfloat copy_as_negative(const ubigfloat&,bool sign=true)noexcept;
46379[[nodiscard]]bigfloat copy_as_negative(ubigfloat&&,bool sign=true)noexcept;
46380using math::copy_as_negative;//避免可能的符号覆盖
46381
46382[[nodiscard]]inline bigfloat operator-(const ubigfloat&num)noexcept;
46383[[nodiscard]]inline bigfloat operator-(ubigfloat&&num)noexcept;
46384
46385class bigfloat{
46386 bool _is_negative=false;
46387 ubigfloat _num;
46388public:
46389 //constructors
46390 bigfloat()noexcept=default;
46391 bigfloat(const bigfloat& other)noexcept=default;
46392 bigfloat(bigfloat&& other)noexcept=default;
46393 bigfloat& operator=(const bigfloat& other)&noexcept=default;
46394 bigfloat& operator=(bigfloat&& other)&noexcept=default;
46395 bigfloat(const ubigfloat& number)noexcept:_num(number){}
46396 bigfloat(ubigfloat&& number)noexcept:_num(move(number)){}
46397 bigfloat(const bigint& other)noexcept:_num(abs(other)),_is_negative(is_negative(other)){}
46398 bigfloat(bigint&& other)noexcept:_num(abs(move(other))),_is_negative(is_negative(other)){}
46399 bigfloat(const ubigint& other)noexcept:_num(other){}
46400 bigfloat(ubigint&& other)noexcept:_num(move(other)){}
46401
46402 template<arithmetic_type T>
46403 bigfloat(T&&num)noexcept:_is_negative(is_negative(num)),_num(abs(forward<T>(num))){}
46404public:
46405 template<arithmetic_type T>
46406 [[nodiscard]]bool is_safe_convert_to()const noexcept{
46407 return _num.is_safe_convert_to<to_unsigned_t<T>>();
46408 }
46409 template<arithmetic_type T>
46410 [[nodiscard]]T convert_to()&&noexcept{
46411 if constexpr(signed_type<T>)
46412 return copy_as_negative(move(_num).convert_to<to_unsigned_t<T>>(),_is_negative);
46413 else
46414 return move(_num).convert_to<T>();
46415 }
46416 template<arithmetic_type T>
46417 [[nodiscard]]T convert_to()const&noexcept{
46418 if constexpr(signed_type<T>)
46419 return copy_as_negative(_num.convert_to<to_unsigned_t<T>>(),_is_negative);
46420 else
46421 return _num.convert_to<T>();
46422 }
46423 //explicit operator T
46424 template<arithmetic_type T>
46425 [[nodiscard]]explicit operator T()&&noexcept{
46426 return move(*this).convert_to<T>();
46427 }
46428 template<arithmetic_type T>
46429 [[nodiscard]]explicit operator T()const&noexcept{
46430 return convert_to<T>();
46431 }
46432private:
46433 bigfloat(ubigfloat&& number, bool is_negative)noexcept:
46434 _num(move(number)),
46435 _is_negative(is_negative)
46436 {}
46437 bigfloat(const ubigfloat& number, bool is_negative)noexcept:
46438 _num(number),
46439 _is_negative(is_negative)
46440 {}
46441public:
46442 //operator-
46443 [[nodiscard]]bigfloat operator-()const&noexcept{
46444 return bigfloat{_num, !_is_negative};
46445 }
46446 [[nodiscard]]bigfloat&& operator-()&&noexcept{
46447 _is_negative=!_is_negative;
46448 return move(*this);
46449 }
46450 //friend abs
46451 [[nodiscard]]friend const ubigfloat& abs(const bigfloat& a)noexcept{
46452 return a._num;
46453 }
46454 [[nodiscard]]friend ubigfloat abs(bigfloat& a)noexcept{
46455 return a._num;
46456 }
46457 [[nodiscard]]friend ubigfloat&& abs(bigfloat&& a)noexcept{
46458 return move(a._num);
46459 }
46460 //friend isNaN
46461 [[nodiscard]]friend constexpr bool isNaN(const bigfloat&)noexcept{
46462 return false;
46463 }
46464 //friend isInf
46465 [[nodiscard]]friend bool isInf(const bigfloat&a)noexcept{
46466 return isInf(a._num);
46467 }
46468 //friend is_negative
46469 [[nodiscard]]friend bool is_negative(const bigfloat& a)noexcept{
46470 return a._is_negative;
46471 }
46472 //friend copy_as_negative
46473 [[nodiscard]]friend bigfloat copy_as_negative(const bigfloat& a,bool sign=true)noexcept{
46474 return bigfloat{a._num, sign};
46475 }
46476 [[nodiscard]]friend bigfloat&& copy_as_negative(bigfloat&& a,bool sign=true)noexcept{
46477 a._is_negative=sign;
46478 return move(a);
46479 }
46480 [[nodiscard]]friend bigfloat copy_as_negative(const ubigfloat& a,bool sign)noexcept{
46481 return bigfloat{a, sign};
46482 }
46483 [[nodiscard]]friend bigfloat copy_as_negative(ubigfloat&& a,bool sign)noexcept{
46484 return bigfloat{move(a), sign};
46485 }
46486 //friend get_numerator
46487 [[nodiscard]]friend ubigint get_numerator(const bigfloat& a)noexcept{
46488 return get_numerator(a._num);
46489 }
46490 [[nodiscard]]friend ubigint&& get_numerator(bigfloat&& a)noexcept{
46491 return get_numerator(move(a._num));
46492 }
46493 //friend get_denominator
46494 [[nodiscard]]friend ubigint get_denominator(const bigfloat& a)noexcept{
46495 return get_denominator(a._num);
46496 }
46497 [[nodiscard]]friend ubigint&& get_denominator(bigfloat&& a)noexcept{
46498 return get_denominator(move(a._num));
46499 }
46500 //friend reciprocal
46501 [[nodiscard]]friend bigfloat reciprocal(const bigfloat& a)noexcept{
46502 return bigfloat{reciprocal(a._num), a._is_negative};
46503 }
46504 [[nodiscard]]friend bigfloat&& reciprocal(bigfloat&& a)noexcept{
46505 discard=reciprocal(move(a._num));//swap it!
46506 return move(a);
46507 }
46508 //friend trunc
46509 [[nodiscard]]friend bigint trunc(const bigfloat& a)noexcept{
46510 return copy_as_negative(trunc(a._num),a._is_negative);
46511 }
46512 //friend split
46513 [[nodiscard]]friend auto split(const bigfloat& a)noexcept{
46514 struct result_t{
46515 bigint integer;
46516 bigfloat fraction;
46517 };
46518 auto result=split(a._num);
46519 return result_t{copy_as_negative(result.integer,a._is_negative),
46520 copy_as_negative(result.fraction,a._is_negative)};
46521 }
46522 //friend trunc_with_sub
46523 [[nodiscard]]friend bigint trunc_with_sub(bigfloat& a)noexcept{
46524 auto result=trunc_with_sub(a._num);
46525 return copy_as_negative(result,a._is_negative);
46526 }
46527 //friend to_size_t
46528 [[nodiscard]]friend size_t to_size_t(const bigfloat& a)noexcept{
46529 return to_size_t(trunc(a));
46530 }
46531 //operator+
46532 template<arithmetic_type T>
46533 [[nodiscard]]bigfloat operator+(T&&other)const&noexcept{
46534 if(_is_negative==is_negative(other))
46535 return bigfloat{_num+abs(forward<T>(other)), _is_negative};
46536 else{
46537 auto uother=abs(forward<T>(other));
46538 if(_num>uother)
46539 return bigfloat{_num-move(uother), _is_negative};
46540 else
46541 return bigfloat{move(uother)-_num, !_is_negative};
46542 }
46543 }
46544 //operator-
46545 template<arithmetic_type T>
46546 [[nodiscard]]bigfloat operator-(T&&other)const&noexcept{
46547 if(_is_negative!=is_negative(other))
46548 return bigfloat{_num+abs(forward<T>(other)), _is_negative};
46549 else{
46550 auto uother=abs(forward<T>(other));
46551 if(_num>uother)
46552 return bigfloat{_num-move(uother), _is_negative};
46553 else
46554 return bigfloat{move(uother)-_num, !_is_negative};
46555 }
46556 }
46557 //operator*
46558 template<arithmetic_type T>
46559 [[nodiscard]]bigfloat operator*(T&&other)const&noexcept{
46560 const bool sign=_is_negative!=is_negative(other);
46561 return bigfloat{_num*abs(forward<T>(other)), sign};
46562 }
46563 //operator/
46564 template<arithmetic_type T>
46565 [[nodiscard]]bigfloat operator/(T&&other)const&noexcept{
46566 const bool sign=_is_negative!=is_negative(other);
46567 return bigfloat{_num/abs(forward<T>(other)), sign};
46568 }
46569 //operator+=
46570 template<unsigned_type T>
46571 bigfloat& operator+=(T&&other)&noexcept{
46572 _num+=forward<T>(other);
46573 return*this;
46574 }
46575 template<arithmetic_type T>
46576 bigfloat& operator+=(T&&other)&noexcept{
46577 if(_is_negative==is_negative(other)){
46578 _num+=abs(forward<T>(other));
46579 return*this;
46580 }
46581 else{
46582 auto uother=abs(forward<T>(other));
46583 if(_num>uother){
46584 _num-=move(uother);
46585 return*this;
46586 }
46587 else{
46588 _num=move(uother)-_num;
46589 _is_negative=!_is_negative;
46590 return*this;
46591 }
46592 }
46593 }
46594 //operator-=
46595 template<arithmetic_type T>
46596 bigfloat& operator-=(T&&other)&noexcept{
46597 if(_is_negative==is_negative(other)){
46598 auto uother=abs(forward<T>(other));
46599 if(_num>uother){
46600 _num-=move(uother);
46601 return*this;
46602 }
46603 else{
46604 _num=move(uother)-_num;
46605 _is_negative=!_is_negative;
46606 return*this;
46607 }
46608 }
46609 else{
46610 _num+=abs(forward<T>(other));
46611 return*this;
46612 }
46613 }
46614 //operator*=
46615 template<unsigned_type T>
46616 bigfloat& operator*=(T&&other)&noexcept{
46617 _num*=forward<T>(other);
46618 return*this;
46619 }
46620 template<arithmetic_type T>
46621 bigfloat& operator*=(T&&other)&noexcept{
46622 _is_negative=_is_negative!=is_negative(other);
46623 _num*=abs(forward<T>(other));
46624 return*this;
46625 }
46626 //operator/=
46627 template<unsigned_type T>
46628 bigfloat& operator/=(T&&other)&noexcept{
46629 _num/=forward<T>(other);
46630 return*this;
46631 }
46632 template<arithmetic_type T>
46633 bigfloat& operator/=(T&&other)&noexcept{
46634 _is_negative=_is_negative!=is_negative(other);
46635 _num/=abs(forward<T>(other));
46636 return*this;
46637 }
46638 //operator==
46639 template<arithmetic_type T>
46640 [[nodiscard]]bool operator==(T&&other)const noexcept{
46641 if(_is_negative!=is_negative(other))return false;
46642 return _num==abs(forward<T>(other));
46643 }
46644 //operator<=>
46645 template<arithmetic_type T>
46646 [[nodiscard]]auto operator<=>(T&&other)const noexcept{
46647 if(_is_negative!=is_negative(other))
46648 return _is_negative?strong_ordering::less:strong_ordering::greater;
46649 const bool needs_reverse=_is_negative;
46650 auto result=_num <=> abs(forward<T>(other));
46651 if(needs_reverse)
46652 result=compare.reverse(result);
46653 return result;
46654 }
46655 //operatorX for rvalue
46656 template<arithmetic_type T>
46657 [[nodiscard]]bigfloat&& operator+(T&&other)&&noexcept{
46658 return move(*this += forward<T>(other));
46659 }
46660 template<arithmetic_type T>
46661 [[nodiscard]]bigfloat&& operator-(T&&other)&&noexcept{
46662 return move(*this -= forward<T>(other));
46663 }
46664 template<arithmetic_type T>
46665 [[nodiscard]]bigfloat&& operator*(T&&other)&&noexcept{
46666 return move(*this *= forward<T>(other));
46667 }
46668 template<arithmetic_type T>
46669 [[nodiscard]]bigfloat&& operator/(T&&other)&&noexcept{
46670 return move(*this /= forward<T>(other));
46671 }
46672 //operator!
46673 [[nodiscard]]bool operator!()const noexcept{
46674 return!_num;
46675 }
46676 [[nodiscard]]explicit operator bool()const noexcept{
46677 return !operator!();
46678 }
46679public:
46680 //化简
46681 void simplify()noexcept{
46682 _num.simplify();
46683 }
46684 //friend simplify
46685 friend auto& simplify(bigfloat& a)noexcept{
46686 a.simplify();
46687 return a;
46688 }
46689 friend decltype(auto) simplify(bigfloat&& a)noexcept{
46690 a.simplify();
46691 return move(a);
46692 }
46693 //friend pow
46694 friend [[nodiscard]] bigfloat pow(bigfloat base,ubigint exp)noexcept{
46695 const bool sign=is_negative(base)&&is_odd(exp);
46696 auto uret=pow(abs(base),exp);
46697 return {move(uret),sign};
46698 }
46699 friend [[nodiscard]] bigfloat pow(bigfloat base,bigint exp)noexcept{
46700 const bool sign=is_negative(base)&&is_odd(exp);
46701 auto uret=pow(abs(base),abs(exp));
46702 return {move(uret),sign};
46703 }
46704 //强转
46705 [[nodiscard]]explicit operator bigint()const&noexcept{
46706 return copy_as_negative(ubigint(_num),_is_negative);
46707 }
46708 [[nodiscard]]explicit operator bigint()&&noexcept{
46709 return copy_as_negative(ubigint(move(_num)),_is_negative);
46710 }
46711 [[nodiscard]]explicit operator ubigint()const&noexcept{
46712 return ubigint(_num);
46713 }
46714 [[nodiscard]]explicit operator ubigint()&&noexcept{
46715 return ubigint(move(_num));
46716 }
46717 //hash
46718 [[nodiscard]]force_inline hash_t hash()const noexcept{
46719 const auto tmp = hash_n::hash(_num)._value;
46720 return hash_t{_is_negative?tmp*7u:tmp};
46721 }
46722 //swap_with
46723 void swap_with(bigfloat& other)noexcept{
46724 swap(_is_negative,other._is_negative);
46725 swap(_num,other._num);
46726 }
46727 //friend swap
46728 friend force_inline void swap(bigfloat& a,bigfloat& b)noexcept{
46729 a.swap_with(b);
46730 }
46731};
46732
46733[[nodiscard]]inline bigfloat operator-(const ubigfloat&num)noexcept{
46734 return copy_as_negative(num);
46735}
46736[[nodiscard]]inline bigfloat operator-(ubigfloat&&num)noexcept{
46737 return copy_as_negative(move(num));
46738}
46739
46740template<typename T>
46741concept bigfloat_cvref=type_info<remove_cvref<T>> == type_info<bigfloat>;
46742
46743//pow of bigint
46744using math::pow;
46745template<signed_integer_type T,bigint_cvref bigint_t>
46746[[nodiscard]]inline bigfloat pow(bigint_t&&base,T&&exp)noexcept{
46747 if(is_negative(exp))
46748 return bigfloat{1u} / pow(forward<bigint_t>(base),abs(forward<T>(exp)));
46749 else
46750 return pow(forward<bigint_t>(base),abs(forward<T>(exp)));
46751}
46752template<signed_basic_integer_type T1,signed_integer_type T2>
46753[[nodiscard]]inline ubigfloat pow(T1&& base,T2&& exp)noexcept{
46754 return pow(bigint{forward<T1>(base)},forward<T2>(exp));
46755}
46756
46757template<arithmetic_type T,bigfloat_cvref bigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46758[[nodiscard]]inline bigfloat operator+(T&& lhs,bigfloat_t&& rhs)noexcept{
46759 return forward<bigfloat_t>(rhs) + forward<T>(lhs);
46760}
46761template<arithmetic_type T,bigfloat_cvref bigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46762[[nodiscard]]inline bigfloat operator-(T&& lhs,bigfloat_t&& rhs)noexcept{
46763 return bigfloat{forward<T>(lhs)} - forward<bigfloat_t>(rhs);
46764}
46765template<arithmetic_type T,bigfloat_cvref bigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46766[[nodiscard]]inline bigfloat operator*(T&& lhs,bigfloat_t&& rhs)noexcept{
46767 return forward<bigfloat_t>(rhs) * forward<T>(lhs);
46768}
46769template<arithmetic_type T,bigfloat_cvref bigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46770[[nodiscard]]inline bigfloat operator/(T&& lhs,bigfloat_t&& rhs)noexcept{
46771 return bigfloat{forward<T>(lhs)} / forward<bigfloat_t>(rhs);
46772}
46773
46774template<signed_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46775[[nodiscard]]inline bigfloat operator+(T&& lhs,ubigfloat_t&& rhs)noexcept{
46776 return bigfloat{forward<T>(lhs)} + forward<ubigfloat_t>(rhs);
46777}
46778template<signed_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46779[[nodiscard]]inline bigfloat operator-(T&& lhs,ubigfloat_t&& rhs)noexcept{
46780 return bigfloat{forward<T>(lhs)} - forward<ubigfloat_t>(rhs);
46781}
46782template<signed_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46783[[nodiscard]]inline bigfloat operator*(T&& lhs,ubigfloat_t&& rhs)noexcept{
46784 return bigfloat{forward<T>(lhs)} * forward<ubigfloat_t>(rhs);
46785}
46786template<signed_type T,ubigfloat_cvref ubigfloat_t> requires(type_info<remove_cvref<T>> != type_info<bigfloat>)
46787[[nodiscard]]inline bigfloat operator/(T&& lhs,ubigfloat_t&& rhs)noexcept{
46788 return bigfloat{forward<T>(lhs)} / forward<ubigfloat_t>(rhs);
46789}
46790
46791//file_end
46792
46793#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_body.hpp"
46794#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/literal.hpp"
46795//literal.hpp
46796//at namespace elc::defs::bignum_n
46797/*
46798未完成的elc解释器bignum文件
46799由steve02081504与Alex0125设计、编写
46800转载时请在不对此文件做任何修改的同时注明出处
46801项目地址:https://github.com/ELC-lang/ELC
46802*/
46803/*
46804 ,??????????????????????????
46805 ????????????????????????????
46806 ?????????????????????????????+
46807 ?????+++++++++++++++++++++++++
46808 ?????+++++++++++++++++++++++++
46809 ??????++++++++++++++++++++++++
46810 ?????++
46811 ?????+++
46812 ??????+++IIIIIIIIIIIIIIIIII
46813 ?????+++++IIIIIIIIIIIIIIIIII
46814 ?????++++++++++++++++++++++++
46815 ??????+++++++++++++++++++++++:
46816 ?????++
46817 ?????+++
46818 ??????++
46819 ??????????????????????????????II
46820 ??????????????????????????????IIII
46821 ,?????????????????????????????IIIII+
46822 =???++++++++++++++++++++++++++III?
46823 ?++++++++++++++++++++++++++++I+
46824*/
46825//在此我们定义对于ubigint\bigint\ubigfloat\bigfloat的字面量支持。
46826template<char...cs>
46827constexpr_as_auto ubigint operator""_ubigint()noexcept{
46829}
46830template<char...cs>
46831constexpr_as_auto bigint operator""_bigint()noexcept{
46833}
46834
46835template<char...cs>
46836constexpr_as_auto ubigfloat operator""_ubigfloat()noexcept{
46838 /*float_T*/ ubigfloat,
46839 /*base_process_T*/ ubigint,
46840 /*exp_process_integer_T*/ bigint,
46841 /*exp_process_unsigned_integer_T*/ ubigint
46842 >::eval<cs...>();
46843}
46844template<char...cs>
46845constexpr_as_auto bigfloat operator""_bigfloat()noexcept{
46847 /*float_T*/ bigfloat,
46848 /*unsigned_float_T*/ ubigfloat,
46849 /*base_process_T*/ ubigint,
46850 /*exp_process_integer_T*/ bigint,
46851 /*exp_process_unsigned_integer_T*/ ubigint
46852 >::eval<cs...>();
46853}
46854
46855//file_end
46856
46857#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_body.hpp"
46858
46859//file_end
46860
46861 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
46862 }
46863 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/bignum/_export.hpp"
46864//_export.hpp
46865//at namespace elc::defs
46866/*
46867未完成的elc解释器bignum文件
46868由steve02081504与Alex0125设计、编写
46869转载时请在不对此文件做任何修改的同时注明出处
46870项目地址:https://github.com/ELC-lang/ELC
46871*/
46872/*
46873 ,??????????????????????????
46874 ????????????????????????????
46875 ?????????????????????????????+
46876 ?????+++++++++++++++++++++++++
46877 ?????+++++++++++++++++++++++++
46878 ??????++++++++++++++++++++++++
46879 ?????++
46880 ?????+++
46881 ??????+++IIIIIIIIIIIIIIIIII
46882 ?????+++++IIIIIIIIIIIIIIIIII
46883 ?????++++++++++++++++++++++++
46884 ??????+++++++++++++++++++++++:
46885 ?????++
46886 ?????+++
46887 ??????++
46888 ??????????????????????????????II
46889 ??????????????????????????????IIII
46890 ,?????????????????????????????IIIII+
46891 =???++++++++++++++++++++++++++III?
46892 ?++++++++++++++++++++++++++++I+
46893*/
46894#define export using bignum_n::
46895export operator""_ubigint;
46896export operator""_bigint;
46897export operator""_ubigfloat;
46898export operator""_bigfloat;
46899#undef export
46900
46901//file_end
46902
46903 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
46904
46905 #if defined(ELC_TEST_ON)
46906 namespace bignum_part_test{
46907 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_test.hpp"
46908//_test.hpp
46909/*
46910未完成的elc解释器bignum文件
46911由steve02081504与Alex0125设计、编写
46912转载时请在不对此文件做任何修改的同时注明出处
46913项目地址:https://github.com/ELC-lang/ELC
46914*/
46915/*
46916 ,??????????????????????????
46917 ????????????????????????????
46918 ?????????????????????????????+
46919 ?????+++++++++++++++++++++++++
46920 ?????+++++++++++++++++++++++++
46921 ??????++++++++++++++++++++++++
46922 ?????++
46923 ?????+++
46924 ??????+++IIIIIIIIIIIIIIIIII
46925 ?????+++++IIIIIIIIIIIIIIIIII
46926 ?????++++++++++++++++++++++++
46927 ??????+++++++++++++++++++++++:
46928 ?????++
46929 ?????+++
46930 ??????++
46931 ??????????????????????????????II
46932 ??????????????????????????????IIII
46933 ,?????????????????????????????IIIII+
46934 =???++++++++++++++++++++++++++III?
46935 ?++++++++++++++++++++++++++++I+
46936*/
46937inline void test(){
46938 ELC_TEST_EVENTNAME("bignum部分测试");
46939}
46940inline void test_log_out(){
46941}
46942inline void test_end(){
46943}
46944
46945//file_end
46946
46947 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
46948 }
46949 #endif
46950
46951 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
46952//_undefs.hpp
46953/*
46954未完成的elc解释器basic文件
46955由steve02081504与Alex0125设计、编写
46956转载时请在不对此文件做任何修改的同时注明出处
46957项目地址:https://github.com/ELC-lang/ELC
46958*/
46959/*
46960 ,??????????????????????????
46961 ????????????????????????????
46962 ?????????????????????????????+
46963 ?????+++++++++++++++++++++++++
46964 ?????+++++++++++++++++++++++++
46965 ??????++++++++++++++++++++++++
46966 ?????++
46967 ?????+++
46968 ??????+++IIIIIIIIIIIIIIIIII
46969 ?????+++++IIIIIIIIIIIIIIIIII
46970 ?????++++++++++++++++++++++++
46971 ??????+++++++++++++++++++++++:
46972 ?????++
46973 ?????+++
46974 ??????++
46975 ??????????????????????????????II
46976 ??????????????????????????????IIII
46977 ,?????????????????????????????IIIII+
46978 =???++++++++++++++++++++++++++III?
46979 ?++++++++++++++++++++++++++++I+
46980*/
46981#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
46982//_undefs.hpp
46983/*
46984未完成的elc解释器_share文件
46985由steve02081504与Alex0125设计、编写
46986转载时请在不对此文件做任何修改的同时注明出处
46987项目地址:https://github.com/ELC-lang/ELC
46988*/
46989/*
46990 ,??????????????????????????
46991 ????????????????????????????
46992 ?????????????????????????????+
46993 ?????+++++++++++++++++++++++++
46994 ?????+++++++++++++++++++++++++
46995 ??????++++++++++++++++++++++++
46996 ?????++
46997 ?????+++
46998 ??????+++IIIIIIIIIIIIIIIIII
46999 ?????+++++IIIIIIIIIIIIIIIIII
47000 ?????++++++++++++++++++++++++
47001 ??????+++++++++++++++++++++++:
47002 ?????++
47003 ?????+++
47004 ??????++
47005 ??????????????????????????????II
47006 ??????????????????????????????IIII
47007 ,?????????????????????????????IIIII+
47008 =???++++++++++++++++++++++++++III?
47009 ?++++++++++++++++++++++++++++I+
47010*/
47011
47012//defs at "_defs.hpp"
47013
47014#if defined(_MSC_VER)
47015 #pragma warning(pop)
47016#endif
47017//#undef suppress_msvc_warning
47018#undef disable_msvc_warning
47019#undef push_msvc_warning
47020#undef pop_msvc_warning
47021#undef push_and_disable_msvc_warning
47022#if defined(_MSC_VER)
47023 #pragma pack(pop)
47024#endif
47025#if defined(__GNUC__)
47026 #pragma GCC diagnostic pop
47027#endif
47028#if defined(_MSC_VER)
47029 #pragma pop_macro("new")
47030 #pragma pop_macro("delete")
47031 #pragma pop_macro("min")
47032 #pragma pop_macro("max")
47033 #pragma pop_macro("abs")
47034 #pragma pop_macro("export")
47035 #pragma pop_macro("rand")
47036 #pragma pop_macro("sqrt")
47037 #pragma pop_macro("type_info")
47038 #pragma pop_macro("elc")
47039#endif
47040
47041//
47042#if defined(ELC_VOID_NAME)
47043 #define void the_void
47044#endif
47045//
47046#if defined(ELC_PUBLIC_ALL)
47047 #undef protected
47048 #undef private
47049#endif
47050//
47051#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
47052 #define rand the_rand
47053#endif
47054
47055// #undef often_noexcept
47056#undef noexcept_as
47057#undef noexcept_as_auto
47058#undef constexpr_as
47059#undef constexpr_as_auto
47060
47061#undef using_method_from_base_t
47062#undef using_method_from_value
47063
47064#undef floop
47065#undef times
47066#undef debug_times
47067#undef enable_adl
47068
47069#undef re_declvalue
47070#undef re_decltype
47071
47072#undef declvalue
47073
47074#undef template_error
47075#undef template_error_of_type
47076#undef template_warning
47077
47078#undef type_info_of
47079#undef type_name_of
47080
47081#undef is_common_attribute
47082#undef is_special_attribute
47083
47084#undef has_attribute
47085#undef not_has_attribute
47086
47087#undef float_size_of
47088#undef bitnum_of
47089
47090#undef def_common_attribute_with_nothing
47091#undef def_special_attribute_with_nothing
47092
47093#undef common_attribute_t
47094#undef special_attribute_t
47095
47096#undef enable_if
47097#undef enabled_by_default
47098#undef disabled_by_default
47099#undef enable_if_not_ill_form
47100#undef enable_flag
47101
47102#undef was_an_ill_form
47103#undef was_an_ill_form_with_parameter
47104#undef was_not_an_ill_form
47105#undef was_not_an_ill_form_and_noexcept
47106#undef was_not_an_ill_form_with_parameter
47107
47108#undef recursive_λ
47109#undef get_recursive_λ_caller
47110#undef λ
47111#undef exλ
47112#undef λ_with_catch
47113#undef self_recursion
47114#undef λ_RLSRRS
47115#undef λ_inline
47116#undef λ_force_inline
47117
47118#undef MAGIC
47119
47120#undef nothing
47121
47122#undef elseif
47123#undef _big_than_
47124#undef _small_than_
47125
47126#if defined(_MSC_VER)
47127 #undef not
47128 #undef and
47129 #undef or
47130#endif
47131
47132#undef INTER_NAMESPACE
47133#undef BREAK_NAMESPACE
47134
47135#undef szie
47136#undef form
47137
47138#undef template_name
47139#undef type_name
47140
47141#undef not_in_debug
47142
47143#undef es
47144#undef ec
47145
47146#undef ELC_TEST_EVENTNAME
47147
47148#undef override_instance_struct
47149
47150#undef distinctive
47151
47152#undef force_inline
47153
47154#undef with_no_vtable
47155
47156#undef in_consteval
47157
47158#undef no_vtable_struct
47159#undef no_vtable_class
47160
47161//#undef get_elc_defs
47162
47163//file_end
47164
47165#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
47166
47167//file_end
47168
47169 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
47170}
47171namespace elc{
47172 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_export.hpp"
47173//_export.hpp
47174//at namespace elc
47175/*
47176未完成的elc解释器bignum文件
47177由steve02081504与Alex0125设计、编写
47178转载时请在不对此文件做任何修改的同时注明出处
47179项目地址:https://github.com/ELC-lang/ELC
47180*/
47181/*
47182 ,??????????????????????????
47183 ????????????????????????????
47184 ?????????????????????????????+
47185 ?????+++++++++++++++++++++++++
47186 ?????+++++++++++++++++++++++++
47187 ??????++++++++++++++++++++++++
47188 ?????++
47189 ?????+++
47190 ??????+++IIIIIIIIIIIIIIIIII
47191 ?????+++++IIIIIIIIIIIIIIIIII
47192 ?????++++++++++++++++++++++++
47193 ??????+++++++++++++++++++++++:
47194 ?????++
47195 ?????+++
47196 ??????++
47197 ??????????????????????????????II
47198 ??????????????????????????????IIII
47199 ,?????????????????????????????IIIII+
47200 =???++++++++++++++++++++++++++III?
47201 ?++++++++++++++++++++++++++++I+
47202*/
47203#define export using defs::
47204export ubigint;
47205export bigint;
47206export ubigfloat;
47207export bigfloat;
47208
47209export operator""_ubigint;
47210export operator""_bigint;
47211export operator""_ubigfloat;
47212export operator""_bigfloat;
47213#undef export
47214
47215//file_end
47216
47217 #line 52 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/bignum/_body.hpp"
47218}
47219
47220//file_end
47221
47222 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/bignum"
47223#endif
47224
47225//file_end
47226
47227 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
47228 #define ELC_NUMERICAL_REPRESENTATION
47229 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
47230//_body.hpp
47231//at namespace ::
47232/*
47233未完成的elc解释器numerical_representation文件
47234由steve02081504与Alex0125设计、编写
47235转载时请在不对此文件做任何修改的同时注明出处
47236项目地址:https://github.com/ELC-lang/ELC
47237*/
47238/*
47239 ,??????????????????????????
47240 ????????????????????????????
47241 ?????????????????????????????+
47242 ?????+++++++++++++++++++++++++
47243 ?????+++++++++++++++++++++++++
47244 ??????++++++++++++++++++++++++
47245 ?????++
47246 ?????+++
47247 ??????+++IIIIIIIIIIIIIIIIII
47248 ?????+++++IIIIIIIIIIIIIIIIII
47249 ?????++++++++++++++++++++++++
47250 ??????+++++++++++++++++++++++:
47251 ?????++
47252 ?????+++
47253 ??????++
47254 ??????????????????????????????II
47255 ??????????????????????????????IIII
47256 ,?????????????????????????????IIIII+
47257 =???++++++++++++++++++++++++++III?
47258 ?++++++++++++++++++++++++++++I+
47259*/
47260#if defined(ELC_TEST)
47261 #error "this part cannot be tested."
47262#endif
47263namespace elc::defs{
47264 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
47265//_defs.hpp
47266/*
47267未完成的elc解释器basic文件
47268由steve02081504与Alex0125设计、编写
47269转载时请在不对此文件做任何修改的同时注明出处
47270项目地址:https://github.com/ELC-lang/ELC
47271*/
47272/*
47273 ,??????????????????????????
47274 ????????????????????????????
47275 ?????????????????????????????+
47276 ?????+++++++++++++++++++++++++
47277 ?????+++++++++++++++++++++++++
47278 ??????++++++++++++++++++++++++
47279 ?????++
47280 ?????+++
47281 ??????+++IIIIIIIIIIIIIIIIII
47282 ?????+++++IIIIIIIIIIIIIIIIII
47283 ?????++++++++++++++++++++++++
47284 ??????+++++++++++++++++++++++:
47285 ?????++
47286 ?????+++
47287 ??????++
47288 ??????????????????????????????II
47289 ??????????????????????????????IIII
47290 ,?????????????????????????????IIIII+
47291 =???++++++++++++++++++++++++++III?
47292 ?++++++++++++++++++++++++++++I+
47293*/
47294#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
47295//_defs.hpp
47296/*
47297未完成的elc解释器_share文件
47298由steve02081504与Alex0125设计、编写
47299转载时请在不对此文件做任何修改的同时注明出处
47300项目地址:https://github.com/ELC-lang/ELC
47301*/
47302/*
47303 ,??????????????????????????
47304 ????????????????????????????
47305 ?????????????????????????????+
47306 ?????+++++++++++++++++++++++++
47307 ?????+++++++++++++++++++++++++
47308 ??????++++++++++++++++++++++++
47309 ?????++
47310 ?????+++
47311 ??????+++IIIIIIIIIIIIIIIIII
47312 ?????+++++IIIIIIIIIIIIIIIIII
47313 ?????++++++++++++++++++++++++
47314 ??????+++++++++++++++++++++++:
47315 ?????++
47316 ?????+++
47317 ??????++
47318 ??????????????????????????????II
47319 ??????????????????????????????IIII
47320 ,?????????????????????????????IIIII+
47321 =???++++++++++++++++++++++++++III?
47322 ?++++++++++++++++++++++++++++I+
47323*/
47324
47325//undefs at "_undefs.hpp"
47326
47327#if defined(ELC_CODE_REALM)
47328 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
47329#endif
47330
47331//set ELC_WARNING_LEVEL default to 4(max)
47332#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
47333
47334#if defined(_MSC_VER)
47335 #pragma warning(push,ELC_WARNING_LEVEL)
47336 #pragma warning(disable:4099)//class与struct混用警告diss
47337 #pragma warning(disable:4584)//重复子类警告diss
47338 #pragma warning(disable:4250)//域控制继承警告diss
47339 #pragma warning(disable:26432)//不完全默认方法警告diss
47340 #pragma warning(disable:26435)//virtual override方法警告diss
47341 #pragma warning(disable:26481)//容器安利diss
47342 #pragma warning(disable:26446)//gsl::at安利diss
47343 #pragma warning(disable:26434)//方法覆盖警告diss
47344 #pragma warning(disable:26429)//gsl::not_null安利diss
47345 #pragma warning(disable:26471)//对void*进行static_cast安利diss
47346 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
47347 #pragma warning(disable:26473)//相同指针显式cast警告diss
47348 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
47349 #pragma warning(disable:26485)//数组作指针警告diss
47350 #pragma warning(disable:26490)//reinterpret_cast警告diss
47351 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
47352 #pragma warning(disable:26482)//非常数数组索引警告diss
47353 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
47354#endif
47355#if defined(__GNUC__)
47356 #pragma GCC diagnostic push
47357 #pragma GCC diagnostic warning "-Wall"//开启所有警告
47358 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
47359#endif
47360#if defined(_MSC_VER)
47361 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
47362 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
47363 #define push_msvc_warning() __pragma(warning(push))
47364 #define pop_msvc_warning() __pragma(warning(pop))
47365 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
47366#else
47367 //#define suppress_msvc_warning(...)
47368 #define disable_msvc_warning(...)
47369 #define push_msvc_warning()
47370 #define pop_msvc_warning()
47371 #define push_and_disable_msvc_warning(...)
47372#endif
47373#if defined(_MSC_VER)
47374 //push pack settings
47375 #pragma pack(push)
47376 #pragma pack()
47377#endif
47378#if defined(_MSC_VER)
47379 //push and undef common macros
47380 #pragma push_macro("new")
47381 #undef new
47382 #pragma push_macro("delete")
47383 #undef delete
47384 #pragma push_macro("min")
47385 #undef min
47386 #pragma push_macro("max")
47387 #undef max
47388 #pragma push_macro("abs")
47389 #undef abs
47390 #pragma push_macro("export")
47391 #undef export
47392 #pragma push_macro("rand")
47393 #undef rand
47394 #pragma push_macro("sqrt")
47395 #undef sqrt
47396 #pragma push_macro("type_info")
47397 #undef type_info
47398 #pragma push_macro("elc")
47399 #undef elc
47400#endif
47401//
47402#if defined(ELC_VOID_NAME)
47403 #undef void
47404#endif
47405//
47406#if defined(ELC_PUBLIC_ALL)
47407 #define protected public
47408 #define private public
47409#endif
47410//
47411#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
47412 #undef rand
47413#endif
47414
47415// #define often_noexcept
47416#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
47417#define noexcept_as_auto MAGIC//哦现在有了
47418#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
47419#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
47420
47421#define using_method_from_base_t(name,...) \
47422template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
47423auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
47424{\
47425 return base_t::name(forward<Args>(rest)...);\
47426}\
47427
47428#define using_method_from_value(name,value_name,...) \
47429template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
47430auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
47431{\
47432 return value_name.name(forward<Args>(rest)...);\
47433}\
47434
47435#define floop while(__builtin_is_my_dick_still_there())
47436#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
47437#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
47438#if defined(_MSC_VER) && _MSC_VER>=1935
47439 //@see https://developercommunity.visualstudio.com/t/10193638
47440 #define enable_adl(name) template<typename=void>void name()noexcept=delete
47441#else
47442 #define enable_adl(name) void name()noexcept=delete
47443#endif
47444
47445#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
47446#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
47447
47448#define declvalue(...) (::std::declval<__VA_ARGS__>())
47449
47451#define template_error(reason) static_assert(template_error_helper<T>,reason)
47453#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
47455#define template_warning(reason) template_warning_helper<T>(reason)
47456
47457//for type_info
47458#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
47459#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
47460
47461#define is_common_attribute(name) public attribute<T,name<T>>
47462#define is_special_attribute(name) public attribute<T,name>
47463
47464#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
47465#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
47466
47467//for float_size_t
47468#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
47469//bitnum_of
47470#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
47471
47472//for attribute
47473#define def_common_attribute_with_nothing(name) \
47474template<typename T>\
47475class name{}\
47476
47477#define def_special_attribute_with_nothing(name) \
47478class name{}\
47479
47480#define common_attribute_t template<class>class
47481#define special_attribute_t class
47482
47491#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
47493#define enabled_by_default class enable_state=void
47495#define disabled_by_default class enable_state= ::std::enable_if_t<false>
47497#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
47499#define enable_flag class enable_state
47500
47501#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
47502#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
47503#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
47504#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
47505#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
47506
47508#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
47510#define get_recursive_λ_caller(name,...) \
47511exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
47512 return name(name,Args...);\
47513}
47515#define λ []
47517#define exλ [&]
47519#define λ_with_catch(...) [__VA_ARGS__]
47521#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
47522//recursive_λ_self_referential_reserved_symbolname
47523#define λ_RLSRRS _my_jb_super_sb_name_
47524
47525#if defined(_MSC_VER) && !defined(__clang__)
47526 #define λ_inline [[msvc::forceinline]]
47527 #define λ_force_inline [[msvc::forceinline]]
47528#elif
47529 #define λ_inline [[gnu::always_inline]]
47530 #define λ_force_inline [[gnu::always_inline]]
47531#else
47532 #define λ_inline
47533 #define λ_force_inline
47534#endif
47535
47536#define MAGIC//ahh,ko no tenno da!
47537
47539#define nothing
47540
47542#define elseif else if
47544#define _big_than_ >
47546#define _small_than_ <
47547
47548#if defined(_MSC_VER)
47549 #define not !
47550 #define and &&
47551 #define or ||
47552#endif
47553
47555#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
47557#define BREAK_NAMESPACE }
47558
47560#define template_name template
47562#define type_name class
47563
47564#if defined(DEBUG) || defined(_DEBUG)
47565 #define not_in_debug 0
47566 #define in_debug 1
47567#else
47568 #define not_in_debug 1
47569 #define in_debug 0
47570#endif
47571
47572#define es U""
47573#define ec(ch) U ## ch
47574
47575#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
47576 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
47577#else
47578 #define ELC_TEST_EVENTNAME(name)
47579#endif
47580
47581#define override_instance_struct \
47582protected:\
47583 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
47584 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
47585 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
47586 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
47587 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
47588
47589#if defined(_MSC_VER) && !defined(__clang__)
47590 #define distinctive __declspec(dllexport)
47591#else
47592 #define distinctive
47593#endif
47594
47595#if defined(_MSC_VER) && !defined(__clang__)
47596 #define force_inline __forceinline
47597#elif defined(__GNUC__) || defined(__clang__)
47598 #define force_inline __attribute__((always_inline)) inline
47599#else
47600 #define force_inline inline
47601#endif
47602
47603#if defined(_MSC_VER) && !defined(__clang__)
47604 #define with_no_vtable __declspec(novtable)
47605#else
47606 #define with_no_vtable
47607#endif
47608
47609#define in_consteval (::std::is_constant_evaluated())
47610
47611#define no_vtable_struct struct with_no_vtable
47612#define no_vtable_class class with_no_vtable
47613
47614//#define get_elc_defs using namespace ::elc::defs
47615
47616//file_end
47617
47618#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
47619
47620//file_end
47621
47622 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
47623
47624 namespace numerical_representation_n{
47625 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/representations/_body.hpp"
47626//_body.hpp
47627//at namespace elc::defs::numerical_representation_n
47628/*
47629未完成的elc解释器numerical_representation文件
47630由steve02081504与Alex0125设计、编写
47631转载时请在不对此文件做任何修改的同时注明出处
47632项目地址:https://github.com/ELC-lang/ELC
47633*/
47634/*
47635 ,??????????????????????????
47636 ????????????????????????????
47637 ?????????????????????????????+
47638 ?????+++++++++++++++++++++++++
47639 ?????+++++++++++++++++++++++++
47640 ??????++++++++++++++++++++++++
47641 ?????++
47642 ?????+++
47643 ??????+++IIIIIIIIIIIIIIIIII
47644 ?????+++++IIIIIIIIIIIIIIIIII
47645 ?????++++++++++++++++++++++++
47646 ??????+++++++++++++++++++++++:
47647 ?????++
47648 ?????+++
47649 ??????++
47650 ??????????????????????????????II
47651 ??????????????????????????????IIII
47652 ,?????????????????????????????IIIII+
47653 =???++++++++++++++++++++++++++III?
47654 ?++++++++++++++++++++++++++++I+
47655*/
47656#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/representations/comn.hpp"
47657//_body.hpp
47658//at namespace elc::defs::numerical_representation_n
47659/*
47660未完成的elc解释器numerical_representation文件
47661由steve02081504与Alex0125设计、编写
47662转载时请在不对此文件做任何修改的同时注明出处
47663项目地址:https://github.com/ELC-lang/ELC
47664*/
47665/*
47666 ,??????????????????????????
47667 ????????????????????????????
47668 ?????????????????????????????+
47669 ?????+++++++++++++++++++++++++
47670 ?????+++++++++++++++++++++++++
47671 ??????++++++++++++++++++++++++
47672 ?????++
47673 ?????+++
47674 ??????+++IIIIIIIIIIIIIIIIII
47675 ?????+++++IIIIIIIIIIIIIIIIII
47676 ?????++++++++++++++++++++++++
47677 ??????+++++++++++++++++++++++:
47678 ?????++
47679 ?????+++
47680 ??????++
47681 ??????????????????????????????II
47682 ??????????????????????????????IIII
47683 ,?????????????????????????????IIIII+
47684 =???++++++++++++++++++++++++++III?
47685 ?++++++++++++++++++++++++++++I+
47686*/
47690struct base_numerical_representation_t{
47691 virtual ~base_numerical_representation_t()noexcept=default;
47692 [[nodiscard]]virtual size_t get_radix()const noexcept=0;
47693 [[nodiscard]]virtual bool is_bit_friendly_radix()const noexcept{
47694 return get_radix()%BIT_POSSIBILITY==0;
47695 }
47696 [[nodiscard]]virtual char_t get_fractional_sign()const noexcept=0;
47697 [[nodiscard]]virtual char_t get_positive_sign()const noexcept=0;
47698 [[nodiscard]]virtual char_t get_negative_sign()const noexcept=0;
47699 [[nodiscard]]virtual string_view get_nan()const noexcept=0;
47700 [[nodiscard]]virtual string_view get_signaling_nan()const noexcept=0;
47701 [[nodiscard]]virtual string_view get_quiet_nan()const noexcept=0;
47702 [[nodiscard]]virtual string_view get_inf()const noexcept=0;
47703 [[nodiscard]]virtual char_t get_fractional_separator()const noexcept=0;
47704 [[nodiscard]]virtual char_t get_exponent_separator()const noexcept=0;
47705 [[nodiscard]]virtual char_t get_unknown_data_start_sign()const noexcept=0;
47706 [[nodiscard]]virtual char_t get_unknown_data_split_sign()const noexcept=0;
47707 [[nodiscard]]virtual char_t get_unknown_data_end_sign()const noexcept=0;
47708 [[nodiscard]]virtual char_t get_repetition_sign_start()const noexcept=0;
47709 [[nodiscard]]virtual char_t get_repetition_sign_end()const noexcept=0;
47710 [[nodiscard]]virtual char_t get_char(size_t index)const noexcept=0;
47711 [[nodiscard]]virtual size_t get_index(char_t c)const noexcept=0;
47712 [[nodiscard]]virtual bool is_valid_char(char_t ch)const noexcept=0;
47713protected:
47714 //获取unique_prime_factorization_table of radix
47715 [[nodiscard]]virtual array_like_view_t<const size_t>get_unique_prime_factorization_table_of_radix()const noexcept=0;
47716public:
47717 //根据分母部分获取弥补分母到radix的幂的乘数并返回,若是有限小数将分母部分置1并递增exp值
47718 template<unsigned_integer_type T>
47719 [[nodiscard]]T get_denominator_complement(T&denominator,ptrdiff_t&exp)const noexcept{
47720 const auto table=get_unique_prime_factorization_table_of_radix();
47721 const auto radix=get_radix();
47722 T aret=1u;
47723 for(const auto i:table){
47724 const auto i_complement=radix/i;
47725 auto result=divmod(denominator,i);
47726 while(result.quot && !result.mod){
47727 denominator=move(result.quot);
47728 aret*=i_complement;
47729 result=divmod(denominator,i);
47730 exp--;
47731 }
47732 }
47733 return aret;
47734 }
47735};
47736template<class T>
47737concept numerical_representation = is_base_of<base_numerical_representation_t,T>;//type_info<T>.is_base_on<base_numerical_representation_t>;
47738
47740class comn_constexpr_numerical_representation_t:public base_numerical_representation_t{
47741 char_t _fractional_sign=ec('.');
47742 char_t _positive_sign=ec('+');
47743 char_t _negative_sign=ec('-');
47744
47745 const constexpr_str _nan=es"NaN"_constexpr_str;
47746 const constexpr_str _signaling_nan=es"signaling_NaN"_constexpr_str;
47747 const constexpr_str _quiet_nan=es"quiet_NaN"_constexpr_str;
47748 const constexpr_str _inf=es"Infinity"_constexpr_str;
47749
47750 char_t _fractional_separator=ec('/');
47751 char_t _exponent_separator=ec('e');
47752 char_t _unknown_data_start_sign=ec('['), _unknown_data_split_sign=ec(','), _unknown_data_end_sign=ec(']');
47753 char_t _repetition_sign_start=ec('['), _repetition_sign_end=ec(']');
47754public:
47755 constexpr comn_constexpr_numerical_representation_t()noexcept=default;
47756 consteval comn_constexpr_numerical_representation_t(
47757 char_t fractional_sign,char_t positive_sign,char_t negative_sign,
47758 const constexpr_str& nan,
47759 const constexpr_str& signaling_nan,
47760 const constexpr_str& quiet_nan,
47761 const constexpr_str& inf,
47762 char_t fractional_separator,
47763 char_t exponent_separator,
47764 char_t unknown_data_start_sign, char_t unknown_data_split_sign, char_t unknown_data_end_sign,
47765 char_t repetition_sign_start, char_t repetition_sign_end)noexcept:
47766 _fractional_sign(fractional_sign),_positive_sign(positive_sign),_negative_sign(negative_sign),
47767 _nan(nan),_signaling_nan(signaling_nan),_quiet_nan(quiet_nan),_inf(inf),
47768 _fractional_separator(fractional_separator),
47769 _exponent_separator(exponent_separator),
47770 _unknown_data_start_sign(unknown_data_start_sign),_unknown_data_split_sign(unknown_data_split_sign),_unknown_data_end_sign(unknown_data_end_sign),
47771 _repetition_sign_start(repetition_sign_start),_repetition_sign_end(repetition_sign_end){}
47772 constexpr comn_constexpr_numerical_representation_t(char_t exponent_separator)noexcept:
47773 _exponent_separator(exponent_separator){}
47774
47775 [[nodiscard]]constexpr virtual char_t get_fractional_sign()const noexcept override{
47776 return _fractional_sign;
47777 }
47778 [[nodiscard]]constexpr virtual char_t get_positive_sign()const noexcept override{
47779 return _positive_sign;
47780 }
47781 [[nodiscard]]constexpr virtual char_t get_negative_sign()const noexcept override{
47782 return _negative_sign;
47783 }
47784 [[nodiscard]]constexpr virtual string_view get_nan()const noexcept override{
47785 return _nan;
47786 }
47787 [[nodiscard]]constexpr virtual string_view get_signaling_nan()const noexcept override{
47788 return _signaling_nan;
47789 }
47790 [[nodiscard]]constexpr virtual string_view get_quiet_nan()const noexcept override{
47791 return _quiet_nan;
47792 }
47793 [[nodiscard]]constexpr virtual string_view get_inf()const noexcept override{
47794 return _inf;
47795 }
47796 [[nodiscard]]constexpr virtual char_t get_fractional_separator()const noexcept override{
47797 return _fractional_separator;
47798 }
47799 [[nodiscard]]constexpr virtual char_t get_exponent_separator()const noexcept override{
47800 return _exponent_separator;
47801 }
47802 [[nodiscard]]constexpr virtual char_t get_unknown_data_start_sign()const noexcept override{
47803 return _unknown_data_start_sign;
47804 }
47805 [[nodiscard]]constexpr virtual char_t get_unknown_data_split_sign()const noexcept override{
47806 return _unknown_data_split_sign;
47807 }
47808 [[nodiscard]]constexpr virtual char_t get_unknown_data_end_sign()const noexcept override{
47809 return _unknown_data_end_sign;
47810 }
47811 [[nodiscard]]constexpr virtual char_t get_repetition_sign_start()const noexcept override{
47812 return _repetition_sign_start;
47813 }
47814 [[nodiscard]]constexpr virtual char_t get_repetition_sign_end()const noexcept override{
47815 return _repetition_sign_end;
47816 }
47817};
47818
47824template<char_t zero,size_t radix>
47825class constexpr_continuous_numerical_representation_t final:public comn_constexpr_numerical_representation_t{
47826 unique_prime_factorization_table_t<size_t,radix> _prime_factorization_table;
47827public:
47828 consteval constexpr_continuous_numerical_representation_t(
47829 char_t fractional_sign,char_t positive_sign,char_t negative_sign,
47830 const constexpr_str& nan,
47831 const constexpr_str& signaling_nan,
47832 const constexpr_str& quiet_nan,
47833 const constexpr_str& inf,
47834 char_t fractional_separator,
47835 char_t exponent_separator,
47836 char_t unknown_data_start_sign, char_t unknown_data_split_sign, char_t unknown_data_end_sign,
47837 char_t repetition_sign_start, char_t repetition_sign_end)noexcept:
47838 comn_constexpr_numerical_representation_t(
47839 fractional_sign,positive_sign,negative_sign,
47840 nan,signaling_nan,quiet_nan,inf,
47841 fractional_separator,
47842 exponent_separator,
47843 unknown_data_start_sign,unknown_data_split_sign,unknown_data_end_sign,
47844 repetition_sign_start,repetition_sign_end
47845 ){}
47846 constexpr constexpr_continuous_numerical_representation_t()noexcept{};
47847 constexpr constexpr_continuous_numerical_representation_t(char_t exponent_separator)noexcept:
47848 comn_constexpr_numerical_representation_t(exponent_separator){}
47849
47850 [[nodiscard]]constexpr virtual size_t get_radix()const noexcept override{
47851 return radix;
47852 }
47853 [[nodiscard]]constexpr virtual bool is_bit_friendly_radix()const noexcept override{
47854 return get_radix()%BIT_POSSIBILITY==0;
47855 }
47856 [[nodiscard]]constexpr virtual char_t get_char(size_t index)const noexcept override{
47857 return char_t(zero+index);
47858 }
47859 [[nodiscard]]constexpr virtual size_t get_index(char_t c)const noexcept override{
47860 return size_t{c}-zero;
47861 }
47862 [[nodiscard]]constexpr virtual bool is_valid_char(char_t ch)const noexcept override{
47863 return ch>=zero&&ch<zero+radix;
47864 }
47865protected:
47866 [[nodiscard]]virtual array_like_view_t<const size_t>get_unique_prime_factorization_table_of_radix()const noexcept override{
47867 return array_like_view_t<const size_t>{_prime_factorization_table};
47868 }
47869};
47871distinctive inline constexpr constexpr_continuous_numerical_representation_t<ec('0'),3> trinary{};
47872distinctive inline constexpr constexpr_continuous_numerical_representation_t<ec('0'),2> binary{};
47873distinctive inline constexpr constexpr_continuous_numerical_representation_t<ec('0'),8> octal{};
47874distinctive inline constexpr constexpr_continuous_numerical_representation_t<ec('0'),10> decimal{};
47875distinctive inline constexpr constexpr_continuous_numerical_representation_t<ec('ꀀ'),1165> valanlottish{
47876 /*fractional_sign*/ec('꒛'),/*positive_sign*/ec('꒜'),/*negative_sign*/ec('꒝'),
47877 /*nan*/es"꒘"_constexpr_str,
47878 /*signaling_nan*/es"꒗"_constexpr_str,
47879 /*quiet_nan*/es"꒖"_constexpr_str,
47880 /*inf*/es"꒾"_constexpr_str,
47881 /*fractional_separator*/ec('꒼'),
47882 /*exponent_separator*/ec('꒫'),
47883 /*unknown_data_start_sign*/ec('꒸'),/*unknown_data_split_sign*/ec('꓄'),/*unknown_data_end_sign*/ec('꒹'),
47884 /*repetition_sign_start*/ec('꒸'),/*repetition_sign_end*/ec('꒹')
47885};
47886//16和72进制的码表不是连续的,所以不能用constexpr_continuous_numerical_representation_t
47888
47892template<const constexpr_str*radix_table_p>
47893class constexpr_str_numerical_representation_t final:public comn_constexpr_numerical_representation_t{
47894 static constexpr size_t radix=radix_table_p->size();
47895 static constexpr const constexpr_str& radix_table=*radix_table_p;
47896
47897 unique_prime_factorization_table_t<size_t,radix> _prime_factorization_table;
47898public:
47899 consteval constexpr_str_numerical_representation_t(
47900 char_t fractional_sign,char_t positive_sign,char_t negative_sign,
47901 const constexpr_str& nan,
47902 const constexpr_str& signaling_nan,
47903 const constexpr_str& quiet_nan,
47904 const constexpr_str& inf,
47905 char_t fractional_separator,
47906 char_t exponent_separator,
47907 char_t unknown_data_start_sign, char_t unknown_data_split_sign, char_t unknown_data_end_sign,
47908 char_t repetition_sign_start, char_t repetition_sign_end)noexcept:
47909 comn_constexpr_numerical_representation_t(
47910 fractional_sign,positive_sign,negative_sign,
47911 nan,signaling_nan,quiet_nan,inf,
47912 fractional_separator,
47913 exponent_separator,
47914 unknown_data_start_sign,unknown_data_split_sign,unknown_data_end_sign,
47915 repetition_sign_start,repetition_sign_end
47916 ){}
47917 constexpr constexpr_str_numerical_representation_t()noexcept{};
47918 constexpr constexpr_str_numerical_representation_t(char_t exponent_separator)noexcept:
47919 comn_constexpr_numerical_representation_t(exponent_separator){}
47920
47921 [[nodiscard]]constexpr virtual size_t get_radix()const noexcept override{
47922 return radix_table.size();
47923 }
47924 [[nodiscard]]constexpr virtual bool is_bit_friendly_radix()const noexcept override{
47925 return get_radix()%BIT_POSSIBILITY==0;
47926 }
47927 [[nodiscard]]constexpr virtual char_t get_char(size_t index)const noexcept override{
47928 return radix_table[index];
47929 }
47930 [[nodiscard]]constexpr virtual size_t get_index(char_t ch)const noexcept override{
47931 return radix_table.find(ch);
47932 }
47933 [[nodiscard]]constexpr virtual bool is_valid_char(char_t ch)const noexcept override{
47934 return radix_table.find(ch)!=constexpr_str::npos;
47935 }
47936protected:
47937 [[nodiscard]]virtual array_like_view_t<const size_t>get_unique_prime_factorization_table_of_radix()const noexcept override{
47938 return array_like_view_t<const size_t>{_prime_factorization_table};
47939 }
47940};
47942//在上方已经定义了trinary,binary,octal,decimal
47943//这里定义hexadecimal和hexadecimal_upper
47944distinctive inline constexpr constexpr_str_numerical_representation_t<&es"0123456789abcdef"_constexpr_str> hexadecimal{ec('V')};
47945distinctive inline constexpr constexpr_str_numerical_representation_t<&es"0123456789ABCDEF"_constexpr_str> hexadecimal_upper{ec('v')};
47947
47950class comn_numerical_representation_t final:public base_numerical_representation_t{
47951 string _radix_table;
47952 char_t _fractional_sign;
47953 char_t _positive_sign;
47954 char_t _negative_sign;
47955 string _nan, _signaling_nan, _quiet_nan;
47956 string _inf;
47957 char_t _fractional_separator;
47958 char_t _exponent_separator;
47959 char_t _unknown_data_start_sign, _unknown_data_split_sign, _unknown_data_end_sign;
47960 char_t _repetition_sign_start, _repetition_sign_end;
47961 array_t<size_t> _unique_prime_factorization_table;
47962public:
47963 comn_numerical_representation_t(
47964 string radix_table=es"0123456789"_constexpr_str,
47965 char_t fractional_sign=ec('.'),char_t positive_sign=ec('+'),char_t negative_sign=ec('-'),
47966 string nan=es"NaN"_constexpr_str,
47967 string signaling_nan=es"signaling_NaN"_constexpr_str,
47968 string quiet_nan=es"quiet_NaN"_constexpr_str,
47969 string inf=es"Infinity"_constexpr_str,
47970 char_t fractional_separator=ec('.'),
47971 char_t exponent_separator=ec('e'),
47972 char_t unknown_data_start_sign=ec('['), char_t unknown_data_split_sign=ec(','), char_t unknown_data_end_sign=ec(']'),
47973 char_t repetition_sign_start=ec('['), char_t repetition_sign_end=ec(']'))noexcept:
47974 _radix_table(move(radix_table)),
47975 _fractional_sign(fractional_sign),_positive_sign(positive_sign),_negative_sign(negative_sign),
47976 _nan(move(nan)),_signaling_nan(move(signaling_nan)),_quiet_nan(move(quiet_nan)),_inf(move(inf)),
47977 _fractional_separator(fractional_separator),
47978 _exponent_separator(exponent_separator),
47979 _unknown_data_start_sign(unknown_data_start_sign),_unknown_data_split_sign(unknown_data_split_sign),_unknown_data_end_sign(unknown_data_end_sign),
47980 _repetition_sign_start(repetition_sign_start),_repetition_sign_end(repetition_sign_end){
47981 //计算质因数:get_prime_factorization(num).unique().to<容器类型>();
47982 _unique_prime_factorization_table=get_prime_factorization(_radix_table.size()).unique().to<array_t<size_t>>();
47983 }
47984 [[nodiscard]]virtual size_t get_radix()const noexcept override{
47985 return _radix_table.size();
47986 }
47987 [[nodiscard]]constexpr virtual char_t get_fractional_sign()const noexcept override{
47988 return _fractional_sign;
47989 }
47990 [[nodiscard]]constexpr virtual char_t get_positive_sign()const noexcept override{
47991 return _positive_sign;
47992 }
47993 [[nodiscard]]constexpr virtual char_t get_negative_sign()const noexcept override{
47994 return _negative_sign;
47995 }
47996 [[nodiscard]]virtual string_view get_nan()const noexcept override{
47997 return _nan;
47998 }
47999 [[nodiscard]]virtual string_view get_signaling_nan()const noexcept override{
48000 return _signaling_nan;
48001 }
48002 [[nodiscard]]virtual string_view get_quiet_nan()const noexcept override{
48003 return _quiet_nan;
48004 }
48005 [[nodiscard]]virtual string_view get_inf()const noexcept override{
48006 return _inf;
48007 }
48008 [[nodiscard]]constexpr virtual char_t get_fractional_separator()const noexcept override{
48009 return _fractional_separator;
48010 }
48011 [[nodiscard]]constexpr virtual char_t get_exponent_separator()const noexcept override{
48012 return _exponent_separator;
48013 }
48014 [[nodiscard]]constexpr virtual char_t get_unknown_data_start_sign()const noexcept override{
48015 return _unknown_data_start_sign;
48016 }
48017 [[nodiscard]]constexpr virtual char_t get_unknown_data_split_sign()const noexcept override{
48018 return _unknown_data_split_sign;
48019 }
48020 [[nodiscard]]constexpr virtual char_t get_unknown_data_end_sign()const noexcept override{
48021 return _unknown_data_end_sign;
48022 }
48023 [[nodiscard]]constexpr virtual char_t get_repetition_sign_start()const noexcept override{
48024 return _repetition_sign_start;
48025 }
48026 [[nodiscard]]constexpr virtual char_t get_repetition_sign_end()const noexcept override{
48027 return _repetition_sign_end;
48028 }
48029 [[nodiscard]]virtual char_t get_char(size_t index)const noexcept override{
48030 return _radix_table[index];
48031 }
48032 [[nodiscard]]virtual size_t get_index(char_t ch)const noexcept override{
48033 return _radix_table.find(ch);
48034 }
48035 [[nodiscard]]virtual bool is_valid_char(char_t ch)const noexcept override{
48036 return _radix_table.find(ch)!=string::npos;
48037 }
48038protected:
48039 [[nodiscard]]virtual array_like_view_t<const size_t>get_unique_prime_factorization_table_of_radix()const noexcept override{
48040 return array_like_view_t<const size_t>{_unique_prime_factorization_table};
48041 }
48042};
48043
48044//file_end
48045
48046#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/representations/_body.hpp"
48047#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/representations/bool.hpp"
48048//bool.hpp
48049//at namespace elc::defs::numerical_representation_n
48050/*
48051未完成的elc解释器numerical_representation文件
48052由steve02081504与Alex0125设计、编写
48053转载时请在不对此文件做任何修改的同时注明出处
48054项目地址:https://github.com/ELC-lang/ELC
48055*/
48056/*
48057 ,??????????????????????????
48058 ????????????????????????????
48059 ?????????????????????????????+
48060 ?????+++++++++++++++++++++++++
48061 ?????+++++++++++++++++++++++++
48062 ??????++++++++++++++++++++++++
48063 ?????++
48064 ?????+++
48065 ??????+++IIIIIIIIIIIIIIIIII
48066 ?????+++++IIIIIIIIIIIIIIIIII
48067 ?????++++++++++++++++++++++++
48068 ??????+++++++++++++++++++++++:
48069 ?????++
48070 ?????+++
48071 ??????++
48072 ??????????????????????????????II
48073 ??????????????????????????????IIII
48074 ,?????????????????????????????IIIII+
48075 =???++++++++++++++++++++++++++III?
48076 ?++++++++++++++++++++++++++++I+
48077*/
48081struct base_bool_representation_t{
48082 virtual ~base_bool_representation_t()noexcept=default;
48083 virtual string_view get_true()const noexcept=0;
48084 virtual string_view get_false()const noexcept=0;
48085 virtual string_view get_other_prefix()const noexcept=0;
48086 virtual string_view get_other_suffix()const noexcept=0;
48087};
48088template<class T>
48089concept bool_representation=is_base_of<base_bool_representation_t,T>;
48093struct common_bool_representation_t:base_bool_representation_t{
48094 string_view get_true()const noexcept override{
48095 return es"true"_constexpr_str;
48096 }
48097 string_view get_false()const noexcept override{
48098 return es"false"_constexpr_str;
48099 }
48100 string_view get_other_prefix()const noexcept override{
48101 return es"other("_constexpr_str;
48102 }
48103 string_view get_other_suffix()const noexcept override{
48104 return es")"_constexpr_str;
48105 }
48106};
48107constexpr common_bool_representation_t common_bool_representation{};
48108
48109//file_end
48110
48111#line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/representations/_body.hpp"
48112
48113//file_end
48114
48115 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
48116 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/to_string/_body.hpp"
48117//_body.hpp
48118//at namespace elc::defs::numerical_representation_n
48119/*
48120未完成的elc解释器numerical_representation文件
48121由steve02081504与Alex0125设计、编写
48122转载时请在不对此文件做任何修改的同时注明出处
48123项目地址:https://github.com/ELC-lang/ELC
48124*/
48125/*
48126 ,??????????????????????????
48127 ????????????????????????????
48128 ?????????????????????????????+
48129 ?????+++++++++++++++++++++++++
48130 ?????+++++++++++++++++++++++++
48131 ??????++++++++++++++++++++++++
48132 ?????++
48133 ?????+++
48134 ??????+++IIIIIIIIIIIIIIIIII
48135 ?????+++++IIIIIIIIIIIIIIIIII
48136 ?????++++++++++++++++++++++++
48137 ??????+++++++++++++++++++++++:
48138 ?????++
48139 ?????+++
48140 ??????++
48141 ??????????????????????????????II
48142 ??????????????????????????????IIII
48143 ,?????????????????????????????IIIII+
48144 =???++++++++++++++++++++++++++III?
48145 ?++++++++++++++++++++++++++++I+
48146*/
48147namespace to_string_n{
48148 //用于记录转换过程中的状态
48149 class convert_state_t{
48150 //是否出错
48151 bool _error=false;
48152 //是否出现了非法字符
48153 bool _has_invalid_char=false;
48154 //含有分数?
48155 bool _has_fractional=false;
48156 //含有小数?
48157 bool _has_decimal=false;
48158 //含有指数?
48159 bool _has_exponent=false;
48160 public:
48161 constexpr convert_state_t()noexcept=default;
48162 constexpr convert_state_t(const convert_state_t&)=default;
48163 constexpr convert_state_t(convert_state_t&&)=default;
48164 constexpr convert_state_t&operator=(const convert_state_t&)=default;
48165 constexpr convert_state_t&operator=(convert_state_t&&)=default;
48166 ~convert_state_t()noexcept=default;
48167 void reset()noexcept{
48168 *this=convert_state_t{};
48169 }
48170 [[nodiscard]]constexpr bool error()const noexcept{return _error;}
48171 [[nodiscard]]constexpr bool success()const noexcept{return !error();}
48172 [[nodiscard]]constexpr bool has_invalid_char()const noexcept{return _has_invalid_char;}
48173 [[nodiscard]]constexpr bool has_fractional()const noexcept{return _has_fractional;}
48174 [[nodiscard]]constexpr bool has_decimal()const noexcept{return _has_decimal;}
48175 [[nodiscard]]constexpr bool has_exponent()const noexcept{return _has_exponent;}
48176 constexpr void set_error()noexcept{_error=true;}
48177 constexpr void set_has_invalid_char()noexcept{_has_invalid_char=true;}
48178 constexpr void set_has_fractional()noexcept{_has_fractional=true;}
48179 constexpr void set_has_decimal()noexcept{_has_decimal=true;}
48180 constexpr void set_has_exponent()noexcept{_has_exponent=true;}
48181 };
48182 template<numerical_representation representation_t>
48183 class string_convert_impl{
48184 //以任意的给定进制类型转换为字符串
48185 const representation_t& _repres;
48186 public:
48187 constexpr string_convert_impl(const representation_t&repres)noexcept:_repres(repres){}
48188 private:
48189 //基础部分
48190 [[nodiscard]]constexpr string build_expression_str(string base,ptrdiff_t exp)const noexcept{
48191 if(exp<0){
48192 auto exp_str=to_string(exp);
48193 //首先计算需要的前置0的个数
48194 const auto need_zero=size_t(max.for_type<ptrdiff_t>(0,-exp+1-base.size()));
48195 if(need_zero>exp_str.size()){//选取最短表达
48196 base+=_repres.get_exponent_separator();
48197 base+=exp_str;
48198 }
48199 else{
48200 if(need_zero)
48201 base.push_front(_repres.get_char(0),need_zero);
48202 //插入小数点
48203 const auto dot_pos=base.size()+exp;
48204 base.insert(dot_pos,_repres.get_fractional_sign());
48205 }
48206 }
48207 elseif(exp>0)
48208 base=build_expression_str(base,size_t(exp));
48209 return base;
48210 }
48211 [[nodiscard]]constexpr string build_expression_str(string base,size_t exp)const noexcept{
48212 if(exp){
48213 auto exp_str=to_string(exp);
48214 if(exp>exp_str.size()+1){
48215 base+=_repres.get_exponent_separator();
48216 base+=exp_str;
48217 }
48218 else//否则,补0
48219 base.push_back(_repres.get_char(0),exp);
48220 }
48221 return base;
48222 }
48223 //整数部分
48224 public:
48225 template<integer_type T>//适用于任何c++整数类型以及elc的bigint和ubigint
48226 [[nodiscard]]string to_string(T num)const noexcept{
48227 if constexpr(type_info<T> == type_info<bool>)
48228 return to_string(union_cast<unsigned_specific_size_t<sizeof(bool)>>(move(num)));
48229 elseif constexpr(is_signed<T>){
48230 if(is_negative(num))
48231 return _repres.get_negative_sign()+to_string(abs(move(num)));
48232 else
48233 return to_string(abs(move(num)));
48234 }
48235 else
48236 return to_string_unsigneded(move(num));
48237 }
48238 private:
48239 template<unsigned_integer_type T>//适用于任何c++无符号整数类型以及elc的ubigint
48240 [[nodiscard]]string to_string_unsigneded(T num)const noexcept{
48241 return to_string_base<T>(move(num));
48242 }
48243 template<unsigned_integer_type T>//适用于任何c++无符号整数类型以及elc的ubigint
48244 [[nodiscard]]string to_string_with_exp(T num)const noexcept{
48245 ptrdiff_t exp;
48246 auto aret=to_string_and_set_exp(move(num),exp);
48247 return build_expression_str(move(aret),exp);
48248 }
48249 template<unsigned_integer_type T>//适用于任何c++无符号整数类型以及elc的ubigint
48250 [[nodiscard]]string to_string_and_set_exp(T num,ptrdiff_t&exp)const noexcept{
48251 return to_string_and_add_exp(move(num),exp=0);
48252 }
48253 template<unsigned_integer_type T>//适用于任何c++无符号整数类型以及elc的ubigint
48254 [[nodiscard]]string to_string_and_add_exp(T num,ptrdiff_t&exp)const noexcept{
48255 const auto radix=_repres.get_radix();
48256 while(num){
48257 auto result=divmod(num,radix);
48258 if(result.mod)
48259 break;
48260 num=T(move(result.quot));
48261 ++exp;
48262 }
48263 return to_string_base(move(num));
48264 }
48265 template<unsigned_integer_type T>//适用于任何c++无符号整数类型以及elc的ubigint
48266 [[nodiscard]]string to_string_base(T num)const noexcept{
48267 string aret;
48268 const auto radix=_repres.get_radix();
48269 if constexpr(is_basic_type<T>){
48270 //基本类型有最大值,可以预分配足够的空间来提高效率
48271 constexpr auto info_threshold_base = pow(BIT_POSSIBILITY, bitnum_of(T));
48272 const auto info_threshold = to_size_t(ceil(log(info_threshold_base, radix)));
48273 aret.pre_alloc_before_begin(info_threshold);
48274 }
48275 if constexpr(is_big_type<T>){
48276 if(num.is_safe_convert_to<size_t>())
48277 return to_string(num.convert_to<size_t>());
48278 else{
48279 //大整数类型可以通过分治法来提高效率
48280 T base{radix};
48281 size_t len=1;//余数部分要补的前导0个数
48282 //计算分割点
48283 while(base.fast_size_method()*3 < num.fast_size_method()){
48284 len *= 2;
48285 base *= base;
48286 }
48287 //算出分割后的高位和低位
48288 auto [high,low] = divmod(move(num),move(base));
48289 return to_string(move(high)) + to_string(move(low)).pad_left(_repres.get_char(0), len);
48290 }
48291 }
48292 else{
48294 do{//do-while是为了保证至少有一位"0"
48295 auto res=divmod(move(num),radix);
48296 const auto index=to_size_t(move(res.mod));
48297 const auto ch=_repres.get_char(index);
48298 aret.push_front(ch);
48299 num=move(res.quot);
48300 }while(num);
48302 return aret;
48303 }
48304 }
48305 //浮点数部分
48306 template<float_type T>
48307 [[nodiscard]]string to_string_NaN_handle(T num)const noexcept{
48308 if constexpr(is_basic_type<T>){
48310 constexpr auto signaling_NaN = arithmetic_type_info_prover<T>::signaling_NaN();
48311 if(full_equal_in_byte(signaling_NaN,num)){
48312 return _repres.get_signaling_nan();
48313 }
48314 auto negative_signaling_NaN = copy_as_negative(signaling_NaN);
48315 if(full_equal_in_byte(negative_signaling_NaN,num)){
48316 return string()+_repres.get_negative_sign()+_repres.get_signaling_nan();
48317 }
48318 }
48320 constexpr auto quiet_NaN = arithmetic_type_info_prover<T>::quiet_NaN();
48321 if(full_equal_in_byte(quiet_NaN,num)){
48322 return _repres.get_quiet_nan();
48323 }
48324 auto negative_quiet_NaN = copy_as_negative(quiet_NaN);
48325 if(full_equal_in_byte(negative_quiet_NaN,num)){
48326 return string()+_repres.get_negative_sign()+_repres.get_quiet_nan();
48327 }
48328 }
48329 string aret=_repres.get_nan();
48330 aret+=_repres.get_unknown_data_start_sign();
48331 const auto radix = _repres.get_radix();
48332 const auto unknown_data_split_sign = _repres.get_unknown_data_split_sign();
48333 const bool needs_split_sign = radix < number_of_possible_values_per<char>;
48334 data_view<T> view{&num};
48335 for(const byte c: view){
48336 aret += to_string((unsigned char)c);
48337 if(needs_split_sign)
48338 aret += unknown_data_split_sign;
48339 }
48340 if(needs_split_sign)
48341 aret.back()=_repres.get_unknown_data_end_sign();
48342 else
48343 aret+=_repres.get_unknown_data_end_sign();
48344 return aret;
48345 }
48346 else
48347 return _repres.get_nan();
48348 }
48349 template<float_type T>
48350 [[nodiscard]]string to_string_Inf_handle(T num)const noexcept{
48351 if constexpr(is_basic_type<T>){
48352 constexpr auto infinity = arithmetic_type_info_prover<T>::Inf();
48353 if(full_equal_in_byte(infinity,num))
48354 return _repres.get_inf();
48355 else
48356 return string()+_repres.get_negative_sign()+_repres.get_inf();
48357 }
48358 else{
48359 if(is_negative(num))
48360 return _repres.get_negative_sign()+_repres.get_inf();
48361 else
48362 return _repres.get_inf();
48363 }
48364 }
48365 public:
48366 template<float_type T>
48367 [[nodiscard]]string to_string(T num)const noexcept{
48368 //首先,特殊值检查
48369 if(isNaN(num))
48370 return to_string_NaN_handle(move(num));
48371 elseif(isInf(num))
48372 return to_string_Inf_handle(move(num));
48373 //然后分符号处理
48374 if(is_negative(num))
48375 return _repres.get_negative_sign()+to_string_unsigneded(abs(move(num)));
48376 else
48377 return to_string_unsigneded(abs(move(num)));
48378 }
48379 template<fraction_float_type T>//适用于任何分数法记录的浮点类型
48380 [[nodiscard]]string to_string_fractional(T num)const noexcept{
48381 //首先,特殊值检查
48382 if(isNaN(num))
48383 return to_string_NaN_handle(move(num));
48384 elseif(isInf(num))
48385 return to_string_Inf_handle(move(num));
48386 //然后分符号处理
48387 if(is_negative(num))
48388 return _repres.get_negative_sign()+to_string_fractional_base(abs(move(num)));
48389 else
48390 return to_string_fractional_base(abs(move(num)));
48391 }
48392 private:
48393 template<float_type T>
48394 [[nodiscard]]string to_string_unsigneded(T num)const noexcept{
48395 return to_string_base(move(num));
48396 }
48397 template<float_type T,unsigned_integer_type num_t>
48398 [[nodiscard]]inline void apply_info_threshold(num_t&num,ptrdiff_t&exp,const T&check_num)const noexcept{
48399 if constexpr(is_basic_type<T>){//若T是基础类型
48400 const auto radix=_repres.get_radix();
48401 //根据basic_environment::float_infos::precision_base<T>*2*radix计算阈值
48402 constexpr auto info_threshold_base=basic_environment::float_infos::precision_base<T>*2;
48403 //获取info_threshold_num
48404 const auto info_threshold_num=info_threshold_base*radix;
48405 {
48406 //这里我们需要一次生成radix^x大小的数来让num快速减小,以加速后续的循环
48407 //但不能通过上文中的info_threshold_base计算,因为适当的舍入是必要的,所以需要一个更为宽松但又合适的阈值
48408 //因此我们需要一个新的阈值,根据信息论第一定理,我们可以假设新的阈值基础为unsigned_specific_size_t<sizeof(T)>所容纳的信息量
48409 //其比info_threshold_base更为宽松,但又合适于限制num的大小
48410 typedef unsigned_specific_size_t<sizeof(T)> new_info_threshold_base;
48411 //计算新的阈值
48412 const auto info_threshold_of_radix_num=to_size_t(ceil(log(max(type_info<new_info_threshold_base>),radix)));
48413 const auto num_of_radix=integer_log(num,radix);
48414 const ptrdiff_t diff=num_of_radix-info_threshold_of_radix_num;
48415 if(diff>0){
48416 num/=pow(num_t{radix},size_t(diff));
48417 exp+=diff;
48418 }
48419 }
48420 //舍入相关
48421 const auto rounding_threshold=radix/2;
48422 auto rounding=exλ(bool skip_zeros,auto backup_updater,auto exp_updater)noexcept{
48423 auto result=divmod(move(num),radix);
48424 if(skip_zeros)//处理多余的0
48425 if(!result.mod){
48426 backup_updater(assign(num,move(result.quot)),++exp);
48427 exp_updater(exp);
48428 result=divmod(move(num),radix);
48429 }
48430 if(result.mod>=rounding_threshold)//舍入
48431 ++result.quot;
48432 num=move(result.quot);
48433 exp_updater(++exp);
48434 };
48435 //更新exp并舍入num直到num小于info_threshold_num
48436 while(num>info_threshold_num)
48437 rounding(false,do_nothing,do_nothing);
48438 //额外的舍入检查为了更精确的处理
48439 if(num>info_threshold_base){
48440 auto num_backup=num;auto exp_backup=exp;
48441 auto backup_updater=exλ(const auto&new_num,const auto&new_exp)noexcept{
48442 num_backup=new_num;exp_backup=new_exp;
48443 };
48444 auto exp_pows=pow((ubigint)radix,exp);
48445 auto exp_updater=exλ(const auto&)noexcept{exp_pows*=radix;};
48446 floop{
48447 //首先进行舍入
48448 rounding(true,backup_updater,exp_updater);
48449 //然后判断是否需要继续
48450 auto tmp_bigfloat=num*exp_pows;
48451 if(tmp_bigfloat.convert_to<T>()==check_num)
48452 backup_updater(num,exp);
48453 else
48454 break;
48455 }
48456 num=move(num_backup);exp=move(exp_backup);
48457 }
48458 }
48459 }
48460 template<float_type T,unsigned_integer_type num_base_t>
48461 [[nodiscard]]string string_builder(T num,num_base_t number,ptrdiff_t&exp)const noexcept{
48462 //根据类型需求对number进行截断
48463 apply_info_threshold<T>(number,exp,num);
48464 //先获取number的字符串
48465 auto tmp=to_string_and_add_exp(move(number),exp);
48466 //然后就着exp输出
48467 return build_expression_str(move(tmp),exp);
48468 }
48469 template<exponent_float_type T>//适用于任何指数法记录的浮点类型
48470 [[nodiscard]]string to_string_base(T num)const noexcept{
48471 //首先,猜测分数
48472 if(auto[numerator,denominator,divide_success]=to_divide(num);divide_success){
48473 if(denominator!=1u){//分母不为1:正规分数
48474 ptrdiff_t exp=0;
48475 const auto complete=_repres.get_denominator_complement(denominator,exp);
48476 //现在denominator是1?若不是则说明这是一个无限小数
48477 //若无限小数,以分数形式输出
48478 if(denominator!=1u){
48479 //先恢复denominator
48480 denominator*=complete;
48481 //呃,这里我们需要稍微处理一下numerator,考虑到其类型是T,而不是什么整数类型
48482 //若numerator小于size_t的最大值,那么我们就可以直接转换为size_t
48483 //否则,我们就需要转换为ubigint
48484 string aret;
48485 if(numerator<=max(type_info<size_t>))
48486 aret=to_string_with_exp(to_size_t(numerator));
48487 else
48488 aret=to_string_with_exp((ubigint)numerator);
48489 return aret+_repres.get_fractional_separator()+to_string_unsigneded(denominator);
48490 }
48491 //否则我们下落到以小数形式输出
48492 }
48493 //整数部分可以在这里处理,但是若进入ubigint处理会出现不必要的计算
48494 elseif(numerator<=max(type_info<size_t>))
48495 return to_string_with_exp(to_size_t(numerator));
48496 //所以在下面再处理特大整数的情况
48497 }
48498 //然后分情况处理
48499 const auto[precision,exponent]=get_precision_and_exponent(num);//声明个info和exp先
48500 ptrdiff_t exp=exponent;
48501 //首先判断进制是否是BIT_POSSIBILITY的整数倍
48502 if(_repres.is_bit_friendly_radix()){
48503 const auto radix=_repres.get_radix();
48504 const auto radix_diff=radix>>1;//用于补数
48505 //这边情况是比较好处理的,因为exp的base是BIT_POSSIBILITY,所以该数肯定是有限小数
48506 //所以我们需要做的就是,呃
48507 //首先新建一个base是radix的exp值,并将现有的exp降低为0
48508 //对于exp部分,塞入number
48509 ubigint number=precision;//避免溢出
48510 if(exp<0)
48511 number*=pow((ubigint)radix_diff,abs(exp));
48512 elseif(exp>0){
48513 auto result=divmod(number,radix_diff);
48514 ptrdiff_t new_exp=0;
48515 while(exp&&!result.mod){
48516 number=move(result.quot);
48517 --exp;
48518 ++new_exp;
48519 result=divmod(number,radix_diff);
48520 }
48521 number<<=exp;
48522 exp=new_exp;
48523 }
48524 return string_builder(num,move(number),exp);
48525 }
48526 else{
48527 //可惜没有额外的优化
48528 //这里很好笑,因为输出进制不是bit的整数倍,这意味着你无法用有限小数表示这个数
48529 if(exp<0){
48530 //将num转换为分数,然后输出
48531 //需要化简分数吗?呃,虚空说答案是不
48532 const auto numerator=precision;
48533 const auto denominator=ubigint(1u)<<abs(exponent);
48534 return to_string_with_exp(numerator)+_repres.get_fractional_separator()+to_string_unsigneded(denominator);
48535 }
48536 else{
48537 ubigint number=precision;
48538 number<<=exp;
48539 return to_string_with_exp(number);
48540 }
48541 }
48542 }
48543 template<fraction_float_type T>//适用于任何分数法记录的浮点类型
48544 [[nodiscard]]string to_string_base(T num)const noexcept{
48545 simplify(num);//化简
48546 ptrdiff_t exp=0;
48547 auto& numerator=get_numerator_as_ref(num);
48548 if(!numerator)
48549 return _repres.get_char(0);
48550 auto& denominator=get_denominator_as_ref(num);
48551 if(denominator==1u)
48552 return to_string_with_exp(move(numerator));
48553 const auto radix=_repres.get_radix();
48554 {
48555 auto denominator_backup=denominator;//备份denominator用于在发现此为无限小数时继续输出(省去还原计算)
48556 auto clear_backup=exλ()noexcept{denominator_backup=decltype(denominator_backup){};};//即时清空denominator_backup以节省内存
48557 //化简为numerator*radix^exp
48558 {
48559 auto result=divmod(denominator,radix);
48560 while(result.quot&&!result.mod){
48561 denominator=move(result.quot);
48562 --exp;
48563 result=divmod(denominator,radix);
48564 }
48565 }
48566 auto complete=_repres.get_denominator_complement(denominator,exp);
48567 //现在denominator是1?若不是则说明这是一个无限小数
48568 //若无限小数,以分数形式输出
48569 if(denominator!=1){
48570 auto fractional_separator=_repres.get_fractional_separator();
48571 denominator=move(denominator_backup);
48572 clear_backup();//考虑到右值赋值的实现很可能是swap,这个调用是有意义的
48573 return to_string(move(numerator))+fractional_separator+to_string(move(denominator));
48574 }
48575 clear_backup();
48576 numerator*=complete;
48577 }
48578 return string_builder(num,move(numerator),exp);
48579 }
48580 template<fraction_float_type T>//适用于任何分数法记录的浮点类型
48581 [[nodiscard]]string to_string_fractional_base(T num)const noexcept{
48582 auto& numerator=get_numerator_as_ref(num);
48583 if(!numerator)return _repres.get_char(0);
48584 auto& denominator=get_denominator_as_ref(num);
48585 array_t<remove_cvref<decltype(numerator)>> numerator_array;
48586 string result;
48587 {
48588 const auto info=divmod(numerator,denominator);
48589 result=to_string(info.quot);
48590 numerator=move(info.mod);
48591 }
48592 result+=_repres.get_fractional_sign();
48593 auto functional_part_begin=result.size();
48594 const auto radix=_repres.get_radix();
48595 while(numerator){
48596 numerator*=radix;
48597 const auto info=divmod(numerator,denominator);
48598 numerator=move(info.mod);
48599 if(auto index=numerator_array.find(numerator);index!=nullptr){
48600 result.insert(index-numerator_array.begin()+functional_part_begin,_repres.get_repetition_sign_start());
48601 result+=_repres.get_repetition_sign_end();
48602 break;
48603 }
48604 result+=_repres.get_char(to_size_t(info.quot));
48605 numerator_array.push_back(numerator);
48606 }
48607 return result;
48608 }
48609 private:
48610 //to_string定义完了,开始定义from_string_get
48611 template<class T> requires(type_info<T> == type_info<ubigfloat>)
48612 [[nodiscard]]ubigfloat from_string_get_base(string str,convert_state_t&state)const noexcept{
48613 {
48614 const auto exponent_pos = str.find_last_of(_repres.get_exponent_separator());
48615 if(exponent_pos != string::npos){
48616 state.set_has_exponent();
48617 auto expstr = str.substr(exponent_pos+1);
48618 str = str.substr(0,exponent_pos);
48619 auto exp = from_string_get<bigint>(expstr,state);
48620 if(not state.success())
48621 return {};
48622 auto base = from_string_get_base<T>(str,state);
48623 if(not state.success())
48624 return {};
48625 return base*pow(_repres.get_radix(),exp);
48626 }
48627 }
48628 {
48629 const auto fractional_pos = str.find_first_of(_repres.get_fractional_separator());//分数
48630 if(fractional_pos != string::npos){
48631 state.set_has_fractional();
48632 auto numeratorstr = str.substr(0,fractional_pos);
48633 str = str.substr(fractional_pos+1);
48634 const auto& denominatorstr = str;
48635 auto numerator = from_string_get_base<T>(numeratorstr,state);
48636 if(not state.success())
48637 return {};
48638 auto denominator = from_string_get_base<T>(denominatorstr,state);
48639 if(not state.success())
48640 return {};
48641 return numerator/denominator;
48642 }
48643 }
48644 {
48645 const auto fractional_pos = str.find_first_of(_repres.get_fractional_sign());//小数
48646 if(fractional_pos != string::npos){
48647 state.set_has_decimal();
48648 auto integerstr = str.substr(0,fractional_pos);
48649 str = str.substr(fractional_pos+1);
48650 const auto& fractionalstr = str;
48651 auto integer = from_string_get<ubigint>(integerstr,state);
48652 if(not state.success())
48653 return {};
48654 auto fractional = from_string_get<ubigint>(fractionalstr,state);
48655 if(not state.success())
48656 return {};
48657 auto saclen = pow(ubigint{_repres.get_radix()},fractionalstr.size());
48658 auto numerator = integer*saclen+fractional;
48659 auto denominator = saclen;
48660 return ubigfloat::build_from_numerator_and_denominator(numerator, denominator);
48661 }
48662 }
48663 //纯纯的整数
48664 return from_string_get<ubigint>(str,state);
48665 }
48666 //ubigfloat
48667 template<class T> requires(type_info<T> == type_info<ubigfloat>)
48668 [[nodiscard]]ubigfloat from_string_get_unsigneded(const string&str,convert_state_t&state)const noexcept{
48669 //首先判断特殊值
48670 if(str==_repres.get_nan())
48672 elseif(str==_repres.get_inf())
48673 return arithmetic_type_info_prover<double>::Inf();
48674 else
48675 return from_string_get_base<ubigfloat>(str,state);
48676 }
48677 //floats
48678 private:
48679 template<basic_float_type T>
48680 [[nodiscard]]T from_string_get_unsigneded(string str,convert_state_t&state)const noexcept{
48681 //首先判断特殊值
48682 if constexpr(has_NaN<T>){
48684 if(str==_repres.get_signaling_nan())
48687 if(str==_repres.get_quiet_nan())
48689 if(str.starts_with(_repres.get_nan())){
48690 str.remove_front(_repres.get_nan().size());
48691 if(str && str.back()==_repres.get_unknown_data_end_sign()){
48692 str.remove_front();
48693 str.remove_back();
48694 data_block<T> block;
48695 size_t write_index = 0;
48696
48697 const auto radix = _repres.get_radix();
48698 const auto unknown_data_split_sign = _repres.get_unknown_data_split_sign();
48699 const bool needs_split_sign = radix < number_of_possible_values_per<char>;
48700 while(state.success()){
48701 if(needs_split_sign){
48702 const size_t dot_pos = str.find(unknown_data_split_sign);
48703 auto byte_str = str.substr(0, dot_pos);
48704 block[write_index++] = (byte)from_string_get_unsigneded<unsigned char>(byte_str,state);
48705 if(dot_pos == string::npos)
48706 break;
48707 str = str.substr(dot_pos+1);
48708 }
48709 else
48710 block[write_index++] = (byte)from_string_get_unsigneded<unsigned char>(str.pop_front(),state);
48711 }
48712 return state.success()?data_cast<T>(block):T{};
48713 }
48714 else
48716 }
48717 }
48718 if constexpr(has_inf<T>)
48719 if(str==_repres.get_inf())
48721 //由于基本类型的浮点数转换实现有损,所以这里直接转换为ubigfloat再转换为T:安全、大范围、稳健(尽管速度慢)
48722 return from_string_get_base<ubigfloat>(move(str),state).convert_to<T>();
48723 }
48724 public:
48725 template<class T> requires(float_type<T> && unsigned_type<T>)
48726 [[nodiscard]]T from_string_get(const string&str,convert_state_t&state)const noexcept{
48727 return from_string_get_unsigneded<T>(str,state);
48728 }
48729 //integers
48730 private:
48731 template<unsigned_integer_type T>
48732 [[nodiscard]]T from_string_get_unsigneded(const string&str,convert_state_t&state)const noexcept{
48733 if constexpr(type_info<T> == type_info<bool>)
48734 return union_cast<bool>(from_string_get<unsigned_specific_size_t<sizeof(bool)>>(str,state));
48735 else{
48736 const auto radix=_repres.get_radix();
48737 if constexpr(is_big_type<T>){
48738 //大整数类型可以通过分治法来提高效率
48739 const auto partition_method_threshold=trunc(log(max(type_info<size_t>),radix));
48740 if(str.size()>partition_method_threshold){
48741 T base{radix};
48742 size_t len=1;
48743 //计算分割点
48744 while(len*3 < str.size()){
48745 len *= 2;
48746 base *= base;
48747 }
48748 const auto split_pos=str.size()-len;
48749 string high_str=str.substr(0,split_pos);
48750 string low_str=str.substr(split_pos);
48751 T high=from_string_get_unsigneded<T>(high_str,state);
48752 if(!state.success())
48753 return {};
48754 T low=from_string_get_unsigneded<T>(low_str,state);
48755 if(!state.success())
48756 return {};
48757 return move(high)*move(base)+move(low);
48758 }
48759 else
48760 return from_string_get_unsigneded<size_t>(str,state);
48761 }
48762 else{
48764 T aret={};
48765 const auto end=str.end();
48766 for(auto i=str.begin();i!=end;++i){
48767 aret*=radix;
48768 const char_t ch=*i;
48769 if(_repres.is_valid_char(ch))
48770 aret+=_repres.get_index(ch);
48771 else{//error
48772 state.set_error();
48773 state.set_has_invalid_char();
48774 return {};
48775 }
48776 }
48777 return aret;
48779 }
48780 }
48781 }
48782 public:
48783 template<unsigned_integer_type T>
48784 [[nodiscard]]T from_string_get(const string&str,convert_state_t&state)const noexcept{
48785 return from_string_get_unsigneded<T>(str,state);
48786 }
48787 private:
48788 //特殊:从单个字符中获取数值
48789 template<unsigned_type T>
48790 [[nodiscard]]T from_string_get_unsigneded(const char_t&ch,convert_state_t&state)const noexcept{
48791 if(_repres.is_valid_char(ch))
48792 return(T)_repres.get_index(ch);
48793 else{
48794 state.set_error();
48795 state.set_has_invalid_char();
48796 return {};
48797 }
48798 }
48799 public:
48800 template<unsigned_type T>
48801 [[nodiscard]]T from_string_get(const char_t&ch,convert_state_t&state)const noexcept{
48802 return from_string_get_unsigneded<T>(ch,state);
48803 }
48804 template<signed_type T>
48805 [[nodiscard]]T from_string_get(const char_t&ch,convert_state_t&state)const noexcept{
48806 typedef to_unsigned_t<T> UT;
48807 return(T)from_string_get_unsigneded<UT>(ch,state);
48808 }
48809 template<signed_type T>
48810 [[nodiscard]]T from_string_get(string str,convert_state_t&state)const noexcept{
48811 //处理可能的正负符号开头
48812 bool is_negative=false;
48813 if(str[0]==_repres.get_negative_sign()){
48814 is_negative=true;
48815 str.remove_front();
48816 }
48817 elseif(str[0]==_repres.get_positive_sign())
48818 str.remove_front();
48819 typedef to_unsigned_t<T> UT;
48820 auto unum=from_string_get_unsigneded<UT>(move(str),state);
48821 return is_negative?copy_as_negative(move(unum)):move(unum);
48822 }
48823 template<arithmetic_type T>
48824 [[nodiscard]]T from_string_get(const string&str)const noexcept{
48825 convert_state_t state;
48826 return from_string_get<T>(str,state);
48827 }
48828 };
48830 constexpr struct to_string_t{
48831 template<arithmetic_type T,numerical_representation Repres>
48832 [[nodiscard]]string operator()(T&&val,const Repres&repres)const noexcept{
48833 ELC_TEST_EVENTNAME("to_string");
48834 const string_convert_impl<Repres> impl{repres};
48835 return impl.to_string(forward<T>(val));
48836 }
48837 template<arithmetic_type T>
48838 [[nodiscard]]string operator()(T&&val)const noexcept{
48839 return (*this)(forward<T>(val),decimal);
48840 }
48841 template<size_t N,numerical_representation Repres>
48842 [[nodiscard]]string operator()(const bitset<N>&val,const Repres&repres)const noexcept{
48843 return (*this)(ubigint(val),repres).pad_left(N,repres.get_char(0));
48844 }
48855 template<fraction_float_type T,numerical_representation Repres>
48856 [[nodiscard]]string fractional(T&&val,const Repres&repres)const noexcept{
48857 ELC_TEST_EVENTNAME("to_string.fractional");
48858 const string_convert_impl<Repres> impl{repres};
48859 return impl.to_string_fractional(forward<T>(val));
48860 }
48861 template<fraction_float_type T>//适用于任何分数法记录的浮点类型
48862 [[nodiscard]]string fractional(T&&val)const noexcept{
48863 return fractional(forward<T>(val),decimal);
48864 }
48865 }to_string{};
48867 template<arithmetic_type T>
48868 struct from_string_get_t{
48869 typedef convert_state_t state_t;
48870 template<numerical_representation Repres>
48871 [[nodiscard]]T operator()(const string&str,const Repres&repres,convert_state_t&state)const noexcept{
48872 ELC_TEST_EVENTNAME("from_string_get");
48873 const string_convert_impl<Repres> impl{repres};
48874 return impl.from_string_get<T>(str,state);
48875 }
48876 template<numerical_representation Repres>
48877 [[nodiscard]]T operator()(const string&str,const Repres&repres)const noexcept{
48878 convert_state_t state;
48879 return (*this)(str,repres,state);
48880 }
48881 [[nodiscard]]T operator()(const string&str,convert_state_t&state)const noexcept{
48882 return (*this)(str,decimal,state);
48883 }
48884 [[nodiscard]]T operator()(const string&str)const noexcept{
48885 return (*this)(str,decimal);
48886 }
48887 //单个字符
48888 template<numerical_representation Repres>
48889 [[nodiscard]]T operator()(const char_t&ch,const Repres&repres,convert_state_t&state)const noexcept{
48890 ELC_TEST_EVENTNAME("from_string_get");
48891 const string_convert_impl<Repres> impl{repres};
48892 return impl.from_string_get<T>(ch,state);
48893 }
48894 template<numerical_representation Repres>
48895 [[nodiscard]]T operator()(const char_t&ch,const Repres&repres)const noexcept{
48896 convert_state_t state;
48897 return (*this)(ch,repres,state);
48898 }
48899 [[nodiscard]]T operator()(const char_t&ch,convert_state_t&state)const noexcept{
48900 return (*this)(ch,decimal,state);
48901 }
48902 [[nodiscard]]T operator()(const char_t&ch)const noexcept{
48903 return (*this)(ch,decimal);
48904 }
48905 };
48906 template<arithmetic_type T>
48907 constexpr from_string_get_t<T>from_string_get{};
48908}
48909using to_string_n::to_string;
48910using to_string_n::from_string_get;
48911using to_string_n::to_string_t;
48912using to_string_n::from_string_get_t;
48913
48914//file_end
48915
48916 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
48917 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/operators/_body.hpp"
48918//_body.hpp
48919//at namespace elc::defs::numerical_representation_n
48920/*
48921未完成的elc解释器numerical_representation文件
48922由steve02081504与Alex0125设计、编写
48923转载时请在不对此文件做任何修改的同时注明出处
48924项目地址:https://github.com/ELC-lang/ELC
48925*/
48926/*
48927 ,??????????????????????????
48928 ????????????????????????????
48929 ?????????????????????????????+
48930 ?????+++++++++++++++++++++++++
48931 ?????+++++++++++++++++++++++++
48932 ??????++++++++++++++++++++++++
48933 ?????++
48934 ?????+++
48935 ??????+++IIIIIIIIIIIIIIIIII
48936 ?????+++++IIIIIIIIIIIIIIIIII
48937 ?????++++++++++++++++++++++++
48938 ??????+++++++++++++++++++++++:
48939 ?????++
48940 ?????+++
48941 ??????++
48942 ??????????????????????????????II
48943 ??????????????????????????????IIII
48944 ,?????????????????????????????IIIII+
48945 =???++++++++++++++++++++++++++III?
48946 ?++++++++++++++++++++++++++++I+
48947*/
48948template<numerical_representation representation_T,class stream_T> requires(type_info<stream_T>.base_on<text_ostream_t<char_t>>)
48949struct specified_numerical_representation_ostream_wrapper: virtual text_ostream_t<char_t>, instance_struct<specified_numerical_representation_ostream_wrapper<representation_T,stream_T>>{
48950 const representation_T& representation;
48951 stream_T& stream;
48952
48953 specified_numerical_representation_ostream_wrapper(const representation_T& representation,stream_T& stream)noexcept:representation(representation),stream(stream){}
48954
48955 virtual int_t seek(seek_type dir,int_t off)noexcept_as(stream.seek(seek_type::cur,0)) override{return stream.seek(dir,off);}
48956 virtual int_t tell()noexcept_as(stream.tell()) override{return stream.tell();}
48957 virtual bool seek_to(int_t pos)noexcept_as(stream.seek_to(pos)) override{return stream.seek_to(pos);}
48958 virtual void sync()noexcept_as(stream.sync()) override{return stream.sync();}
48959 virtual void flush()noexcept_as(stream.flush()) override{return stream.flush();}
48960 virtual void close()noexcept_as(stream.close()) override{return stream.close();}
48961 virtual void write(const char_t*data,size_t size)noexcept_as(stream.write(data,size)) override{
48962 stream.write(data,size);
48963 }
48964
48965 //获取包装的流
48966 stream_T& get_wrapped_stream()noexcept{return stream;}
48967 //获取数字表示方式
48968 const representation_T& get_numerical_representation()const noexcept{return representation;}
48969};
48970template<numerical_representation representation_T,class stream_T> requires(type_info<stream_T>.base_on<text_ostream_t<char_t>>)
48971inline auto operator<<(stream_T&stream,const representation_T& representation)noexcept_as(specified_numerical_representation_ostream_wrapper<representation_T,stream_T>(representation,stream)){
48972 return specified_numerical_representation_ostream_wrapper<representation_T,stream_T>{representation,stream};
48973}
48974
48975template<numerical_representation representation_T,class stream_T> requires(type_info<stream_T>.base_on<text_istream_t<char_t>>)
48976struct specified_numerical_representation_istream_wrapper:virtual text_istream_t<char_t>,instance_struct<specified_numerical_representation_istream_wrapper<representation_T,stream_T>>{
48977 const representation_T& representation;
48978 stream_T& stream;
48979
48980 specified_numerical_representation_istream_wrapper(const representation_T& representation,stream_T& stream)noexcept:representation(representation),stream(stream){}
48981
48982 virtual int_t seek(seek_type dir,int_t off)noexcept_as(stream.seek(seek_type::cur,0)) override{return stream.seek(dir,off);}
48983 virtual int_t tell()noexcept_as(stream.tell()) override{return stream.tell();}
48984 virtual void seek_to(int_t pos)noexcept_as(stream.seek_to(pos)) override{return stream.seek_to(pos);}
48985 virtual void sync()noexcept_as(stream.sync()) override{return stream.sync();}
48986 virtual void flush()noexcept_as(stream.flush()) override{return stream.flush();}
48987 virtual void close()noexcept_as(stream.close()) override{return stream.close();}
48988 virtual void read(char_t*data,size_t size)noexcept_as(stream.read(data,size)) override{
48989 stream.read(data,size);
48990 }
48991
48992 //获取包装的流
48993 stream_T& get_wrapped_stream()noexcept{return stream;}
48994 //获取数字表示方式
48995 const representation_T& get_numerical_representation()const noexcept{return representation;}
48996};
48997template<numerical_representation representation_T,class stream_T> requires(type_info<stream_T>.base_on<text_istream_t<char_t>>)
48998inline auto operator>>(stream_T&stream,const representation_T& representation)noexcept_as(specified_numerical_representation_istream_wrapper<representation_T,stream_T>(representation,stream)){
48999 return specified_numerical_representation_istream_wrapper<representation_T,stream_T>{representation,stream};
49000}
49001
49002//file_end
49003
49004 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
49005 }
49006 using numerical_representation_n::to_string;
49007 using numerical_representation_n::from_string_get;
49008 using numerical_representation_n::to_string_t;
49009 using numerical_representation_n::from_string_get_t;
49010 using numerical_representation_n::decimal;
49011 using numerical_representation_n::binary;
49012 using numerical_representation_n::octal;
49013 using numerical_representation_n::hexadecimal;
49014 using numerical_representation_n::hexadecimal_upper;
49015 using numerical_representation_n::trinary;
49016 using numerical_representation_n::valanlottish;
49017
49018 #if defined(ELC_TEST_ON)
49019 namespace numerical_representation_part_test{
49020 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_test.hpp"
49021//_test.hpp
49022/*
49023未完成的elc解释器numerical_representation文件
49024由steve02081504与Alex0125设计、编写
49025转载时请在不对此文件做任何修改的同时注明出处
49026项目地址:https://github.com/ELC-lang/ELC
49027*/
49028/*
49029 ,??????????????????????????
49030 ????????????????????????????
49031 ?????????????????????????????+
49032 ?????+++++++++++++++++++++++++
49033 ?????+++++++++++++++++++++++++
49034 ??????++++++++++++++++++++++++
49035 ?????++
49036 ?????+++
49037 ??????+++IIIIIIIIIIIIIIIIII
49038 ?????+++++IIIIIIIIIIIIIIIIII
49039 ?????++++++++++++++++++++++++
49040 ??????+++++++++++++++++++++++:
49041 ?????++
49042 ?????+++
49043 ??????++
49044 ??????????????????????????????II
49045 ??????????????????????????????IIII
49046 ,?????????????????????????????IIIII+
49047 =???++++++++++++++++++++++++++III?
49048 ?++++++++++++++++++++++++++++I+
49049*/
49050inline void test(){
49051 ELC_TEST_EVENTNAME("numerical_representation部分测试");
49052}
49053inline void test_log_out(){
49054}
49055inline void test_end(){
49056}
49057
49058//file_end
49059
49060 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
49061 }
49062 #endif
49063
49064 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
49065//_undefs.hpp
49066/*
49067未完成的elc解释器basic文件
49068由steve02081504与Alex0125设计、编写
49069转载时请在不对此文件做任何修改的同时注明出处
49070项目地址:https://github.com/ELC-lang/ELC
49071*/
49072/*
49073 ,??????????????????????????
49074 ????????????????????????????
49075 ?????????????????????????????+
49076 ?????+++++++++++++++++++++++++
49077 ?????+++++++++++++++++++++++++
49078 ??????++++++++++++++++++++++++
49079 ?????++
49080 ?????+++
49081 ??????+++IIIIIIIIIIIIIIIIII
49082 ?????+++++IIIIIIIIIIIIIIIIII
49083 ?????++++++++++++++++++++++++
49084 ??????+++++++++++++++++++++++:
49085 ?????++
49086 ?????+++
49087 ??????++
49088 ??????????????????????????????II
49089 ??????????????????????????????IIII
49090 ,?????????????????????????????IIIII+
49091 =???++++++++++++++++++++++++++III?
49092 ?++++++++++++++++++++++++++++I+
49093*/
49094#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
49095//_undefs.hpp
49096/*
49097未完成的elc解释器_share文件
49098由steve02081504与Alex0125设计、编写
49099转载时请在不对此文件做任何修改的同时注明出处
49100项目地址:https://github.com/ELC-lang/ELC
49101*/
49102/*
49103 ,??????????????????????????
49104 ????????????????????????????
49105 ?????????????????????????????+
49106 ?????+++++++++++++++++++++++++
49107 ?????+++++++++++++++++++++++++
49108 ??????++++++++++++++++++++++++
49109 ?????++
49110 ?????+++
49111 ??????+++IIIIIIIIIIIIIIIIII
49112 ?????+++++IIIIIIIIIIIIIIIIII
49113 ?????++++++++++++++++++++++++
49114 ??????+++++++++++++++++++++++:
49115 ?????++
49116 ?????+++
49117 ??????++
49118 ??????????????????????????????II
49119 ??????????????????????????????IIII
49120 ,?????????????????????????????IIIII+
49121 =???++++++++++++++++++++++++++III?
49122 ?++++++++++++++++++++++++++++I+
49123*/
49124
49125//defs at "_defs.hpp"
49126
49127#if defined(_MSC_VER)
49128 #pragma warning(pop)
49129#endif
49130//#undef suppress_msvc_warning
49131#undef disable_msvc_warning
49132#undef push_msvc_warning
49133#undef pop_msvc_warning
49134#undef push_and_disable_msvc_warning
49135#if defined(_MSC_VER)
49136 #pragma pack(pop)
49137#endif
49138#if defined(__GNUC__)
49139 #pragma GCC diagnostic pop
49140#endif
49141#if defined(_MSC_VER)
49142 #pragma pop_macro("new")
49143 #pragma pop_macro("delete")
49144 #pragma pop_macro("min")
49145 #pragma pop_macro("max")
49146 #pragma pop_macro("abs")
49147 #pragma pop_macro("export")
49148 #pragma pop_macro("rand")
49149 #pragma pop_macro("sqrt")
49150 #pragma pop_macro("type_info")
49151 #pragma pop_macro("elc")
49152#endif
49153
49154//
49155#if defined(ELC_VOID_NAME)
49156 #define void the_void
49157#endif
49158//
49159#if defined(ELC_PUBLIC_ALL)
49160 #undef protected
49161 #undef private
49162#endif
49163//
49164#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
49165 #define rand the_rand
49166#endif
49167
49168// #undef often_noexcept
49169#undef noexcept_as
49170#undef noexcept_as_auto
49171#undef constexpr_as
49172#undef constexpr_as_auto
49173
49174#undef using_method_from_base_t
49175#undef using_method_from_value
49176
49177#undef floop
49178#undef times
49179#undef debug_times
49180#undef enable_adl
49181
49182#undef re_declvalue
49183#undef re_decltype
49184
49185#undef declvalue
49186
49187#undef template_error
49188#undef template_error_of_type
49189#undef template_warning
49190
49191#undef type_info_of
49192#undef type_name_of
49193
49194#undef is_common_attribute
49195#undef is_special_attribute
49196
49197#undef has_attribute
49198#undef not_has_attribute
49199
49200#undef float_size_of
49201#undef bitnum_of
49202
49203#undef def_common_attribute_with_nothing
49204#undef def_special_attribute_with_nothing
49205
49206#undef common_attribute_t
49207#undef special_attribute_t
49208
49209#undef enable_if
49210#undef enabled_by_default
49211#undef disabled_by_default
49212#undef enable_if_not_ill_form
49213#undef enable_flag
49214
49215#undef was_an_ill_form
49216#undef was_an_ill_form_with_parameter
49217#undef was_not_an_ill_form
49218#undef was_not_an_ill_form_and_noexcept
49219#undef was_not_an_ill_form_with_parameter
49220
49221#undef recursive_λ
49222#undef get_recursive_λ_caller
49223#undef λ
49224#undef exλ
49225#undef λ_with_catch
49226#undef self_recursion
49227#undef λ_RLSRRS
49228#undef λ_inline
49229#undef λ_force_inline
49230
49231#undef MAGIC
49232
49233#undef nothing
49234
49235#undef elseif
49236#undef _big_than_
49237#undef _small_than_
49238
49239#if defined(_MSC_VER)
49240 #undef not
49241 #undef and
49242 #undef or
49243#endif
49244
49245#undef INTER_NAMESPACE
49246#undef BREAK_NAMESPACE
49247
49248#undef szie
49249#undef form
49250
49251#undef template_name
49252#undef type_name
49253
49254#undef not_in_debug
49255
49256#undef es
49257#undef ec
49258
49259#undef ELC_TEST_EVENTNAME
49260
49261#undef override_instance_struct
49262
49263#undef distinctive
49264
49265#undef force_inline
49266
49267#undef with_no_vtable
49268
49269#undef in_consteval
49270
49271#undef no_vtable_struct
49272#undef no_vtable_class
49273
49274//#undef get_elc_defs
49275
49276//file_end
49277
49278#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
49279
49280//file_end
49281
49282 #line 60 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
49283}
49284namespace elc{
49285 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_export.hpp"
49286//_export.hpp
49287//at namespace elc
49288/*
49289未完成的elc解释器numerical_representation文件
49290由steve02081504与Alex0125设计、编写
49291转载时请在不对此文件做任何修改的同时注明出处
49292项目地址:https://github.com/ELC-lang/ELC
49293*/
49294/*
49295 ,??????????????????????????
49296 ????????????????????????????
49297 ?????????????????????????????+
49298 ?????+++++++++++++++++++++++++
49299 ?????+++++++++++++++++++++++++
49300 ??????++++++++++++++++++++++++
49301 ?????++
49302 ?????+++
49303 ??????+++IIIIIIIIIIIIIIIIII
49304 ?????+++++IIIIIIIIIIIIIIIIII
49305 ?????++++++++++++++++++++++++
49306 ??????+++++++++++++++++++++++:
49307 ?????++
49308 ?????+++
49309 ??????++
49310 ??????????????????????????????II
49311 ??????????????????????????????IIII
49312 ,?????????????????????????????IIIII+
49313 =???++++++++++++++++++++++++++III?
49314 ?++++++++++++++++++++++++++++I+
49315*/
49316#define export using defs::
49317export to_string;
49318export from_string_get;
49319export to_string_t;
49320export from_string_get_t;
49321export decimal;
49322export binary;
49323export octal;
49324export hexadecimal;
49325export hexadecimal_upper;
49326export trinary;
49327export valanlottish;
49328#undef export
49329
49330//file_end
49331
49332 #line 63 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
49333}
49334#if defined(ELC_BASE_STREAM)
49335 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/arithmetic_text_io.hpp"
49336//arithmetic_text_io.hpp
49337//at namespace ::
49338//multi when ELC_NUMERICAL_REPRESENTATION & ELC_BASE_STREAM
49339/*
49340未完成的elc解释器base_stream文件
49341由steve02081504与Alex0125设计、编写
49342转载时请在不对此文件做任何修改的同时注明出处
49343项目地址:https://github.com/ELC-lang/ELC
49344*/
49345/*
49346 ,??????????????????????????
49347 ????????????????????????????
49348 ?????????????????????????????+
49349 ?????+++++++++++++++++++++++++
49350 ?????+++++++++++++++++++++++++
49351 ??????++++++++++++++++++++++++
49352 ?????++
49353 ?????+++
49354 ??????+++IIIIIIIIIIIIIIIIII
49355 ?????+++++IIIIIIIIIIIIIIIIII
49356 ?????++++++++++++++++++++++++
49357 ??????+++++++++++++++++++++++:
49358 ?????++
49359 ?????+++
49360 ??????++
49361 ??????????????????????????????II
49362 ??????????????????????????????IIII
49363 ,?????????????????????????????IIIII+
49364 =???++++++++++++++++++++++++++III?
49365 ?++++++++++++++++++++++++++++I+
49366*/
49367#if !defined(ELC_multi_arithmetic_text_io)//pls skip define check as this part is muti
49368#define ELC_multi_arithmetic_text_io
49369namespace elc::defs{
49370 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
49371//_defs.hpp
49372/*
49373未完成的elc解释器basic文件
49374由steve02081504与Alex0125设计、编写
49375转载时请在不对此文件做任何修改的同时注明出处
49376项目地址:https://github.com/ELC-lang/ELC
49377*/
49378/*
49379 ,??????????????????????????
49380 ????????????????????????????
49381 ?????????????????????????????+
49382 ?????+++++++++++++++++++++++++
49383 ?????+++++++++++++++++++++++++
49384 ??????++++++++++++++++++++++++
49385 ?????++
49386 ?????+++
49387 ??????+++IIIIIIIIIIIIIIIIII
49388 ?????+++++IIIIIIIIIIIIIIIIII
49389 ?????++++++++++++++++++++++++
49390 ??????+++++++++++++++++++++++:
49391 ?????++
49392 ?????+++
49393 ??????++
49394 ??????????????????????????????II
49395 ??????????????????????????????IIII
49396 ,?????????????????????????????IIIII+
49397 =???++++++++++++++++++++++++++III?
49398 ?++++++++++++++++++++++++++++I+
49399*/
49400#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
49401//_defs.hpp
49402/*
49403未完成的elc解释器_share文件
49404由steve02081504与Alex0125设计、编写
49405转载时请在不对此文件做任何修改的同时注明出处
49406项目地址:https://github.com/ELC-lang/ELC
49407*/
49408/*
49409 ,??????????????????????????
49410 ????????????????????????????
49411 ?????????????????????????????+
49412 ?????+++++++++++++++++++++++++
49413 ?????+++++++++++++++++++++++++
49414 ??????++++++++++++++++++++++++
49415 ?????++
49416 ?????+++
49417 ??????+++IIIIIIIIIIIIIIIIII
49418 ?????+++++IIIIIIIIIIIIIIIIII
49419 ?????++++++++++++++++++++++++
49420 ??????+++++++++++++++++++++++:
49421 ?????++
49422 ?????+++
49423 ??????++
49424 ??????????????????????????????II
49425 ??????????????????????????????IIII
49426 ,?????????????????????????????IIIII+
49427 =???++++++++++++++++++++++++++III?
49428 ?++++++++++++++++++++++++++++I+
49429*/
49430
49431//undefs at "_undefs.hpp"
49432
49433#if defined(ELC_CODE_REALM)
49434 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
49435#endif
49436
49437//set ELC_WARNING_LEVEL default to 4(max)
49438#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
49439
49440#if defined(_MSC_VER)
49441 #pragma warning(push,ELC_WARNING_LEVEL)
49442 #pragma warning(disable:4099)//class与struct混用警告diss
49443 #pragma warning(disable:4584)//重复子类警告diss
49444 #pragma warning(disable:4250)//域控制继承警告diss
49445 #pragma warning(disable:26432)//不完全默认方法警告diss
49446 #pragma warning(disable:26435)//virtual override方法警告diss
49447 #pragma warning(disable:26481)//容器安利diss
49448 #pragma warning(disable:26446)//gsl::at安利diss
49449 #pragma warning(disable:26434)//方法覆盖警告diss
49450 #pragma warning(disable:26429)//gsl::not_null安利diss
49451 #pragma warning(disable:26471)//对void*进行static_cast安利diss
49452 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
49453 #pragma warning(disable:26473)//相同指针显式cast警告diss
49454 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
49455 #pragma warning(disable:26485)//数组作指针警告diss
49456 #pragma warning(disable:26490)//reinterpret_cast警告diss
49457 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
49458 #pragma warning(disable:26482)//非常数数组索引警告diss
49459 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
49460#endif
49461#if defined(__GNUC__)
49462 #pragma GCC diagnostic push
49463 #pragma GCC diagnostic warning "-Wall"//开启所有警告
49464 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
49465#endif
49466#if defined(_MSC_VER)
49467 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
49468 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
49469 #define push_msvc_warning() __pragma(warning(push))
49470 #define pop_msvc_warning() __pragma(warning(pop))
49471 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
49472#else
49473 //#define suppress_msvc_warning(...)
49474 #define disable_msvc_warning(...)
49475 #define push_msvc_warning()
49476 #define pop_msvc_warning()
49477 #define push_and_disable_msvc_warning(...)
49478#endif
49479#if defined(_MSC_VER)
49480 //push pack settings
49481 #pragma pack(push)
49482 #pragma pack()
49483#endif
49484#if defined(_MSC_VER)
49485 //push and undef common macros
49486 #pragma push_macro("new")
49487 #undef new
49488 #pragma push_macro("delete")
49489 #undef delete
49490 #pragma push_macro("min")
49491 #undef min
49492 #pragma push_macro("max")
49493 #undef max
49494 #pragma push_macro("abs")
49495 #undef abs
49496 #pragma push_macro("export")
49497 #undef export
49498 #pragma push_macro("rand")
49499 #undef rand
49500 #pragma push_macro("sqrt")
49501 #undef sqrt
49502 #pragma push_macro("type_info")
49503 #undef type_info
49504 #pragma push_macro("elc")
49505 #undef elc
49506#endif
49507//
49508#if defined(ELC_VOID_NAME)
49509 #undef void
49510#endif
49511//
49512#if defined(ELC_PUBLIC_ALL)
49513 #define protected public
49514 #define private public
49515#endif
49516//
49517#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
49518 #undef rand
49519#endif
49520
49521// #define often_noexcept
49522#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
49523#define noexcept_as_auto MAGIC//哦现在有了
49524#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
49525#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
49526
49527#define using_method_from_base_t(name,...) \
49528template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
49529auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
49530{\
49531 return base_t::name(forward<Args>(rest)...);\
49532}\
49533
49534#define using_method_from_value(name,value_name,...) \
49535template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
49536auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
49537{\
49538 return value_name.name(forward<Args>(rest)...);\
49539}\
49540
49541#define floop while(__builtin_is_my_dick_still_there())
49542#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
49543#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
49544#if defined(_MSC_VER) && _MSC_VER>=1935
49545 //@see https://developercommunity.visualstudio.com/t/10193638
49546 #define enable_adl(name) template<typename=void>void name()noexcept=delete
49547#else
49548 #define enable_adl(name) void name()noexcept=delete
49549#endif
49550
49551#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
49552#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
49553
49554#define declvalue(...) (::std::declval<__VA_ARGS__>())
49555
49557#define template_error(reason) static_assert(template_error_helper<T>,reason)
49559#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
49561#define template_warning(reason) template_warning_helper<T>(reason)
49562
49563//for type_info
49564#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
49565#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
49566
49567#define is_common_attribute(name) public attribute<T,name<T>>
49568#define is_special_attribute(name) public attribute<T,name>
49569
49570#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
49571#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
49572
49573//for float_size_t
49574#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
49575//bitnum_of
49576#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
49577
49578//for attribute
49579#define def_common_attribute_with_nothing(name) \
49580template<typename T>\
49581class name{}\
49582
49583#define def_special_attribute_with_nothing(name) \
49584class name{}\
49585
49586#define common_attribute_t template<class>class
49587#define special_attribute_t class
49588
49597#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
49599#define enabled_by_default class enable_state=void
49601#define disabled_by_default class enable_state= ::std::enable_if_t<false>
49603#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
49605#define enable_flag class enable_state
49606
49607#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
49608#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
49609#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
49610#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
49611#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
49612
49614#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
49616#define get_recursive_λ_caller(name,...) \
49617exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
49618 return name(name,Args...);\
49619}
49621#define λ []
49623#define exλ [&]
49625#define λ_with_catch(...) [__VA_ARGS__]
49627#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
49628//recursive_λ_self_referential_reserved_symbolname
49629#define λ_RLSRRS _my_jb_super_sb_name_
49630
49631#if defined(_MSC_VER) && !defined(__clang__)
49632 #define λ_inline [[msvc::forceinline]]
49633 #define λ_force_inline [[msvc::forceinline]]
49634#elif
49635 #define λ_inline [[gnu::always_inline]]
49636 #define λ_force_inline [[gnu::always_inline]]
49637#else
49638 #define λ_inline
49639 #define λ_force_inline
49640#endif
49641
49642#define MAGIC//ahh,ko no tenno da!
49643
49645#define nothing
49646
49648#define elseif else if
49650#define _big_than_ >
49652#define _small_than_ <
49653
49654#if defined(_MSC_VER)
49655 #define not !
49656 #define and &&
49657 #define or ||
49658#endif
49659
49661#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
49663#define BREAK_NAMESPACE }
49664
49666#define template_name template
49668#define type_name class
49669
49670#if defined(DEBUG) || defined(_DEBUG)
49671 #define not_in_debug 0
49672 #define in_debug 1
49673#else
49674 #define not_in_debug 1
49675 #define in_debug 0
49676#endif
49677
49678#define es U""
49679#define ec(ch) U ## ch
49680
49681#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
49682 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
49683#else
49684 #define ELC_TEST_EVENTNAME(name)
49685#endif
49686
49687#define override_instance_struct \
49688protected:\
49689 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
49690 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
49691 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
49692 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
49693 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
49694
49695#if defined(_MSC_VER) && !defined(__clang__)
49696 #define distinctive __declspec(dllexport)
49697#else
49698 #define distinctive
49699#endif
49700
49701#if defined(_MSC_VER) && !defined(__clang__)
49702 #define force_inline __forceinline
49703#elif defined(__GNUC__) || defined(__clang__)
49704 #define force_inline __attribute__((always_inline)) inline
49705#else
49706 #define force_inline inline
49707#endif
49708
49709#if defined(_MSC_VER) && !defined(__clang__)
49710 #define with_no_vtable __declspec(novtable)
49711#else
49712 #define with_no_vtable
49713#endif
49714
49715#define in_consteval (::std::is_constant_evaluated())
49716
49717#define no_vtable_struct struct with_no_vtable
49718#define no_vtable_class class with_no_vtable
49719
49720//#define get_elc_defs using namespace ::elc::defs
49721
49722//file_end
49723
49724#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
49725
49726//file_end
49727
49728 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/arithmetic_text_io.hpp"
49729
49730 namespace stream_n{
49731 using namespace numerical_representation_n;
49732
49733 inline const auto&default_numerical_representation=decimal;
49734 inline const auto&default_bool_representation=common_bool_representation;
49735 inline const auto&default_bitset_representation=binary;
49736
49737 template<text_stream stream_T>
49738 inline decltype(auto)get_numerical_representation_of(stream_T&&stream)noexcept{
49739 if constexpr was_not_an_ill_form(stream.get_numerical_representation())
49740 return stream.get_numerical_representation();
49741 else
49742 return default_numerical_representation;
49743 }
49744
49745 template<text_stream stream_T>
49746 inline decltype(auto)get_bool_representation_of(stream_T&&stream)noexcept{
49747 if constexpr was_not_an_ill_form(stream.get_bool_representation())
49748 return stream.get_bool_representation();
49749 else
49750 return default_bool_representation;
49751 }
49752
49753 template<text_stream stream_T>
49754 inline decltype(auto)get_bitset_representation_of(stream_T&&stream)noexcept{
49755 if constexpr was_not_an_ill_form(stream.get_bitset_representation())
49756 return stream.get_bitset_representation();
49757 else
49758 return default_bitset_representation;
49759 }
49760
49761 //arithmetic output only for text_ostream
49762 template<arithmetic_type T,text_ostream stream_T> requires(type_info<remove_cvref<T>> != type_info<char_t> &&
49763 type_info<remove_cvref<T>> != type_info<bool>)
49764 inline decltype(auto)operator<<(stream_T&&stream,T&&data)noexcept(noexcept_text_ostream<stream_T>){
49765 return stream << to_string(forward<T>(data),get_numerical_representation_of(stream));
49766 }
49767
49768 template<typename T,text_ostream stream_T> requires(!::std::is_arithmetic_v<remove_cvref<T>> &&
49770 inline decltype(auto)operator<<(stream_T&&stream,T&&data)noexcept(noexcept_text_ostream<stream_T> && to_arithmetic.nothrow<T>) {
49771 return stream << to_arithmetic(forward<T>(data));
49772 }
49773
49774 template<typename T,text_ostream stream_T> requires(type_info<T> == type_info<bool>)
49775 inline decltype(auto)operator<<(stream_T&&stream,T data)noexcept(noexcept_text_ostream<stream_T>){
49776 const auto&representation=get_bool_representation_of(stream);
49777 if(data==true)
49778 stream << representation.get_true();
49779 elseif(data==false)
49780 stream << representation.get_false();
49781 else
49782 stream << representation.get_other_prefix() << union_cast<unsigned_specific_size_t<sizeof(bool)>>(data) << representation.get_other_suffix();
49783 return stream;
49784 }
49785
49786 //bitset output only for text_ostream
49787 template<size_t bit_num,text_ostream stream_T>
49788 inline decltype(auto)operator<<(stream_T&&stream,const bitset<bit_num>&data)noexcept(noexcept_text_ostream<stream_T>){
49789 return stream << to_string(data,get_bitset_representation_of(stream));
49790 }
49791
49792 //arithmetic input only for text_istream
49793 template<arithmetic_type T,text_istream stream_T> requires(type_info<remove_cvref<T>> != type_info<char_t> &&
49794 type_info<remove_cvref<T>> != type_info<bool>)
49795 inline decltype(auto)operator>>(stream_T&&stream,T&data)noexcept(noexcept_text_istream<stream_T>){
49796 string temp;
49797 stream >> temp;
49798 data=from_string_get<T>(temp,get_numerical_representation_of(stream));
49799 return stream;
49800 }
49801 template<typename T,text_istream stream_T> requires(type_info<T> == type_info<bool>)
49802 inline decltype(auto)operator>>(stream_T&&stream,T&data)noexcept(noexcept_text_istream<stream_T>){
49803 string temp;
49804 stream >> temp;
49805 const auto&representation=get_bool_representation_of(stream);
49806 if(temp==representation.get_true())
49807 data=true;
49808 elseif(temp==representation.get_false())
49809 data=false;
49810 else{
49811 if(temp.starts_with(representation.get_other_prefix())){
49812 temp.remove_front(representation.get_other_prefix().size());
49813 if(temp.ends_with(representation.get_other_suffix())){
49814 temp.remove_back(representation.get_other_suffix().size());
49815 data=union_cast<bool>(from_string_get<unsigned_specific_size_t<sizeof(bool)>>(temp,get_numerical_representation_of(stream)));
49816 }
49817 }
49818 }
49819 return stream;
49820 }
49821
49822 //T* output only for text_ostream
49823 template<typename T,text_ostream stream_T> requires(!::std::is_function_v<T>)
49824 inline decltype(auto)operator<<(stream_T&&stream,T*const&data)noexcept(noexcept_text_ostream<stream_T>){
49825 //output name of type at first
49826 stream << type_info<T>.get_name();
49827 if constexpr(::std::is_polymorphic_v<T> && !::std::is_final_v<T>){//RTTI
49828 const auto typeinfo = type_info_of(*data);
49829 if(typeinfo != type_info<T>)
49830 stream << ec("(") << typeinfo.get_name() << ec(")");
49831 }
49832 //output address
49833 stream << ec("@") << to_string((size_t)data,hexadecimal);
49834 return stream;
49835 }
49836 //function output only for text_ostream
49837 template<typename T,text_ostream stream_T> requires(::std::is_function_v<T>)
49838 inline decltype(auto)operator<<(stream_T&&stream,T*const&data)noexcept(noexcept_text_ostream<stream_T>){
49839 //output name of type at first
49840 stream << get_function_name(data);
49841 //output address
49842 stream << ec("@") << to_string((size_t)data,hexadecimal);
49843 return stream;
49844 }
49845
49846 }
49847
49848 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
49849//_undefs.hpp
49850/*
49851未完成的elc解释器basic文件
49852由steve02081504与Alex0125设计、编写
49853转载时请在不对此文件做任何修改的同时注明出处
49854项目地址:https://github.com/ELC-lang/ELC
49855*/
49856/*
49857 ,??????????????????????????
49858 ????????????????????????????
49859 ?????????????????????????????+
49860 ?????+++++++++++++++++++++++++
49861 ?????+++++++++++++++++++++++++
49862 ??????++++++++++++++++++++++++
49863 ?????++
49864 ?????+++
49865 ??????+++IIIIIIIIIIIIIIIIII
49866 ?????+++++IIIIIIIIIIIIIIIIII
49867 ?????++++++++++++++++++++++++
49868 ??????+++++++++++++++++++++++:
49869 ?????++
49870 ?????+++
49871 ??????++
49872 ??????????????????????????????II
49873 ??????????????????????????????IIII
49874 ,?????????????????????????????IIIII+
49875 =???++++++++++++++++++++++++++III?
49876 ?++++++++++++++++++++++++++++I+
49877*/
49878#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
49879//_undefs.hpp
49880/*
49881未完成的elc解释器_share文件
49882由steve02081504与Alex0125设计、编写
49883转载时请在不对此文件做任何修改的同时注明出处
49884项目地址:https://github.com/ELC-lang/ELC
49885*/
49886/*
49887 ,??????????????????????????
49888 ????????????????????????????
49889 ?????????????????????????????+
49890 ?????+++++++++++++++++++++++++
49891 ?????+++++++++++++++++++++++++
49892 ??????++++++++++++++++++++++++
49893 ?????++
49894 ?????+++
49895 ??????+++IIIIIIIIIIIIIIIIII
49896 ?????+++++IIIIIIIIIIIIIIIIII
49897 ?????++++++++++++++++++++++++
49898 ??????+++++++++++++++++++++++:
49899 ?????++
49900 ?????+++
49901 ??????++
49902 ??????????????????????????????II
49903 ??????????????????????????????IIII
49904 ,?????????????????????????????IIIII+
49905 =???++++++++++++++++++++++++++III?
49906 ?++++++++++++++++++++++++++++I+
49907*/
49908
49909//defs at "_defs.hpp"
49910
49911#if defined(_MSC_VER)
49912 #pragma warning(pop)
49913#endif
49914//#undef suppress_msvc_warning
49915#undef disable_msvc_warning
49916#undef push_msvc_warning
49917#undef pop_msvc_warning
49918#undef push_and_disable_msvc_warning
49919#if defined(_MSC_VER)
49920 #pragma pack(pop)
49921#endif
49922#if defined(__GNUC__)
49923 #pragma GCC diagnostic pop
49924#endif
49925#if defined(_MSC_VER)
49926 #pragma pop_macro("new")
49927 #pragma pop_macro("delete")
49928 #pragma pop_macro("min")
49929 #pragma pop_macro("max")
49930 #pragma pop_macro("abs")
49931 #pragma pop_macro("export")
49932 #pragma pop_macro("rand")
49933 #pragma pop_macro("sqrt")
49934 #pragma pop_macro("type_info")
49935 #pragma pop_macro("elc")
49936#endif
49937
49938//
49939#if defined(ELC_VOID_NAME)
49940 #define void the_void
49941#endif
49942//
49943#if defined(ELC_PUBLIC_ALL)
49944 #undef protected
49945 #undef private
49946#endif
49947//
49948#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
49949 #define rand the_rand
49950#endif
49951
49952// #undef often_noexcept
49953#undef noexcept_as
49954#undef noexcept_as_auto
49955#undef constexpr_as
49956#undef constexpr_as_auto
49957
49958#undef using_method_from_base_t
49959#undef using_method_from_value
49960
49961#undef floop
49962#undef times
49963#undef debug_times
49964#undef enable_adl
49965
49966#undef re_declvalue
49967#undef re_decltype
49968
49969#undef declvalue
49970
49971#undef template_error
49972#undef template_error_of_type
49973#undef template_warning
49974
49975#undef type_info_of
49976#undef type_name_of
49977
49978#undef is_common_attribute
49979#undef is_special_attribute
49980
49981#undef has_attribute
49982#undef not_has_attribute
49983
49984#undef float_size_of
49985#undef bitnum_of
49986
49987#undef def_common_attribute_with_nothing
49988#undef def_special_attribute_with_nothing
49989
49990#undef common_attribute_t
49991#undef special_attribute_t
49992
49993#undef enable_if
49994#undef enabled_by_default
49995#undef disabled_by_default
49996#undef enable_if_not_ill_form
49997#undef enable_flag
49998
49999#undef was_an_ill_form
50000#undef was_an_ill_form_with_parameter
50001#undef was_not_an_ill_form
50002#undef was_not_an_ill_form_and_noexcept
50003#undef was_not_an_ill_form_with_parameter
50004
50005#undef recursive_λ
50006#undef get_recursive_λ_caller
50007#undef λ
50008#undef exλ
50009#undef λ_with_catch
50010#undef self_recursion
50011#undef λ_RLSRRS
50012#undef λ_inline
50013#undef λ_force_inline
50014
50015#undef MAGIC
50016
50017#undef nothing
50018
50019#undef elseif
50020#undef _big_than_
50021#undef _small_than_
50022
50023#if defined(_MSC_VER)
50024 #undef not
50025 #undef and
50026 #undef or
50027#endif
50028
50029#undef INTER_NAMESPACE
50030#undef BREAK_NAMESPACE
50031
50032#undef szie
50033#undef form
50034
50035#undef template_name
50036#undef type_name
50037
50038#undef not_in_debug
50039
50040#undef es
50041#undef ec
50042
50043#undef ELC_TEST_EVENTNAME
50044
50045#undef override_instance_struct
50046
50047#undef distinctive
50048
50049#undef force_inline
50050
50051#undef with_no_vtable
50052
50053#undef in_consteval
50054
50055#undef no_vtable_struct
50056#undef no_vtable_class
50057
50058//#undef get_elc_defs
50059
50060//file_end
50061
50062#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
50063
50064//file_end
50065
50066 #line 155 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_multi/arithmetic_text_io.hpp"
50067}
50068#endif
50069
50070//file_end
50071
50072 #line 66 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/numerical_representation/_body.hpp"
50073#endif
50074
50075//file_end
50076
50077 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
50078#endif
50079
50080//file_end
50081
50082 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
50083 #else
50084 #error ERROR_MSG_UNABLE_OS
50085 #endif
50087 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
50088//_defs.hpp
50089/*
50090未完成的elc解释器_share文件
50091由steve02081504与Alex0125设计、编写
50092转载时请在不对此文件做任何修改的同时注明出处
50093项目地址:https://github.com/ELC-lang/ELC
50094*/
50095/*
50096 ,??????????????????????????
50097 ????????????????????????????
50098 ?????????????????????????????+
50099 ?????+++++++++++++++++++++++++
50100 ?????+++++++++++++++++++++++++
50101 ??????++++++++++++++++++++++++
50102 ?????++
50103 ?????+++
50104 ??????+++IIIIIIIIIIIIIIIIII
50105 ?????+++++IIIIIIIIIIIIIIIIII
50106 ?????++++++++++++++++++++++++
50107 ??????+++++++++++++++++++++++:
50108 ?????++
50109 ?????+++
50110 ??????++
50111 ??????????????????????????????II
50112 ??????????????????????????????IIII
50113 ,?????????????????????????????IIIII+
50114 =???++++++++++++++++++++++++++III?
50115 ?++++++++++++++++++++++++++++I+
50116*/
50117
50118//undefs at "_undefs.hpp"
50119
50120#if defined(ELC_CODE_REALM)
50121 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
50122#endif
50123
50124//set ELC_WARNING_LEVEL default to 4(max)
50125#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
50126
50127#if defined(_MSC_VER)
50128 #pragma warning(push,ELC_WARNING_LEVEL)
50129 #pragma warning(disable:4099)//class与struct混用警告diss
50130 #pragma warning(disable:4584)//重复子类警告diss
50131 #pragma warning(disable:4250)//域控制继承警告diss
50132 #pragma warning(disable:26432)//不完全默认方法警告diss
50133 #pragma warning(disable:26435)//virtual override方法警告diss
50134 #pragma warning(disable:26481)//容器安利diss
50135 #pragma warning(disable:26446)//gsl::at安利diss
50136 #pragma warning(disable:26434)//方法覆盖警告diss
50137 #pragma warning(disable:26429)//gsl::not_null安利diss
50138 #pragma warning(disable:26471)//对void*进行static_cast安利diss
50139 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
50140 #pragma warning(disable:26473)//相同指针显式cast警告diss
50141 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
50142 #pragma warning(disable:26485)//数组作指针警告diss
50143 #pragma warning(disable:26490)//reinterpret_cast警告diss
50144 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
50145 #pragma warning(disable:26482)//非常数数组索引警告diss
50146 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
50147#endif
50148#if defined(__GNUC__)
50149 #pragma GCC diagnostic push
50150 #pragma GCC diagnostic warning "-Wall"//开启所有警告
50151 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
50152#endif
50153#if defined(_MSC_VER)
50154 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
50155 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
50156 #define push_msvc_warning() __pragma(warning(push))
50157 #define pop_msvc_warning() __pragma(warning(pop))
50158 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
50159#else
50160 //#define suppress_msvc_warning(...)
50161 #define disable_msvc_warning(...)
50162 #define push_msvc_warning()
50163 #define pop_msvc_warning()
50164 #define push_and_disable_msvc_warning(...)
50165#endif
50166#if defined(_MSC_VER)
50167 //push pack settings
50168 #pragma pack(push)
50169 #pragma pack()
50170#endif
50171#if defined(_MSC_VER)
50172 //push and undef common macros
50173 #pragma push_macro("new")
50174 #undef new
50175 #pragma push_macro("delete")
50176 #undef delete
50177 #pragma push_macro("min")
50178 #undef min
50179 #pragma push_macro("max")
50180 #undef max
50181 #pragma push_macro("abs")
50182 #undef abs
50183 #pragma push_macro("export")
50184 #undef export
50185 #pragma push_macro("rand")
50186 #undef rand
50187 #pragma push_macro("sqrt")
50188 #undef sqrt
50189 #pragma push_macro("type_info")
50190 #undef type_info
50191 #pragma push_macro("elc")
50192 #undef elc
50193#endif
50194//
50195#if defined(ELC_VOID_NAME)
50196 #undef void
50197#endif
50198//
50199#if defined(ELC_PUBLIC_ALL)
50200 #define protected public
50201 #define private public
50202#endif
50203//
50204#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
50205 #undef rand
50206#endif
50207
50208// #define often_noexcept
50209#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
50210#define noexcept_as_auto MAGIC//哦现在有了
50211#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
50212#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
50213
50214#define using_method_from_base_t(name,...) \
50215template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
50216auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
50217{\
50218 return base_t::name(forward<Args>(rest)...);\
50219}\
50220
50221#define using_method_from_value(name,value_name,...) \
50222template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
50223auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
50224{\
50225 return value_name.name(forward<Args>(rest)...);\
50226}\
50227
50228#define floop while(__builtin_is_my_dick_still_there())
50229#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
50230#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
50231#if defined(_MSC_VER) && _MSC_VER>=1935
50232 //@see https://developercommunity.visualstudio.com/t/10193638
50233 #define enable_adl(name) template<typename=void>void name()noexcept=delete
50234#else
50235 #define enable_adl(name) void name()noexcept=delete
50236#endif
50237
50238#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
50239#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
50240
50241#define declvalue(...) (::std::declval<__VA_ARGS__>())
50242
50244#define template_error(reason) static_assert(template_error_helper<T>,reason)
50246#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
50248#define template_warning(reason) template_warning_helper<T>(reason)
50249
50250//for type_info
50251#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
50252#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
50253
50254#define is_common_attribute(name) public attribute<T,name<T>>
50255#define is_special_attribute(name) public attribute<T,name>
50256
50257#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
50258#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
50259
50260//for float_size_t
50261#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
50262//bitnum_of
50263#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
50264
50265//for attribute
50266#define def_common_attribute_with_nothing(name) \
50267template<typename T>\
50268class name{}\
50269
50270#define def_special_attribute_with_nothing(name) \
50271class name{}\
50272
50273#define common_attribute_t template<class>class
50274#define special_attribute_t class
50275
50284#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
50286#define enabled_by_default class enable_state=void
50288#define disabled_by_default class enable_state= ::std::enable_if_t<false>
50290#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
50292#define enable_flag class enable_state
50293
50294#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
50295#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
50296#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
50297#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
50298#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
50299
50301#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
50303#define get_recursive_λ_caller(name,...) \
50304exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
50305 return name(name,Args...);\
50306}
50308#define λ []
50310#define exλ [&]
50312#define λ_with_catch(...) [__VA_ARGS__]
50314#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
50315//recursive_λ_self_referential_reserved_symbolname
50316#define λ_RLSRRS _my_jb_super_sb_name_
50317
50318#if defined(_MSC_VER) && !defined(__clang__)
50319 #define λ_inline [[msvc::forceinline]]
50320 #define λ_force_inline [[msvc::forceinline]]
50321#elif
50322 #define λ_inline [[gnu::always_inline]]
50323 #define λ_force_inline [[gnu::always_inline]]
50324#else
50325 #define λ_inline
50326 #define λ_force_inline
50327#endif
50328
50329#define MAGIC//ahh,ko no tenno da!
50330
50332#define nothing
50333
50335#define elseif else if
50337#define _big_than_ >
50339#define _small_than_ <
50340
50341#if defined(_MSC_VER)
50342 #define not !
50343 #define and &&
50344 #define or ||
50345#endif
50346
50348#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
50350#define BREAK_NAMESPACE }
50351
50353#define template_name template
50355#define type_name class
50356
50357#if defined(DEBUG) || defined(_DEBUG)
50358 #define not_in_debug 0
50359 #define in_debug 1
50360#else
50361 #define not_in_debug 1
50362 #define in_debug 0
50363#endif
50364
50365#define es U""
50366#define ec(ch) U ## ch
50367
50368#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
50369 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
50370#else
50371 #define ELC_TEST_EVENTNAME(name)
50372#endif
50373
50374#define override_instance_struct \
50375protected:\
50376 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
50377 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
50378 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
50379 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
50380 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
50381
50382#if defined(_MSC_VER) && !defined(__clang__)
50383 #define distinctive __declspec(dllexport)
50384#else
50385 #define distinctive
50386#endif
50387
50388#if defined(_MSC_VER) && !defined(__clang__)
50389 #define force_inline __forceinline
50390#elif defined(__GNUC__) || defined(__clang__)
50391 #define force_inline __attribute__((always_inline)) inline
50392#else
50393 #define force_inline inline
50394#endif
50395
50396#if defined(_MSC_VER) && !defined(__clang__)
50397 #define with_no_vtable __declspec(novtable)
50398#else
50399 #define with_no_vtable
50400#endif
50401
50402#define in_consteval (::std::is_constant_evaluated())
50403
50404#define no_vtable_struct struct with_no_vtable
50405#define no_vtable_class class with_no_vtable
50406
50407//#define get_elc_defs using namespace ::elc::defs
50408
50409//file_end
50410
50411 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
50412
50413 using namespace ::elc::defs;
50414
50415 typedef
50416 #if SYSTEM_TYPE == linux
50417 void*
50418 #elif SYSTEM_TYPE == windows
50419 HMODULE
50420 #endif
50422
50423 [[nodiscard]]inline library_handle base_load_library(const char*file_name)noexcept{
50424 //可返回bool意义为空的值表示失败
50425 return
50426 #if SYSTEM_TYPE == linux
50427 dlopen(file_name,RTLD_LAZY)
50428 #elif SYSTEM_TYPE == windows
50429 LoadLibraryA((LPCSTR)file_name)
50430 #endif
50431 ;
50432 }
50433 [[nodiscard]]inline string base_get_load_error()noexcept{
50434 return
50435 #if SYSTEM_TYPE == linux
50436 to_char_t_str(dlerror());
50437 #elif SYSTEM_TYPE == windows
50438 es"ERROR CODE:"_constexpr_str+to_string((DWORD)GetLastError());//傻逼微软设计的jb端口,再您妈的见
50439 #endif
50440 ;
50441 }
50442 inline void base_free_library(library_handle handle)noexcept{
50443 #if SYSTEM_TYPE == linux
50444 dlclose(handle)
50445 #elif SYSTEM_TYPE == windows
50446 FreeLibrary(handle)
50447 #endif
50448 ;
50449 }
50450 [[nodiscard]]inline void* base_get_symbol(library_handle handle,const char*symbol_name)noexcept{
50451 //可返回bool意义为空的值表示失败
50452 return
50453 #if SYSTEM_TYPE == linux
50454 dlsym(handle,symbol_name)
50455 #elif SYSTEM_TYPE == windows
50456 (void*)GetProcAddress(handle,(LPCSTR)symbol_name)
50457 #endif
50458 ;
50459 }
50460
50461 [[nodiscard]]inline library_handle load_library(string file_name)noexcept{
50462 //可返回bool意义为空的值表示失败
50463 return base_load_library(to_char_str(file_name).c_str());
50464 }
50465 [[nodiscard]]inline string get_load_error()noexcept{
50466 return base_get_load_error();
50467 }
50468 inline void free_library(library_handle handle)noexcept{
50469 return base_free_library(handle);
50470 }
50471 [[nodiscard]]inline void* get_symbol(library_handle handle,string symbol_name)noexcept{
50472 //可返回bool意义为空的值表示失败
50473 return base_get_symbol(handle,to_char_str(symbol_name).c_str());
50474 }
50475
50476 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
50477//_undefs.hpp
50478/*
50479未完成的elc解释器_share文件
50480由steve02081504与Alex0125设计、编写
50481转载时请在不对此文件做任何修改的同时注明出处
50482项目地址:https://github.com/ELC-lang/ELC
50483*/
50484/*
50485 ,??????????????????????????
50486 ????????????????????????????
50487 ?????????????????????????????+
50488 ?????+++++++++++++++++++++++++
50489 ?????+++++++++++++++++++++++++
50490 ??????++++++++++++++++++++++++
50491 ?????++
50492 ?????+++
50493 ??????+++IIIIIIIIIIIIIIIIII
50494 ?????+++++IIIIIIIIIIIIIIIIII
50495 ?????++++++++++++++++++++++++
50496 ??????+++++++++++++++++++++++:
50497 ?????++
50498 ?????+++
50499 ??????++
50500 ??????????????????????????????II
50501 ??????????????????????????????IIII
50502 ,?????????????????????????????IIIII+
50503 =???++++++++++++++++++++++++++III?
50504 ?++++++++++++++++++++++++++++I+
50505*/
50506
50507//defs at "_defs.hpp"
50508
50509#if defined(_MSC_VER)
50510 #pragma warning(pop)
50511#endif
50512//#undef suppress_msvc_warning
50513#undef disable_msvc_warning
50514#undef push_msvc_warning
50515#undef pop_msvc_warning
50516#undef push_and_disable_msvc_warning
50517#if defined(_MSC_VER)
50518 #pragma pack(pop)
50519#endif
50520#if defined(__GNUC__)
50521 #pragma GCC diagnostic pop
50522#endif
50523#if defined(_MSC_VER)
50524 #pragma pop_macro("new")
50525 #pragma pop_macro("delete")
50526 #pragma pop_macro("min")
50527 #pragma pop_macro("max")
50528 #pragma pop_macro("abs")
50529 #pragma pop_macro("export")
50530 #pragma pop_macro("rand")
50531 #pragma pop_macro("sqrt")
50532 #pragma pop_macro("type_info")
50533 #pragma pop_macro("elc")
50534#endif
50535
50536//
50537#if defined(ELC_VOID_NAME)
50538 #define void the_void
50539#endif
50540//
50541#if defined(ELC_PUBLIC_ALL)
50542 #undef protected
50543 #undef private
50544#endif
50545//
50546#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
50547 #define rand the_rand
50548#endif
50549
50550// #undef often_noexcept
50551#undef noexcept_as
50552#undef noexcept_as_auto
50553#undef constexpr_as
50554#undef constexpr_as_auto
50555
50556#undef using_method_from_base_t
50557#undef using_method_from_value
50558
50559#undef floop
50560#undef times
50561#undef debug_times
50562#undef enable_adl
50563
50564#undef re_declvalue
50565#undef re_decltype
50566
50567#undef declvalue
50568
50569#undef template_error
50570#undef template_error_of_type
50571#undef template_warning
50572
50573#undef type_info_of
50574#undef type_name_of
50575
50576#undef is_common_attribute
50577#undef is_special_attribute
50578
50579#undef has_attribute
50580#undef not_has_attribute
50581
50582#undef float_size_of
50583#undef bitnum_of
50584
50585#undef def_common_attribute_with_nothing
50586#undef def_special_attribute_with_nothing
50587
50588#undef common_attribute_t
50589#undef special_attribute_t
50590
50591#undef enable_if
50592#undef enabled_by_default
50593#undef disabled_by_default
50594#undef enable_if_not_ill_form
50595#undef enable_flag
50596
50597#undef was_an_ill_form
50598#undef was_an_ill_form_with_parameter
50599#undef was_not_an_ill_form
50600#undef was_not_an_ill_form_and_noexcept
50601#undef was_not_an_ill_form_with_parameter
50602
50603#undef recursive_λ
50604#undef get_recursive_λ_caller
50605#undef λ
50606#undef exλ
50607#undef λ_with_catch
50608#undef self_recursion
50609#undef λ_RLSRRS
50610#undef λ_inline
50611#undef λ_force_inline
50612
50613#undef MAGIC
50614
50615#undef nothing
50616
50617#undef elseif
50618#undef _big_than_
50619#undef _small_than_
50620
50621#if defined(_MSC_VER)
50622 #undef not
50623 #undef and
50624 #undef or
50625#endif
50626
50627#undef INTER_NAMESPACE
50628#undef BREAK_NAMESPACE
50629
50630#undef szie
50631#undef form
50632
50633#undef template_name
50634#undef type_name
50635
50636#undef not_in_debug
50637
50638#undef es
50639#undef ec
50640
50641#undef ELC_TEST_EVENTNAME
50642
50643#undef override_instance_struct
50644
50645#undef distinctive
50646
50647#undef force_inline
50648
50649#undef with_no_vtable
50650
50651#undef in_consteval
50652
50653#undef no_vtable_struct
50654#undef no_vtable_class
50655
50656//#undef get_elc_defs
50657
50658//file_end
50659
50660 #line 116 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
50661 }
50662 //
50663 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/undef_decl_system_type.hpp"
50664//undef_decl_system_type.hpp
50665/*
50666未完成的elc解释器_share文件
50667由steve02081504与Alex0125设计、编写
50668转载时请在不对此文件做任何修改的同时注明出处
50669项目地址:https://github.com/ELC-lang/ELC
50670*/
50671/*
50672 ,??????????????????????????
50673 ????????????????????????????
50674 ?????????????????????????????+
50675 ?????+++++++++++++++++++++++++
50676 ?????+++++++++++++++++++++++++
50677 ??????++++++++++++++++++++++++
50678 ?????++
50679 ?????+++
50680 ??????+++IIIIIIIIIIIIIIIIII
50681 ?????+++++IIIIIIIIIIIIIIIIII
50682 ?????++++++++++++++++++++++++
50683 ??????+++++++++++++++++++++++:
50684 ?????++
50685 ?????+++
50686 ??????++
50687 ??????????????????????????????II
50688 ??????????????????????????????IIII
50689 ,?????????????????????????????IIIII+
50690 =???++++++++++++++++++++++++++III?
50691 ?++++++++++++++++++++++++++++I+
50692*/
50693//copy&rewrite from steve02081504/evest.h
50694#undef linux
50695#undef windows
50696#undef other
50697#undef SYSTEM_TYPE
50698#undef ERROR_MSG_UNABLE_OS
50699
50700//file_end
50701
50702 #line 119 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/library_load.hpp"
50703#endif
50704
50705//file_end
50706
50707#line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
50708//include locale:自然语言相关的字符串
50709//strings
50710#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
50711//using.hpp
50712/*
50713未完成的elc解释器_share文件
50714由steve02081504与Alex0125设计、编写
50715转载时请在不对此文件做任何修改的同时注明出处
50716项目地址:https://github.com/ELC-lang/ELC
50717*/
50718/*
50719 ,??????????????????????????
50720 ????????????????????????????
50721 ?????????????????????????????+
50722 ?????+++++++++++++++++++++++++
50723 ?????+++++++++++++++++++++++++
50724 ??????++++++++++++++++++++++++
50725 ?????++
50726 ?????+++
50727 ??????+++IIIIIIIIIIIIIIIIII
50728 ?????+++++IIIIIIIIIIIIIIIIII
50729 ?????++++++++++++++++++++++++
50730 ??????+++++++++++++++++++++++:
50731 ?????++
50732 ?????+++
50733 ??????++
50734 ??????????????????????????????II
50735 ??????????????????????????????IIII
50736 ,?????????????????????????????IIIII+
50737 =???++++++++++++++++++++++++++III?
50738 ?++++++++++++++++++++++++++++I+
50739*/
50740/*
50741locale说明
50742elc使用的字符串.
50743调整这些,实现快速本地化.
50744*/
50745#line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
50746
50747//file_end
50748
50749#line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
50750namespace elc::defs{
50751 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
50752//_defs.hpp
50753/*
50754未完成的elc解释器basic文件
50755由steve02081504与Alex0125设计、编写
50756转载时请在不对此文件做任何修改的同时注明出处
50757项目地址:https://github.com/ELC-lang/ELC
50758*/
50759/*
50760 ,??????????????????????????
50761 ????????????????????????????
50762 ?????????????????????????????+
50763 ?????+++++++++++++++++++++++++
50764 ?????+++++++++++++++++++++++++
50765 ??????++++++++++++++++++++++++
50766 ?????++
50767 ?????+++
50768 ??????+++IIIIIIIIIIIIIIIIII
50769 ?????+++++IIIIIIIIIIIIIIIIII
50770 ?????++++++++++++++++++++++++
50771 ??????+++++++++++++++++++++++:
50772 ?????++
50773 ?????+++
50774 ??????++
50775 ??????????????????????????????II
50776 ??????????????????????????????IIII
50777 ,?????????????????????????????IIIII+
50778 =???++++++++++++++++++++++++++III?
50779 ?++++++++++++++++++++++++++++I+
50780*/
50781#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
50782//_defs.hpp
50783/*
50784未完成的elc解释器_share文件
50785由steve02081504与Alex0125设计、编写
50786转载时请在不对此文件做任何修改的同时注明出处
50787项目地址:https://github.com/ELC-lang/ELC
50788*/
50789/*
50790 ,??????????????????????????
50791 ????????????????????????????
50792 ?????????????????????????????+
50793 ?????+++++++++++++++++++++++++
50794 ?????+++++++++++++++++++++++++
50795 ??????++++++++++++++++++++++++
50796 ?????++
50797 ?????+++
50798 ??????+++IIIIIIIIIIIIIIIIII
50799 ?????+++++IIIIIIIIIIIIIIIIII
50800 ?????++++++++++++++++++++++++
50801 ??????+++++++++++++++++++++++:
50802 ?????++
50803 ?????+++
50804 ??????++
50805 ??????????????????????????????II
50806 ??????????????????????????????IIII
50807 ,?????????????????????????????IIIII+
50808 =???++++++++++++++++++++++++++III?
50809 ?++++++++++++++++++++++++++++I+
50810*/
50811
50812//undefs at "_undefs.hpp"
50813
50814#if defined(ELC_CODE_REALM)
50815 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
50816#endif
50817
50818//set ELC_WARNING_LEVEL default to 4(max)
50819#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
50820
50821#if defined(_MSC_VER)
50822 #pragma warning(push,ELC_WARNING_LEVEL)
50823 #pragma warning(disable:4099)//class与struct混用警告diss
50824 #pragma warning(disable:4584)//重复子类警告diss
50825 #pragma warning(disable:4250)//域控制继承警告diss
50826 #pragma warning(disable:26432)//不完全默认方法警告diss
50827 #pragma warning(disable:26435)//virtual override方法警告diss
50828 #pragma warning(disable:26481)//容器安利diss
50829 #pragma warning(disable:26446)//gsl::at安利diss
50830 #pragma warning(disable:26434)//方法覆盖警告diss
50831 #pragma warning(disable:26429)//gsl::not_null安利diss
50832 #pragma warning(disable:26471)//对void*进行static_cast安利diss
50833 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
50834 #pragma warning(disable:26473)//相同指针显式cast警告diss
50835 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
50836 #pragma warning(disable:26485)//数组作指针警告diss
50837 #pragma warning(disable:26490)//reinterpret_cast警告diss
50838 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
50839 #pragma warning(disable:26482)//非常数数组索引警告diss
50840 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
50841#endif
50842#if defined(__GNUC__)
50843 #pragma GCC diagnostic push
50844 #pragma GCC diagnostic warning "-Wall"//开启所有警告
50845 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
50846#endif
50847#if defined(_MSC_VER)
50848 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
50849 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
50850 #define push_msvc_warning() __pragma(warning(push))
50851 #define pop_msvc_warning() __pragma(warning(pop))
50852 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
50853#else
50854 //#define suppress_msvc_warning(...)
50855 #define disable_msvc_warning(...)
50856 #define push_msvc_warning()
50857 #define pop_msvc_warning()
50858 #define push_and_disable_msvc_warning(...)
50859#endif
50860#if defined(_MSC_VER)
50861 //push pack settings
50862 #pragma pack(push)
50863 #pragma pack()
50864#endif
50865#if defined(_MSC_VER)
50866 //push and undef common macros
50867 #pragma push_macro("new")
50868 #undef new
50869 #pragma push_macro("delete")
50870 #undef delete
50871 #pragma push_macro("min")
50872 #undef min
50873 #pragma push_macro("max")
50874 #undef max
50875 #pragma push_macro("abs")
50876 #undef abs
50877 #pragma push_macro("export")
50878 #undef export
50879 #pragma push_macro("rand")
50880 #undef rand
50881 #pragma push_macro("sqrt")
50882 #undef sqrt
50883 #pragma push_macro("type_info")
50884 #undef type_info
50885 #pragma push_macro("elc")
50886 #undef elc
50887#endif
50888//
50889#if defined(ELC_VOID_NAME)
50890 #undef void
50891#endif
50892//
50893#if defined(ELC_PUBLIC_ALL)
50894 #define protected public
50895 #define private public
50896#endif
50897//
50898#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
50899 #undef rand
50900#endif
50901
50902// #define often_noexcept
50903#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
50904#define noexcept_as_auto MAGIC//哦现在有了
50905#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
50906#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
50907
50908#define using_method_from_base_t(name,...) \
50909template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
50910auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
50911{\
50912 return base_t::name(forward<Args>(rest)...);\
50913}\
50914
50915#define using_method_from_value(name,value_name,...) \
50916template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
50917auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
50918{\
50919 return value_name.name(forward<Args>(rest)...);\
50920}\
50921
50922#define floop while(__builtin_is_my_dick_still_there())
50923#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
50924#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
50925#if defined(_MSC_VER) && _MSC_VER>=1935
50926 //@see https://developercommunity.visualstudio.com/t/10193638
50927 #define enable_adl(name) template<typename=void>void name()noexcept=delete
50928#else
50929 #define enable_adl(name) void name()noexcept=delete
50930#endif
50931
50932#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
50933#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
50934
50935#define declvalue(...) (::std::declval<__VA_ARGS__>())
50936
50938#define template_error(reason) static_assert(template_error_helper<T>,reason)
50940#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
50942#define template_warning(reason) template_warning_helper<T>(reason)
50943
50944//for type_info
50945#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
50946#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
50947
50948#define is_common_attribute(name) public attribute<T,name<T>>
50949#define is_special_attribute(name) public attribute<T,name>
50950
50951#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
50952#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
50953
50954//for float_size_t
50955#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
50956//bitnum_of
50957#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
50958
50959//for attribute
50960#define def_common_attribute_with_nothing(name) \
50961template<typename T>\
50962class name{}\
50963
50964#define def_special_attribute_with_nothing(name) \
50965class name{}\
50966
50967#define common_attribute_t template<class>class
50968#define special_attribute_t class
50969
50978#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
50980#define enabled_by_default class enable_state=void
50982#define disabled_by_default class enable_state= ::std::enable_if_t<false>
50984#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
50986#define enable_flag class enable_state
50987
50988#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
50989#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
50990#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
50991#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
50992#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
50993
50995#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
50997#define get_recursive_λ_caller(name,...) \
50998exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
50999 return name(name,Args...);\
51000}
51002#define λ []
51004#define exλ [&]
51006#define λ_with_catch(...) [__VA_ARGS__]
51008#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
51009//recursive_λ_self_referential_reserved_symbolname
51010#define λ_RLSRRS _my_jb_super_sb_name_
51011
51012#if defined(_MSC_VER) && !defined(__clang__)
51013 #define λ_inline [[msvc::forceinline]]
51014 #define λ_force_inline [[msvc::forceinline]]
51015#elif
51016 #define λ_inline [[gnu::always_inline]]
51017 #define λ_force_inline [[gnu::always_inline]]
51018#else
51019 #define λ_inline
51020 #define λ_force_inline
51021#endif
51022
51023#define MAGIC//ahh,ko no tenno da!
51024
51026#define nothing
51027
51029#define elseif else if
51031#define _big_than_ >
51033#define _small_than_ <
51034
51035#if defined(_MSC_VER)
51036 #define not !
51037 #define and &&
51038 #define or ||
51039#endif
51040
51042#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
51044#define BREAK_NAMESPACE }
51045
51047#define template_name template
51049#define type_name class
51050
51051#if defined(DEBUG) || defined(_DEBUG)
51052 #define not_in_debug 0
51053 #define in_debug 1
51054#else
51055 #define not_in_debug 1
51056 #define in_debug 0
51057#endif
51058
51059#define es U""
51060#define ec(ch) U ## ch
51061
51062#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
51063 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
51064#else
51065 #define ELC_TEST_EVENTNAME(name)
51066#endif
51067
51068#define override_instance_struct \
51069protected:\
51070 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
51071 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
51072 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
51073 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
51074 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
51075
51076#if defined(_MSC_VER) && !defined(__clang__)
51077 #define distinctive __declspec(dllexport)
51078#else
51079 #define distinctive
51080#endif
51081
51082#if defined(_MSC_VER) && !defined(__clang__)
51083 #define force_inline __forceinline
51084#elif defined(__GNUC__) || defined(__clang__)
51085 #define force_inline __attribute__((always_inline)) inline
51086#else
51087 #define force_inline inline
51088#endif
51089
51090#if defined(_MSC_VER) && !defined(__clang__)
51091 #define with_no_vtable __declspec(novtable)
51092#else
51093 #define with_no_vtable
51094#endif
51095
51096#define in_consteval (::std::is_constant_evaluated())
51097
51098#define no_vtable_struct struct with_no_vtable
51099#define no_vtable_class class with_no_vtable
51100
51101//#define get_elc_defs using namespace ::elc::defs
51102
51103//file_end
51104
51105#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
51106
51107//file_end
51108
51109 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
51110
51111 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/lib_loader.hpp"
51112//lib_loader.hpp
51113//at namespace elc
51114/*
51115未完成的elc解释器base文件
51116由steve02081504与Alex0125设计、编写
51117转载时请在不对此文件做任何修改的同时注明出处
51118项目地址:https://github.com/ELC-lang/ELC
51119*/
51120/*
51121 ,??????????????????????????
51122 ????????????????????????????
51123 ?????????????????????????????+
51124 ?????+++++++++++++++++++++++++
51125 ?????+++++++++++++++++++++++++
51126 ??????++++++++++++++++++++++++
51127 ?????++
51128 ?????+++
51129 ??????+++IIIIIIIIIIIIIIIIII
51130 ?????+++++IIIIIIIIIIIIIIIIII
51131 ?????++++++++++++++++++++++++
51132 ??????+++++++++++++++++++++++:
51133 ?????++
51134 ?????+++
51135 ??????++
51136 ??????????????????????????????II
51137 ??????????????????????????????IIII
51138 ,?????????????????????????????IIIII+
51139 =???++++++++++++++++++++++++++III?
51140 ?++++++++++++++++++++++++++++I+
51141*/
51142namespace lib_loader_n{
51143 using namespace ::elc::APIs::library_load;
51144
51145 struct library_info_t;
51146 typedef comn_ptr_t<library_info_t> library_handle_t;
51147
51149 with_common_attribute<ref_able,never_in_array>,build_by_get_only{
51150 private:
51151 library_handle _m;
51152 string _name;
51153 string _error;
51154 public:
51155 constexpr explicit library_info_t(special_init_t)noexcept{
51156 _m=library_handle{0};
51157 _error=locale::str::lib_load::null_lib;
51158 attribute_ptr_cast<ref_able>(this)->init_never_ref_num_zero();
51159 }
51160 explicit library_info_t(string lib_name)noexcept{
51161 _name=lib_name;
51162 _m=load_library(lib_name);
51163
51164 if(!_m)
51165 _error=get_load_error();
51166 }
51168 free_library(_m);
51169 }
51170 [[nodiscard]]explicit operator bool()const noexcept{
51171 return bool(_m);
51172 }
51173 [[nodiscard]]string get_error()noexcept{
51174 return _error;
51175 }
51176 [[nodiscard]]string get_name()noexcept{
51177 return _name;
51178 }
51179
51180 [[nodiscard]]void*get_symbol(string symbol_name)noexcept{
51181 return APIs::library_load::get_symbol(_m,symbol_name);
51182 }
51183 template<class symbol_t>
51184 [[nodiscard]]symbol_t&get_symbol_as(string symbol_name)noexcept{
51185 return*reinterpret_cast<symbol_t*>(get_symbol(symbol_name));
51186 }
51187 template<class Func_t>
51188 [[nodiscard]]function_t<Func_t>get_symbol_as_function(string symbol_name)noexcept;
51189 };
51190 [[nodiscard]]inline bool the_pointer_to_bool(const library_info_t*a)noexcept{
51191 return a->operator bool();
51192 }
51194 [[nodiscard]]inline constexpr library_info_t*the_get_null_ptr(const library_info_t*)noexcept{return&null_lib;}
51195
51196 /*
51197 base_symbol_t
51198 容纳一个library_handle_t以引用计数lib资源
51199 同时容纳自身的符号名以方便反向查找名称
51200 */
51205 /*
51206 symbol_t
51207 继承function_data_wrapper_t的operator()以可转换为function_t
51208 继承base_symbol_t以对lib的引用计数和包含更多相关信息
51209 */
51210 template<class Func_t>
51211 struct symbol_t;
51212 #if !defined(_MSC_VER)
51213 template<class Ret_t,class...Args_t,bool nothrow>
51214 struct symbol_t<Ret_t(Args_t...)noexcept(nothrow)>:function_data_wrapper_t<Ret_t(*)(Args_t...)noexcept(nothrow)>,base_symbol_t{
51215 symbol_t(library_handle_t lib,string symbol_name,Ret_t(*self)(Args_t...)noexcept(nothrow))noexcept:
51216 function_data_wrapper_t<Ret_t(*)(Args_t...)noexcept(nothrow)>(self),base_symbol_t(lib,symbol_name){}
51217 };
51218 #else
51219 //MSVC,我滴垃圾堆
51220 template<class Ret_t,class...Args_t>
51221 struct symbol_t<Ret_t(Args_t...)>:function_data_wrapper_t<Ret_t(*)(Args_t...)>,base_symbol_t{
51222 symbol_t(library_handle_t lib,string symbol_name,Ret_t(*self)(Args_t...))noexcept:
51223 function_data_wrapper_t<Ret_t(*)(Args_t...)>(self),base_symbol_t(lib,symbol_name){}
51224 };
51225 template<class Ret_t,class...Args_t>
51226 struct symbol_t<Ret_t(Args_t...)noexcept>:function_data_wrapper_t<Ret_t(*)(Args_t...)noexcept>,base_symbol_t{
51227 symbol_t(library_handle_t lib,string symbol_name,Ret_t(*self)(Args_t...)noexcept)noexcept:
51228 function_data_wrapper_t<Ret_t(*)(Args_t...)noexcept>(self),base_symbol_t(lib,symbol_name){}
51229 };
51230 #endif
51231
51232 template<class Func_t>
51233 [[nodiscard]]inline function_t<Func_t>library_info_t::get_symbol_as_function(string symbol_name)noexcept{
51234 auto func_p=&get_symbol_as<Func_t>(symbol_name);
51235 if(!func_p)
51236 return null_ptr;
51237 else
51238 return symbol_t<Func_t>(this,symbol_name,func_p);
51239 }
51240
51241 [[nodiscard]]inline library_handle_t load_lib(string lib_name)noexcept{
51242 return get<library_info_t>(lib_name);
51243 }
51244 template<class Func_t>
51245 [[nodiscard]]inline library_handle_t get_library_handle_form_symbol(function_t<Func_t> symbol)noexcept{
51246 auto symbol_info=symbol.get_as<base_symbol_t>();
51247 if(symbol_info.fail())
51248 return null_ptr;
51249 else
51250 return symbol_info.get_ref()._lib;
51251 }
51252 template<class Func_t>
51253 [[nodiscard]]inline string get_symbol_name_form_symbol(function_t<Func_t> symbol)noexcept{
51254 auto symbol_info=symbol.get_as<base_symbol_t>();
51255 if(symbol_info.fail())
51256 return{};
51257 else
51258 return symbol_info.get_ref()._name;
51259 }
51260}
51261
51262//file_end
51263
51264 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
51265 #if defined(ELC_TEST_ON)
51266 namespace lib_loader_part_test{
51267 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_test.hpp"
51268//_test.hpp
51269/*
51270未完成的elc解释器template文件
51271由steve02081504与Alex0125设计、编写
51272转载时请在不对此文件做任何修改的同时注明出处
51273项目地址:https://github.com/ELC-lang/ELC
51274*/
51275/*
51276 ,??????????????????????????
51277 ????????????????????????????
51278 ?????????????????????????????+
51279 ?????+++++++++++++++++++++++++
51280 ?????+++++++++++++++++++++++++
51281 ??????++++++++++++++++++++++++
51282 ?????++
51283 ?????+++
51284 ??????+++IIIIIIIIIIIIIIIIII
51285 ?????+++++IIIIIIIIIIIIIIIIII
51286 ?????++++++++++++++++++++++++
51287 ??????+++++++++++++++++++++++:
51288 ?????++
51289 ?????+++
51290 ??????++
51291 ??????????????????????????????II
51292 ??????????????????????????????IIII
51293 ,?????????????????????????????IIIII+
51294 =???++++++++++++++++++++++++++III?
51295 ?++++++++++++++++++++++++++++I+
51296*/
51297inline void test(){
51298 ELC_TEST_EVENTNAME("lib_loader部分测试");
51299}
51300inline void test_log_out(){}
51301inline void test_end{}
51302
51303//file_end
51304
51305 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
51306 }
51307 #endif
51308
51309 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
51310//_undefs.hpp
51311/*
51312未完成的elc解释器basic文件
51313由steve02081504与Alex0125设计、编写
51314转载时请在不对此文件做任何修改的同时注明出处
51315项目地址:https://github.com/ELC-lang/ELC
51316*/
51317/*
51318 ,??????????????????????????
51319 ????????????????????????????
51320 ?????????????????????????????+
51321 ?????+++++++++++++++++++++++++
51322 ?????+++++++++++++++++++++++++
51323 ??????++++++++++++++++++++++++
51324 ?????++
51325 ?????+++
51326 ??????+++IIIIIIIIIIIIIIIIII
51327 ?????+++++IIIIIIIIIIIIIIIIII
51328 ?????++++++++++++++++++++++++
51329 ??????+++++++++++++++++++++++:
51330 ?????++
51331 ?????+++
51332 ??????++
51333 ??????????????????????????????II
51334 ??????????????????????????????IIII
51335 ,?????????????????????????????IIIII+
51336 =???++++++++++++++++++++++++++III?
51337 ?++++++++++++++++++++++++++++I+
51338*/
51339#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
51340//_undefs.hpp
51341/*
51342未完成的elc解释器_share文件
51343由steve02081504与Alex0125设计、编写
51344转载时请在不对此文件做任何修改的同时注明出处
51345项目地址:https://github.com/ELC-lang/ELC
51346*/
51347/*
51348 ,??????????????????????????
51349 ????????????????????????????
51350 ?????????????????????????????+
51351 ?????+++++++++++++++++++++++++
51352 ?????+++++++++++++++++++++++++
51353 ??????++++++++++++++++++++++++
51354 ?????++
51355 ?????+++
51356 ??????+++IIIIIIIIIIIIIIIIII
51357 ?????+++++IIIIIIIIIIIIIIIIII
51358 ?????++++++++++++++++++++++++
51359 ??????+++++++++++++++++++++++:
51360 ?????++
51361 ?????+++
51362 ??????++
51363 ??????????????????????????????II
51364 ??????????????????????????????IIII
51365 ,?????????????????????????????IIIII+
51366 =???++++++++++++++++++++++++++III?
51367 ?++++++++++++++++++++++++++++I+
51368*/
51369
51370//defs at "_defs.hpp"
51371
51372#if defined(_MSC_VER)
51373 #pragma warning(pop)
51374#endif
51375//#undef suppress_msvc_warning
51376#undef disable_msvc_warning
51377#undef push_msvc_warning
51378#undef pop_msvc_warning
51379#undef push_and_disable_msvc_warning
51380#if defined(_MSC_VER)
51381 #pragma pack(pop)
51382#endif
51383#if defined(__GNUC__)
51384 #pragma GCC diagnostic pop
51385#endif
51386#if defined(_MSC_VER)
51387 #pragma pop_macro("new")
51388 #pragma pop_macro("delete")
51389 #pragma pop_macro("min")
51390 #pragma pop_macro("max")
51391 #pragma pop_macro("abs")
51392 #pragma pop_macro("export")
51393 #pragma pop_macro("rand")
51394 #pragma pop_macro("sqrt")
51395 #pragma pop_macro("type_info")
51396 #pragma pop_macro("elc")
51397#endif
51398
51399//
51400#if defined(ELC_VOID_NAME)
51401 #define void the_void
51402#endif
51403//
51404#if defined(ELC_PUBLIC_ALL)
51405 #undef protected
51406 #undef private
51407#endif
51408//
51409#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
51410 #define rand the_rand
51411#endif
51412
51413// #undef often_noexcept
51414#undef noexcept_as
51415#undef noexcept_as_auto
51416#undef constexpr_as
51417#undef constexpr_as_auto
51418
51419#undef using_method_from_base_t
51420#undef using_method_from_value
51421
51422#undef floop
51423#undef times
51424#undef debug_times
51425#undef enable_adl
51426
51427#undef re_declvalue
51428#undef re_decltype
51429
51430#undef declvalue
51431
51432#undef template_error
51433#undef template_error_of_type
51434#undef template_warning
51435
51436#undef type_info_of
51437#undef type_name_of
51438
51439#undef is_common_attribute
51440#undef is_special_attribute
51441
51442#undef has_attribute
51443#undef not_has_attribute
51444
51445#undef float_size_of
51446#undef bitnum_of
51447
51448#undef def_common_attribute_with_nothing
51449#undef def_special_attribute_with_nothing
51450
51451#undef common_attribute_t
51452#undef special_attribute_t
51453
51454#undef enable_if
51455#undef enabled_by_default
51456#undef disabled_by_default
51457#undef enable_if_not_ill_form
51458#undef enable_flag
51459
51460#undef was_an_ill_form
51461#undef was_an_ill_form_with_parameter
51462#undef was_not_an_ill_form
51463#undef was_not_an_ill_form_and_noexcept
51464#undef was_not_an_ill_form_with_parameter
51465
51466#undef recursive_λ
51467#undef get_recursive_λ_caller
51468#undef λ
51469#undef exλ
51470#undef λ_with_catch
51471#undef self_recursion
51472#undef λ_RLSRRS
51473#undef λ_inline
51474#undef λ_force_inline
51475
51476#undef MAGIC
51477
51478#undef nothing
51479
51480#undef elseif
51481#undef _big_than_
51482#undef _small_than_
51483
51484#if defined(_MSC_VER)
51485 #undef not
51486 #undef and
51487 #undef or
51488#endif
51489
51490#undef INTER_NAMESPACE
51491#undef BREAK_NAMESPACE
51492
51493#undef szie
51494#undef form
51495
51496#undef template_name
51497#undef type_name
51498
51499#undef not_in_debug
51500
51501#undef es
51502#undef ec
51503
51504#undef ELC_TEST_EVENTNAME
51505
51506#undef override_instance_struct
51507
51508#undef distinctive
51509
51510#undef force_inline
51511
51512#undef with_no_vtable
51513
51514#undef in_consteval
51515
51516#undef no_vtable_struct
51517#undef no_vtable_class
51518
51519//#undef get_elc_defs
51520
51521//file_end
51522
51523#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
51524
51525//file_end
51526
51527 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
51528}
51529namespace elc{
51530 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_export.hpp"
51531//_export.hpp
51532//at namespace elc
51533/*
51534未完成的elc解释器template文件
51535由steve02081504与Alex0125设计、编写
51536转载时请在不对此文件做任何修改的同时注明出处
51537项目地址:https://github.com/ELC-lang/ELC
51538*/
51539/*
51540 ,??????????????????????????
51541 ????????????????????????????
51542 ?????????????????????????????+
51543 ?????+++++++++++++++++++++++++
51544 ?????+++++++++++++++++++++++++
51545 ??????++++++++++++++++++++++++
51546 ?????++
51547 ?????+++
51548 ??????+++IIIIIIIIIIIIIIIIII
51549 ?????+++++IIIIIIIIIIIIIIIIII
51550 ?????++++++++++++++++++++++++
51551 ??????+++++++++++++++++++++++:
51552 ?????++
51553 ?????+++
51554 ??????++
51555 ??????????????????????????????II
51556 ??????????????????????????????IIII
51557 ,?????????????????????????????IIIII+
51558 =???++++++++++++++++++++++++++III?
51559 ?++++++++++++++++++++++++++++I+
51560*/
51561#define export using defs::lib_loader_n::
51562export library_handle_t;
51563export load_lib;
51566#undef export
51567
51568//file_end
51569
51570 #line 52 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/lib_loader/_body.hpp"
51571}
51572
51573//file_end
51574
51575 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
51576#endif
51577
51578//file_end
51579
51580 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
51581 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/literal"
51582//literal
51583//at namespace ::
51584/*@
51585未完成的elc解释器include文件
51586由steve02081504与Alex0125设计、编写
51587转载时请在不对此文件做任何修改的同时注明出处
51588项目地址:https://github.com/ELC-lang/ELC
51589*/
51590/*
51591 ,??????????????????????????
51592 ????????????????????????????
51593 ?????????????????????????????+
51594 ?????+++++++++++++++++++++++++
51595 ?????+++++++++++++++++++++++++
51596 ??????++++++++++++++++++++++++
51597 ?????++
51598 ?????+++
51599 ??????+++IIIIIIIIIIIIIIIIII
51600 ?????+++++IIIIIIIIIIIIIIIIII
51601 ?????++++++++++++++++++++++++
51602 ??????+++++++++++++++++++++++:
51603 ?????++
51604 ?????+++
51605 ??????++
51606 ??????????????????????????????II
51607 ??????????????????????????????IIII
51608 ,?????????????????????????????IIIII+
51609 =???++++++++++++++++++++++++++III?
51610 ?++++++++++++++++++++++++++++I+
51611*/
51612#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
51613//pre_checks.hpp
51614/*
51615未完成的elc解释器_share文件
51616由steve02081504与Alex0125设计、编写
51617转载时请在不对此文件做任何修改的同时注明出处
51618项目地址:https://github.com/ELC-lang/ELC
51619*/
51620/*
51621 ,??????????????????????????
51622 ????????????????????????????
51623 ?????????????????????????????+
51624 ?????+++++++++++++++++++++++++
51625 ?????+++++++++++++++++++++++++
51626 ??????++++++++++++++++++++++++
51627 ?????++
51628 ?????+++
51629 ??????+++IIIIIIIIIIIIIIIIII
51630 ?????+++++IIIIIIIIIIIIIIIIII
51631 ?????++++++++++++++++++++++++
51632 ??????+++++++++++++++++++++++:
51633 ?????++
51634 ?????+++
51635 ??????++
51636 ??????????????????????????????II
51637 ??????????????????????????????IIII
51638 ,?????????????????????????????IIIII+
51639 =???++++++++++++++++++++++++++III?
51640 ?++++++++++++++++++++++++++++I+
51641*/
51642//__cplusplus needs 20+
51643#if !defined(__cplusplus)||__cplusplus<202002L
51644 //if msvc, check _MSVC_LANG
51645 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
51646 //ok
51647 #else
51648 #error "elc files needs c++20 or higher"
51649 #endif
51650#endif
51651
51652//check if the compiler is msvc
51653#if defined(_MSC_VER)
51654 //check if _CPPRTTI
51655 #if !defined(_CPPRTTI)
51656 #error "elc files needs rtti"
51657 #endif
51658 //check _MSC_VER at last 1932
51659 #if _MSC_VER<1932
51660 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
51661 #endif
51662#endif
51663
51664//file_end
51665
51666#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/literal"
51667#if !defined(ELC_LITERAL)
51668 #define ELC_LITERAL
51669 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_body.hpp"
51670//_body.hpp
51671//at namespace ::
51672/*
51673未完成的elc解释器literal文件
51674由steve02081504与Alex0125设计、编写
51675转载时请在不对此文件做任何修改的同时注明出处
51676项目地址:https://github.com/ELC-lang/ELC
51677*/
51678/*
51679 ,??????????????????????????
51680 ????????????????????????????
51681 ?????????????????????????????+
51682 ?????+++++++++++++++++++++++++
51683 ?????+++++++++++++++++++++++++
51684 ??????++++++++++++++++++++++++
51685 ?????++
51686 ?????+++
51687 ??????+++IIIIIIIIIIIIIIIIII
51688 ?????+++++IIIIIIIIIIIIIIIIII
51689 ?????++++++++++++++++++++++++
51690 ??????+++++++++++++++++++++++:
51691 ?????++
51692 ?????+++
51693 ??????++
51694 ??????????????????????????????II
51695 ??????????????????????????????IIII
51696 ,?????????????????????????????IIIII+
51697 =???++++++++++++++++++++++++++III?
51698 ?++++++++++++++++++++++++++++I+
51699*/
51700#if defined(ELC_TEST)
51701 #error "this part cannot be tested."
51702#endif
51703namespace elc::defs{
51704 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
51705//_defs.hpp
51706/*
51707未完成的elc解释器basic文件
51708由steve02081504与Alex0125设计、编写
51709转载时请在不对此文件做任何修改的同时注明出处
51710项目地址:https://github.com/ELC-lang/ELC
51711*/
51712/*
51713 ,??????????????????????????
51714 ????????????????????????????
51715 ?????????????????????????????+
51716 ?????+++++++++++++++++++++++++
51717 ?????+++++++++++++++++++++++++
51718 ??????++++++++++++++++++++++++
51719 ?????++
51720 ?????+++
51721 ??????+++IIIIIIIIIIIIIIIIII
51722 ?????+++++IIIIIIIIIIIIIIIIII
51723 ?????++++++++++++++++++++++++
51724 ??????+++++++++++++++++++++++:
51725 ?????++
51726 ?????+++
51727 ??????++
51728 ??????????????????????????????II
51729 ??????????????????????????????IIII
51730 ,?????????????????????????????IIIII+
51731 =???++++++++++++++++++++++++++III?
51732 ?++++++++++++++++++++++++++++I+
51733*/
51734#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
51735//_defs.hpp
51736/*
51737未完成的elc解释器_share文件
51738由steve02081504与Alex0125设计、编写
51739转载时请在不对此文件做任何修改的同时注明出处
51740项目地址:https://github.com/ELC-lang/ELC
51741*/
51742/*
51743 ,??????????????????????????
51744 ????????????????????????????
51745 ?????????????????????????????+
51746 ?????+++++++++++++++++++++++++
51747 ?????+++++++++++++++++++++++++
51748 ??????++++++++++++++++++++++++
51749 ?????++
51750 ?????+++
51751 ??????+++IIIIIIIIIIIIIIIIII
51752 ?????+++++IIIIIIIIIIIIIIIIII
51753 ?????++++++++++++++++++++++++
51754 ??????+++++++++++++++++++++++:
51755 ?????++
51756 ?????+++
51757 ??????++
51758 ??????????????????????????????II
51759 ??????????????????????????????IIII
51760 ,?????????????????????????????IIIII+
51761 =???++++++++++++++++++++++++++III?
51762 ?++++++++++++++++++++++++++++I+
51763*/
51764
51765//undefs at "_undefs.hpp"
51766
51767#if defined(ELC_CODE_REALM)
51768 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
51769#endif
51770
51771//set ELC_WARNING_LEVEL default to 4(max)
51772#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
51773
51774#if defined(_MSC_VER)
51775 #pragma warning(push,ELC_WARNING_LEVEL)
51776 #pragma warning(disable:4099)//class与struct混用警告diss
51777 #pragma warning(disable:4584)//重复子类警告diss
51778 #pragma warning(disable:4250)//域控制继承警告diss
51779 #pragma warning(disable:26432)//不完全默认方法警告diss
51780 #pragma warning(disable:26435)//virtual override方法警告diss
51781 #pragma warning(disable:26481)//容器安利diss
51782 #pragma warning(disable:26446)//gsl::at安利diss
51783 #pragma warning(disable:26434)//方法覆盖警告diss
51784 #pragma warning(disable:26429)//gsl::not_null安利diss
51785 #pragma warning(disable:26471)//对void*进行static_cast安利diss
51786 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
51787 #pragma warning(disable:26473)//相同指针显式cast警告diss
51788 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
51789 #pragma warning(disable:26485)//数组作指针警告diss
51790 #pragma warning(disable:26490)//reinterpret_cast警告diss
51791 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
51792 #pragma warning(disable:26482)//非常数数组索引警告diss
51793 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
51794#endif
51795#if defined(__GNUC__)
51796 #pragma GCC diagnostic push
51797 #pragma GCC diagnostic warning "-Wall"//开启所有警告
51798 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
51799#endif
51800#if defined(_MSC_VER)
51801 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
51802 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
51803 #define push_msvc_warning() __pragma(warning(push))
51804 #define pop_msvc_warning() __pragma(warning(pop))
51805 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
51806#else
51807 //#define suppress_msvc_warning(...)
51808 #define disable_msvc_warning(...)
51809 #define push_msvc_warning()
51810 #define pop_msvc_warning()
51811 #define push_and_disable_msvc_warning(...)
51812#endif
51813#if defined(_MSC_VER)
51814 //push pack settings
51815 #pragma pack(push)
51816 #pragma pack()
51817#endif
51818#if defined(_MSC_VER)
51819 //push and undef common macros
51820 #pragma push_macro("new")
51821 #undef new
51822 #pragma push_macro("delete")
51823 #undef delete
51824 #pragma push_macro("min")
51825 #undef min
51826 #pragma push_macro("max")
51827 #undef max
51828 #pragma push_macro("abs")
51829 #undef abs
51830 #pragma push_macro("export")
51831 #undef export
51832 #pragma push_macro("rand")
51833 #undef rand
51834 #pragma push_macro("sqrt")
51835 #undef sqrt
51836 #pragma push_macro("type_info")
51837 #undef type_info
51838 #pragma push_macro("elc")
51839 #undef elc
51840#endif
51841//
51842#if defined(ELC_VOID_NAME)
51843 #undef void
51844#endif
51845//
51846#if defined(ELC_PUBLIC_ALL)
51847 #define protected public
51848 #define private public
51849#endif
51850//
51851#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
51852 #undef rand
51853#endif
51854
51855// #define often_noexcept
51856#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
51857#define noexcept_as_auto MAGIC//哦现在有了
51858#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
51859#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
51860
51861#define using_method_from_base_t(name,...) \
51862template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
51863auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
51864{\
51865 return base_t::name(forward<Args>(rest)...);\
51866}\
51867
51868#define using_method_from_value(name,value_name,...) \
51869template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
51870auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
51871{\
51872 return value_name.name(forward<Args>(rest)...);\
51873}\
51874
51875#define floop while(__builtin_is_my_dick_still_there())
51876#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
51877#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
51878#if defined(_MSC_VER) && _MSC_VER>=1935
51879 //@see https://developercommunity.visualstudio.com/t/10193638
51880 #define enable_adl(name) template<typename=void>void name()noexcept=delete
51881#else
51882 #define enable_adl(name) void name()noexcept=delete
51883#endif
51884
51885#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
51886#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
51887
51888#define declvalue(...) (::std::declval<__VA_ARGS__>())
51889
51891#define template_error(reason) static_assert(template_error_helper<T>,reason)
51893#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
51895#define template_warning(reason) template_warning_helper<T>(reason)
51896
51897//for type_info
51898#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
51899#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
51900
51901#define is_common_attribute(name) public attribute<T,name<T>>
51902#define is_special_attribute(name) public attribute<T,name>
51903
51904#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
51905#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
51906
51907//for float_size_t
51908#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
51909//bitnum_of
51910#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
51911
51912//for attribute
51913#define def_common_attribute_with_nothing(name) \
51914template<typename T>\
51915class name{}\
51916
51917#define def_special_attribute_with_nothing(name) \
51918class name{}\
51919
51920#define common_attribute_t template<class>class
51921#define special_attribute_t class
51922
51931#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
51933#define enabled_by_default class enable_state=void
51935#define disabled_by_default class enable_state= ::std::enable_if_t<false>
51937#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
51939#define enable_flag class enable_state
51940
51941#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
51942#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
51943#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
51944#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
51945#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
51946
51948#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
51950#define get_recursive_λ_caller(name,...) \
51951exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
51952 return name(name,Args...);\
51953}
51955#define λ []
51957#define exλ [&]
51959#define λ_with_catch(...) [__VA_ARGS__]
51961#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
51962//recursive_λ_self_referential_reserved_symbolname
51963#define λ_RLSRRS _my_jb_super_sb_name_
51964
51965#if defined(_MSC_VER) && !defined(__clang__)
51966 #define λ_inline [[msvc::forceinline]]
51967 #define λ_force_inline [[msvc::forceinline]]
51968#elif
51969 #define λ_inline [[gnu::always_inline]]
51970 #define λ_force_inline [[gnu::always_inline]]
51971#else
51972 #define λ_inline
51973 #define λ_force_inline
51974#endif
51975
51976#define MAGIC//ahh,ko no tenno da!
51977
51979#define nothing
51980
51982#define elseif else if
51984#define _big_than_ >
51986#define _small_than_ <
51987
51988#if defined(_MSC_VER)
51989 #define not !
51990 #define and &&
51991 #define or ||
51992#endif
51993
51995#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
51997#define BREAK_NAMESPACE }
51998
52000#define template_name template
52002#define type_name class
52003
52004#if defined(DEBUG) || defined(_DEBUG)
52005 #define not_in_debug 0
52006 #define in_debug 1
52007#else
52008 #define not_in_debug 1
52009 #define in_debug 0
52010#endif
52011
52012#define es U""
52013#define ec(ch) U ## ch
52014
52015#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
52016 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
52017#else
52018 #define ELC_TEST_EVENTNAME(name)
52019#endif
52020
52021#define override_instance_struct \
52022protected:\
52023 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
52024 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
52025 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
52026 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
52027 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
52028
52029#if defined(_MSC_VER) && !defined(__clang__)
52030 #define distinctive __declspec(dllexport)
52031#else
52032 #define distinctive
52033#endif
52034
52035#if defined(_MSC_VER) && !defined(__clang__)
52036 #define force_inline __forceinline
52037#elif defined(__GNUC__) || defined(__clang__)
52038 #define force_inline __attribute__((always_inline)) inline
52039#else
52040 #define force_inline inline
52041#endif
52042
52043#if defined(_MSC_VER) && !defined(__clang__)
52044 #define with_no_vtable __declspec(novtable)
52045#else
52046 #define with_no_vtable
52047#endif
52048
52049#define in_consteval (::std::is_constant_evaluated())
52050
52051#define no_vtable_struct struct with_no_vtable
52052#define no_vtable_class class with_no_vtable
52053
52054//#define get_elc_defs using namespace ::elc::defs
52055
52056//file_end
52057
52058#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
52059
52060//file_end
52061
52062 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_body.hpp"
52063
52064 #if defined(ELC_TEST_ON)
52065 namespace literal_part_test{
52066 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_test.hpp"
52067//_test.hpp
52068/*
52069未完成的elc解释器literal文件
52070由steve02081504与Alex0125设计、编写
52071转载时请在不对此文件做任何修改的同时注明出处
52072项目地址:https://github.com/ELC-lang/ELC
52073*/
52074/*
52075 ,??????????????????????????
52076 ????????????????????????????
52077 ?????????????????????????????+
52078 ?????+++++++++++++++++++++++++
52079 ?????+++++++++++++++++++++++++
52080 ??????++++++++++++++++++++++++
52081 ?????++
52082 ?????+++
52083 ??????+++IIIIIIIIIIIIIIIIII
52084 ?????+++++IIIIIIIIIIIIIIIIII
52085 ?????++++++++++++++++++++++++
52086 ??????+++++++++++++++++++++++:
52087 ?????++
52088 ?????+++
52089 ??????++
52090 ??????????????????????????????II
52091 ??????????????????????????????IIII
52092 ,?????????????????????????????IIIII+
52093 =???++++++++++++++++++++++++++III?
52094 ?++++++++++++++++++++++++++++I+
52095*/
52096inline void test(){
52097 ELC_TEST_EVENTNAME("literal部分测试");
52098}
52099inline void test_log_out(){
52100}
52101inline void test_end{
52102}
52103
52104//file_end
52105
52106 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_body.hpp"
52107 }
52108 #endif
52109
52110 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
52111//_undefs.hpp
52112/*
52113未完成的elc解释器basic文件
52114由steve02081504与Alex0125设计、编写
52115转载时请在不对此文件做任何修改的同时注明出处
52116项目地址:https://github.com/ELC-lang/ELC
52117*/
52118/*
52119 ,??????????????????????????
52120 ????????????????????????????
52121 ?????????????????????????????+
52122 ?????+++++++++++++++++++++++++
52123 ?????+++++++++++++++++++++++++
52124 ??????++++++++++++++++++++++++
52125 ?????++
52126 ?????+++
52127 ??????+++IIIIIIIIIIIIIIIIII
52128 ?????+++++IIIIIIIIIIIIIIIIII
52129 ?????++++++++++++++++++++++++
52130 ??????+++++++++++++++++++++++:
52131 ?????++
52132 ?????+++
52133 ??????++
52134 ??????????????????????????????II
52135 ??????????????????????????????IIII
52136 ,?????????????????????????????IIIII+
52137 =???++++++++++++++++++++++++++III?
52138 ?++++++++++++++++++++++++++++I+
52139*/
52140#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
52141//_undefs.hpp
52142/*
52143未完成的elc解释器_share文件
52144由steve02081504与Alex0125设计、编写
52145转载时请在不对此文件做任何修改的同时注明出处
52146项目地址:https://github.com/ELC-lang/ELC
52147*/
52148/*
52149 ,??????????????????????????
52150 ????????????????????????????
52151 ?????????????????????????????+
52152 ?????+++++++++++++++++++++++++
52153 ?????+++++++++++++++++++++++++
52154 ??????++++++++++++++++++++++++
52155 ?????++
52156 ?????+++
52157 ??????+++IIIIIIIIIIIIIIIIII
52158 ?????+++++IIIIIIIIIIIIIIIIII
52159 ?????++++++++++++++++++++++++
52160 ??????+++++++++++++++++++++++:
52161 ?????++
52162 ?????+++
52163 ??????++
52164 ??????????????????????????????II
52165 ??????????????????????????????IIII
52166 ,?????????????????????????????IIIII+
52167 =???++++++++++++++++++++++++++III?
52168 ?++++++++++++++++++++++++++++I+
52169*/
52170
52171//defs at "_defs.hpp"
52172
52173#if defined(_MSC_VER)
52174 #pragma warning(pop)
52175#endif
52176//#undef suppress_msvc_warning
52177#undef disable_msvc_warning
52178#undef push_msvc_warning
52179#undef pop_msvc_warning
52180#undef push_and_disable_msvc_warning
52181#if defined(_MSC_VER)
52182 #pragma pack(pop)
52183#endif
52184#if defined(__GNUC__)
52185 #pragma GCC diagnostic pop
52186#endif
52187#if defined(_MSC_VER)
52188 #pragma pop_macro("new")
52189 #pragma pop_macro("delete")
52190 #pragma pop_macro("min")
52191 #pragma pop_macro("max")
52192 #pragma pop_macro("abs")
52193 #pragma pop_macro("export")
52194 #pragma pop_macro("rand")
52195 #pragma pop_macro("sqrt")
52196 #pragma pop_macro("type_info")
52197 #pragma pop_macro("elc")
52198#endif
52199
52200//
52201#if defined(ELC_VOID_NAME)
52202 #define void the_void
52203#endif
52204//
52205#if defined(ELC_PUBLIC_ALL)
52206 #undef protected
52207 #undef private
52208#endif
52209//
52210#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
52211 #define rand the_rand
52212#endif
52213
52214// #undef often_noexcept
52215#undef noexcept_as
52216#undef noexcept_as_auto
52217#undef constexpr_as
52218#undef constexpr_as_auto
52219
52220#undef using_method_from_base_t
52221#undef using_method_from_value
52222
52223#undef floop
52224#undef times
52225#undef debug_times
52226#undef enable_adl
52227
52228#undef re_declvalue
52229#undef re_decltype
52230
52231#undef declvalue
52232
52233#undef template_error
52234#undef template_error_of_type
52235#undef template_warning
52236
52237#undef type_info_of
52238#undef type_name_of
52239
52240#undef is_common_attribute
52241#undef is_special_attribute
52242
52243#undef has_attribute
52244#undef not_has_attribute
52245
52246#undef float_size_of
52247#undef bitnum_of
52248
52249#undef def_common_attribute_with_nothing
52250#undef def_special_attribute_with_nothing
52251
52252#undef common_attribute_t
52253#undef special_attribute_t
52254
52255#undef enable_if
52256#undef enabled_by_default
52257#undef disabled_by_default
52258#undef enable_if_not_ill_form
52259#undef enable_flag
52260
52261#undef was_an_ill_form
52262#undef was_an_ill_form_with_parameter
52263#undef was_not_an_ill_form
52264#undef was_not_an_ill_form_and_noexcept
52265#undef was_not_an_ill_form_with_parameter
52266
52267#undef recursive_λ
52268#undef get_recursive_λ_caller
52269#undef λ
52270#undef exλ
52271#undef λ_with_catch
52272#undef self_recursion
52273#undef λ_RLSRRS
52274#undef λ_inline
52275#undef λ_force_inline
52276
52277#undef MAGIC
52278
52279#undef nothing
52280
52281#undef elseif
52282#undef _big_than_
52283#undef _small_than_
52284
52285#if defined(_MSC_VER)
52286 #undef not
52287 #undef and
52288 #undef or
52289#endif
52290
52291#undef INTER_NAMESPACE
52292#undef BREAK_NAMESPACE
52293
52294#undef szie
52295#undef form
52296
52297#undef template_name
52298#undef type_name
52299
52300#undef not_in_debug
52301
52302#undef es
52303#undef ec
52304
52305#undef ELC_TEST_EVENTNAME
52306
52307#undef override_instance_struct
52308
52309#undef distinctive
52310
52311#undef force_inline
52312
52313#undef with_no_vtable
52314
52315#undef in_consteval
52316
52317#undef no_vtable_struct
52318#undef no_vtable_class
52319
52320//#undef get_elc_defs
52321
52322//file_end
52323
52324#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
52325
52326//file_end
52327
52328 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_body.hpp"
52329}
52330namespace elc{
52331 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_export.hpp"
52332//_export.hpp
52333//at namespace elc
52334/*
52335未完成的elc解释器literal文件
52336由steve02081504与Alex0125设计、编写
52337转载时请在不对此文件做任何修改的同时注明出处
52338项目地址:https://github.com/ELC-lang/ELC
52339*/
52340/*
52341 ,??????????????????????????
52342 ????????????????????????????
52343 ?????????????????????????????+
52344 ?????+++++++++++++++++++++++++
52345 ?????+++++++++++++++++++++++++
52346 ??????++++++++++++++++++++++++
52347 ?????++
52348 ?????+++
52349 ??????+++IIIIIIIIIIIIIIIIII
52350 ?????+++++IIIIIIIIIIIIIIIIII
52351 ?????++++++++++++++++++++++++
52352 ??????+++++++++++++++++++++++:
52353 ?????++
52354 ?????+++
52355 ??????++
52356 ??????????????????????????????II
52357 ??????????????????????????????IIII
52358 ,?????????????????????????????IIIII+
52359 =???++++++++++++++++++++++++++III?
52360 ?++++++++++++++++++++++++++++I+
52361*/
52362#define export using ::
52363#undef export
52364
52365//file_end
52366
52367 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/literal/_body.hpp"
52368}
52369
52370//file_end
52371
52372 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/literal"
52373#endif
52374
52375//file_end
52376
52377 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
52378 //#include "log"
52379 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/memory_stream"
52380//memory_stream
52381//at namespace ::
52382/*@
52383未完成的elc解释器include文件
52384由steve02081504与Alex0125设计、编写
52385转载时请在不对此文件做任何修改的同时注明出处
52386项目地址:https://github.com/ELC-lang/ELC
52387*/
52388/*
52389 ,??????????????????????????
52390 ????????????????????????????
52391 ?????????????????????????????+
52392 ?????+++++++++++++++++++++++++
52393 ?????+++++++++++++++++++++++++
52394 ??????++++++++++++++++++++++++
52395 ?????++
52396 ?????+++
52397 ??????+++IIIIIIIIIIIIIIIIII
52398 ?????+++++IIIIIIIIIIIIIIIIII
52399 ?????++++++++++++++++++++++++
52400 ??????+++++++++++++++++++++++:
52401 ?????++
52402 ?????+++
52403 ??????++
52404 ??????????????????????????????II
52405 ??????????????????????????????IIII
52406 ,?????????????????????????????IIIII+
52407 =???++++++++++++++++++++++++++III?
52408 ?++++++++++++++++++++++++++++I+
52409*/
52410#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
52411//pre_checks.hpp
52412/*
52413未完成的elc解释器_share文件
52414由steve02081504与Alex0125设计、编写
52415转载时请在不对此文件做任何修改的同时注明出处
52416项目地址:https://github.com/ELC-lang/ELC
52417*/
52418/*
52419 ,??????????????????????????
52420 ????????????????????????????
52421 ?????????????????????????????+
52422 ?????+++++++++++++++++++++++++
52423 ?????+++++++++++++++++++++++++
52424 ??????++++++++++++++++++++++++
52425 ?????++
52426 ?????+++
52427 ??????+++IIIIIIIIIIIIIIIIII
52428 ?????+++++IIIIIIIIIIIIIIIIII
52429 ?????++++++++++++++++++++++++
52430 ??????+++++++++++++++++++++++:
52431 ?????++
52432 ?????+++
52433 ??????++
52434 ??????????????????????????????II
52435 ??????????????????????????????IIII
52436 ,?????????????????????????????IIIII+
52437 =???++++++++++++++++++++++++++III?
52438 ?++++++++++++++++++++++++++++I+
52439*/
52440//__cplusplus needs 20+
52441#if !defined(__cplusplus)||__cplusplus<202002L
52442 //if msvc, check _MSVC_LANG
52443 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
52444 //ok
52445 #else
52446 #error "elc files needs c++20 or higher"
52447 #endif
52448#endif
52449
52450//check if the compiler is msvc
52451#if defined(_MSC_VER)
52452 //check if _CPPRTTI
52453 #if !defined(_CPPRTTI)
52454 #error "elc files needs rtti"
52455 #endif
52456 //check _MSC_VER at last 1932
52457 #if _MSC_VER<1932
52458 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
52459 #endif
52460#endif
52461
52462//file_end
52463
52464#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/memory_stream"
52465#if !defined(ELC_MEMORY_STREAM)
52466 #define ELC_MEMORY_STREAM
52467 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_body.hpp"
52468//_body.hpp
52469//at namespace ::
52470/*
52471未完成的elc解释器memory_stream文件
52472由steve02081504与Alex0125设计、编写
52473转载时请在不对此文件做任何修改的同时注明出处
52474项目地址:https://github.com/ELC-lang/ELC
52475*/
52476/*
52477 ,??????????????????????????
52478 ????????????????????????????
52479 ?????????????????????????????+
52480 ?????+++++++++++++++++++++++++
52481 ?????+++++++++++++++++++++++++
52482 ??????++++++++++++++++++++++++
52483 ?????++
52484 ?????+++
52485 ??????+++IIIIIIIIIIIIIIIIII
52486 ?????+++++IIIIIIIIIIIIIIIIII
52487 ?????++++++++++++++++++++++++
52488 ??????+++++++++++++++++++++++:
52489 ?????++
52490 ?????+++
52491 ??????++
52492 ??????????????????????????????II
52493 ??????????????????????????????IIII
52494 ,?????????????????????????????IIIII+
52495 =???++++++++++++++++++++++++++III?
52496 ?++++++++++++++++++++++++++++I+
52497*/
52498#if defined(ELC_TEST)
52499 #error "this part cannot be tested."
52500#endif
52501namespace elc::defs{
52502 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
52503//_defs.hpp
52504/*
52505未完成的elc解释器basic文件
52506由steve02081504与Alex0125设计、编写
52507转载时请在不对此文件做任何修改的同时注明出处
52508项目地址:https://github.com/ELC-lang/ELC
52509*/
52510/*
52511 ,??????????????????????????
52512 ????????????????????????????
52513 ?????????????????????????????+
52514 ?????+++++++++++++++++++++++++
52515 ?????+++++++++++++++++++++++++
52516 ??????++++++++++++++++++++++++
52517 ?????++
52518 ?????+++
52519 ??????+++IIIIIIIIIIIIIIIIII
52520 ?????+++++IIIIIIIIIIIIIIIIII
52521 ?????++++++++++++++++++++++++
52522 ??????+++++++++++++++++++++++:
52523 ?????++
52524 ?????+++
52525 ??????++
52526 ??????????????????????????????II
52527 ??????????????????????????????IIII
52528 ,?????????????????????????????IIIII+
52529 =???++++++++++++++++++++++++++III?
52530 ?++++++++++++++++++++++++++++I+
52531*/
52532#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
52533//_defs.hpp
52534/*
52535未完成的elc解释器_share文件
52536由steve02081504与Alex0125设计、编写
52537转载时请在不对此文件做任何修改的同时注明出处
52538项目地址:https://github.com/ELC-lang/ELC
52539*/
52540/*
52541 ,??????????????????????????
52542 ????????????????????????????
52543 ?????????????????????????????+
52544 ?????+++++++++++++++++++++++++
52545 ?????+++++++++++++++++++++++++
52546 ??????++++++++++++++++++++++++
52547 ?????++
52548 ?????+++
52549 ??????+++IIIIIIIIIIIIIIIIII
52550 ?????+++++IIIIIIIIIIIIIIIIII
52551 ?????++++++++++++++++++++++++
52552 ??????+++++++++++++++++++++++:
52553 ?????++
52554 ?????+++
52555 ??????++
52556 ??????????????????????????????II
52557 ??????????????????????????????IIII
52558 ,?????????????????????????????IIIII+
52559 =???++++++++++++++++++++++++++III?
52560 ?++++++++++++++++++++++++++++I+
52561*/
52562
52563//undefs at "_undefs.hpp"
52564
52565#if defined(ELC_CODE_REALM)
52566 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
52567#endif
52568
52569//set ELC_WARNING_LEVEL default to 4(max)
52570#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
52571
52572#if defined(_MSC_VER)
52573 #pragma warning(push,ELC_WARNING_LEVEL)
52574 #pragma warning(disable:4099)//class与struct混用警告diss
52575 #pragma warning(disable:4584)//重复子类警告diss
52576 #pragma warning(disable:4250)//域控制继承警告diss
52577 #pragma warning(disable:26432)//不完全默认方法警告diss
52578 #pragma warning(disable:26435)//virtual override方法警告diss
52579 #pragma warning(disable:26481)//容器安利diss
52580 #pragma warning(disable:26446)//gsl::at安利diss
52581 #pragma warning(disable:26434)//方法覆盖警告diss
52582 #pragma warning(disable:26429)//gsl::not_null安利diss
52583 #pragma warning(disable:26471)//对void*进行static_cast安利diss
52584 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
52585 #pragma warning(disable:26473)//相同指针显式cast警告diss
52586 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
52587 #pragma warning(disable:26485)//数组作指针警告diss
52588 #pragma warning(disable:26490)//reinterpret_cast警告diss
52589 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
52590 #pragma warning(disable:26482)//非常数数组索引警告diss
52591 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
52592#endif
52593#if defined(__GNUC__)
52594 #pragma GCC diagnostic push
52595 #pragma GCC diagnostic warning "-Wall"//开启所有警告
52596 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
52597#endif
52598#if defined(_MSC_VER)
52599 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
52600 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
52601 #define push_msvc_warning() __pragma(warning(push))
52602 #define pop_msvc_warning() __pragma(warning(pop))
52603 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
52604#else
52605 //#define suppress_msvc_warning(...)
52606 #define disable_msvc_warning(...)
52607 #define push_msvc_warning()
52608 #define pop_msvc_warning()
52609 #define push_and_disable_msvc_warning(...)
52610#endif
52611#if defined(_MSC_VER)
52612 //push pack settings
52613 #pragma pack(push)
52614 #pragma pack()
52615#endif
52616#if defined(_MSC_VER)
52617 //push and undef common macros
52618 #pragma push_macro("new")
52619 #undef new
52620 #pragma push_macro("delete")
52621 #undef delete
52622 #pragma push_macro("min")
52623 #undef min
52624 #pragma push_macro("max")
52625 #undef max
52626 #pragma push_macro("abs")
52627 #undef abs
52628 #pragma push_macro("export")
52629 #undef export
52630 #pragma push_macro("rand")
52631 #undef rand
52632 #pragma push_macro("sqrt")
52633 #undef sqrt
52634 #pragma push_macro("type_info")
52635 #undef type_info
52636 #pragma push_macro("elc")
52637 #undef elc
52638#endif
52639//
52640#if defined(ELC_VOID_NAME)
52641 #undef void
52642#endif
52643//
52644#if defined(ELC_PUBLIC_ALL)
52645 #define protected public
52646 #define private public
52647#endif
52648//
52649#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
52650 #undef rand
52651#endif
52652
52653// #define often_noexcept
52654#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
52655#define noexcept_as_auto MAGIC//哦现在有了
52656#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
52657#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
52658
52659#define using_method_from_base_t(name,...) \
52660template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
52661auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
52662{\
52663 return base_t::name(forward<Args>(rest)...);\
52664}\
52665
52666#define using_method_from_value(name,value_name,...) \
52667template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
52668auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
52669{\
52670 return value_name.name(forward<Args>(rest)...);\
52671}\
52672
52673#define floop while(__builtin_is_my_dick_still_there())
52674#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
52675#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
52676#if defined(_MSC_VER) && _MSC_VER>=1935
52677 //@see https://developercommunity.visualstudio.com/t/10193638
52678 #define enable_adl(name) template<typename=void>void name()noexcept=delete
52679#else
52680 #define enable_adl(name) void name()noexcept=delete
52681#endif
52682
52683#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
52684#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
52685
52686#define declvalue(...) (::std::declval<__VA_ARGS__>())
52687
52689#define template_error(reason) static_assert(template_error_helper<T>,reason)
52691#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
52693#define template_warning(reason) template_warning_helper<T>(reason)
52694
52695//for type_info
52696#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
52697#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
52698
52699#define is_common_attribute(name) public attribute<T,name<T>>
52700#define is_special_attribute(name) public attribute<T,name>
52701
52702#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
52703#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
52704
52705//for float_size_t
52706#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
52707//bitnum_of
52708#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
52709
52710//for attribute
52711#define def_common_attribute_with_nothing(name) \
52712template<typename T>\
52713class name{}\
52714
52715#define def_special_attribute_with_nothing(name) \
52716class name{}\
52717
52718#define common_attribute_t template<class>class
52719#define special_attribute_t class
52720
52729#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
52731#define enabled_by_default class enable_state=void
52733#define disabled_by_default class enable_state= ::std::enable_if_t<false>
52735#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
52737#define enable_flag class enable_state
52738
52739#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
52740#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
52741#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
52742#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
52743#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
52744
52746#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
52748#define get_recursive_λ_caller(name,...) \
52749exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
52750 return name(name,Args...);\
52751}
52753#define λ []
52755#define exλ [&]
52757#define λ_with_catch(...) [__VA_ARGS__]
52759#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
52760//recursive_λ_self_referential_reserved_symbolname
52761#define λ_RLSRRS _my_jb_super_sb_name_
52762
52763#if defined(_MSC_VER) && !defined(__clang__)
52764 #define λ_inline [[msvc::forceinline]]
52765 #define λ_force_inline [[msvc::forceinline]]
52766#elif
52767 #define λ_inline [[gnu::always_inline]]
52768 #define λ_force_inline [[gnu::always_inline]]
52769#else
52770 #define λ_inline
52771 #define λ_force_inline
52772#endif
52773
52774#define MAGIC//ahh,ko no tenno da!
52775
52777#define nothing
52778
52780#define elseif else if
52782#define _big_than_ >
52784#define _small_than_ <
52785
52786#if defined(_MSC_VER)
52787 #define not !
52788 #define and &&
52789 #define or ||
52790#endif
52791
52793#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
52795#define BREAK_NAMESPACE }
52796
52798#define template_name template
52800#define type_name class
52801
52802#if defined(DEBUG) || defined(_DEBUG)
52803 #define not_in_debug 0
52804 #define in_debug 1
52805#else
52806 #define not_in_debug 1
52807 #define in_debug 0
52808#endif
52809
52810#define es U""
52811#define ec(ch) U ## ch
52812
52813#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
52814 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
52815#else
52816 #define ELC_TEST_EVENTNAME(name)
52817#endif
52818
52819#define override_instance_struct \
52820protected:\
52821 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
52822 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
52823 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
52824 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
52825 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
52826
52827#if defined(_MSC_VER) && !defined(__clang__)
52828 #define distinctive __declspec(dllexport)
52829#else
52830 #define distinctive
52831#endif
52832
52833#if defined(_MSC_VER) && !defined(__clang__)
52834 #define force_inline __forceinline
52835#elif defined(__GNUC__) || defined(__clang__)
52836 #define force_inline __attribute__((always_inline)) inline
52837#else
52838 #define force_inline inline
52839#endif
52840
52841#if defined(_MSC_VER) && !defined(__clang__)
52842 #define with_no_vtable __declspec(novtable)
52843#else
52844 #define with_no_vtable
52845#endif
52846
52847#define in_consteval (::std::is_constant_evaluated())
52848
52849#define no_vtable_struct struct with_no_vtable
52850#define no_vtable_class class with_no_vtable
52851
52852//#define get_elc_defs using namespace ::elc::defs
52853
52854//file_end
52855
52856#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
52857
52858//file_end
52859
52860 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_body.hpp"
52861
52862 namespace stream_n{
52863 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/memory_stream.hpp"
52864//memory_stream.hpp
52865//at namespace elc::defs
52866/*
52867未完成的elc解释器memory_stream文件
52868由steve02081504与Alex0125设计、编写
52869转载时请在不对此文件做任何修改的同时注明出处
52870项目地址:https://github.com/ELC-lang/ELC
52871*/
52872/*
52873 ,??????????????????????????
52874 ????????????????????????????
52875 ?????????????????????????????+
52876 ?????+++++++++++++++++++++++++
52877 ?????+++++++++++++++++++++++++
52878 ??????++++++++++++++++++++++++
52879 ?????++
52880 ?????+++
52881 ??????+++IIIIIIIIIIIIIIIIII
52882 ?????+++++IIIIIIIIIIIIIIIIII
52883 ?????++++++++++++++++++++++++
52884 ??????+++++++++++++++++++++++:
52885 ?????++
52886 ?????+++
52887 ??????++
52888 ??????????????????????????????II
52889 ??????????????????????????????IIII
52890 ,?????????????????????????????IIIII+
52891 =???++++++++++++++++++++++++++III?
52892 ?++++++++++++++++++++++++++++I+
52893*/
52895 constexpr size_t buf_size=pow(10,BIT_POSSIBILITY);
52896 byte* _m;
52897 size_t _s;
52898 size_t _pos;
52899 memory_stream()noexcept{
52900 _m = get<byte>[buf_size]();
52901 _pos = 0;
52902 _s = 0;
52903 }
52905 unget(_m);
52906 }
52907 [[nodiscard]]size_t bufsize()const noexcept{
52908 return get_size_of_get(_m);
52909 }
52910 virtual void* seek(seek_type st,int_t offsize)noexcept override{
52911 switch(st){
52912 case beg:
52913 _pos = 0;
52914 return _m;
52915 case cur:
52916 _pos += (ptrdiff_t)offsize;
52917 return _m + _pos;
52918 case end:
52919 _pos = _s;
52920 return _m+_pos;
52921 default:
52922 return nullptr;
52923 }
52924 }
52925 virtual void seek_to(void*p)noexcept override{
52926 _pos = ((byte*)p)-_m;
52927 }
52928 virtual void sync()noexcept override{
52929 //do nothing
52930 }
52931 virtual void flush()noexcept override{
52932 //do nothing
52933 }
52934 virtual void close()noexcept override{
52935 unget(_m);
52936 _m = nullptr;
52937 _s = 0;
52938 }
52939 virtual void write(const byte*buf,size_t size)noexcept override{
52940 if(size>this->bufsize()-_pos)
52941 get_resize(_m,get_next_gold_size_to_resize_for_array(_pos+size));
52942 ::std::memcpy(_m+_pos,buf,size);
52943 _pos += size;
52944 _s = max(_pos,_s);
52945 }
52946 virtual size_t read(byte*buf,size_t size)noexcept override{
52947 if(_pos+size>_s)
52948 size = _s-_pos;
52949 ::std::memcpy(buf,_m+_pos,size);
52950 _pos += size;
52951 return size;
52952 }
52953};
52954
52955//file_end
52956
52957 #line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_body.hpp"
52958 }
52959
52960 #if defined(ELC_TEST_ON)
52961 namespace memory_stream_part_test{
52962 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_test.hpp"
52963//_test.hpp
52964/*
52965未完成的elc解释器memory_stream文件
52966由steve02081504与Alex0125设计、编写
52967转载时请在不对此文件做任何修改的同时注明出处
52968项目地址:https://github.com/ELC-lang/ELC
52969*/
52970/*
52971 ,??????????????????????????
52972 ????????????????????????????
52973 ?????????????????????????????+
52974 ?????+++++++++++++++++++++++++
52975 ?????+++++++++++++++++++++++++
52976 ??????++++++++++++++++++++++++
52977 ?????++
52978 ?????+++
52979 ??????+++IIIIIIIIIIIIIIIIII
52980 ?????+++++IIIIIIIIIIIIIIIIII
52981 ?????++++++++++++++++++++++++
52982 ??????+++++++++++++++++++++++:
52983 ?????++
52984 ?????+++
52985 ??????++
52986 ??????????????????????????????II
52987 ??????????????????????????????IIII
52988 ,?????????????????????????????IIIII+
52989 =???++++++++++++++++++++++++++III?
52990 ?++++++++++++++++++++++++++++I+
52991*/
52992inline void test(){
52993 ELC_TEST_EVENTNAME("memory_stream部分测试");
52994}
52995inline void test_log_out(){
52996}
52997inline void test_end(){
52998}
52999
53000//file_end
53001
53002 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_body.hpp"
53003 }
53004 #endif
53005
53006 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
53007//_undefs.hpp
53008/*
53009未完成的elc解释器basic文件
53010由steve02081504与Alex0125设计、编写
53011转载时请在不对此文件做任何修改的同时注明出处
53012项目地址:https://github.com/ELC-lang/ELC
53013*/
53014/*
53015 ,??????????????????????????
53016 ????????????????????????????
53017 ?????????????????????????????+
53018 ?????+++++++++++++++++++++++++
53019 ?????+++++++++++++++++++++++++
53020 ??????++++++++++++++++++++++++
53021 ?????++
53022 ?????+++
53023 ??????+++IIIIIIIIIIIIIIIIII
53024 ?????+++++IIIIIIIIIIIIIIIIII
53025 ?????++++++++++++++++++++++++
53026 ??????+++++++++++++++++++++++:
53027 ?????++
53028 ?????+++
53029 ??????++
53030 ??????????????????????????????II
53031 ??????????????????????????????IIII
53032 ,?????????????????????????????IIIII+
53033 =???++++++++++++++++++++++++++III?
53034 ?++++++++++++++++++++++++++++I+
53035*/
53036#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
53037//_undefs.hpp
53038/*
53039未完成的elc解释器_share文件
53040由steve02081504与Alex0125设计、编写
53041转载时请在不对此文件做任何修改的同时注明出处
53042项目地址:https://github.com/ELC-lang/ELC
53043*/
53044/*
53045 ,??????????????????????????
53046 ????????????????????????????
53047 ?????????????????????????????+
53048 ?????+++++++++++++++++++++++++
53049 ?????+++++++++++++++++++++++++
53050 ??????++++++++++++++++++++++++
53051 ?????++
53052 ?????+++
53053 ??????+++IIIIIIIIIIIIIIIIII
53054 ?????+++++IIIIIIIIIIIIIIIIII
53055 ?????++++++++++++++++++++++++
53056 ??????+++++++++++++++++++++++:
53057 ?????++
53058 ?????+++
53059 ??????++
53060 ??????????????????????????????II
53061 ??????????????????????????????IIII
53062 ,?????????????????????????????IIIII+
53063 =???++++++++++++++++++++++++++III?
53064 ?++++++++++++++++++++++++++++I+
53065*/
53066
53067//defs at "_defs.hpp"
53068
53069#if defined(_MSC_VER)
53070 #pragma warning(pop)
53071#endif
53072//#undef suppress_msvc_warning
53073#undef disable_msvc_warning
53074#undef push_msvc_warning
53075#undef pop_msvc_warning
53076#undef push_and_disable_msvc_warning
53077#if defined(_MSC_VER)
53078 #pragma pack(pop)
53079#endif
53080#if defined(__GNUC__)
53081 #pragma GCC diagnostic pop
53082#endif
53083#if defined(_MSC_VER)
53084 #pragma pop_macro("new")
53085 #pragma pop_macro("delete")
53086 #pragma pop_macro("min")
53087 #pragma pop_macro("max")
53088 #pragma pop_macro("abs")
53089 #pragma pop_macro("export")
53090 #pragma pop_macro("rand")
53091 #pragma pop_macro("sqrt")
53092 #pragma pop_macro("type_info")
53093 #pragma pop_macro("elc")
53094#endif
53095
53096//
53097#if defined(ELC_VOID_NAME)
53098 #define void the_void
53099#endif
53100//
53101#if defined(ELC_PUBLIC_ALL)
53102 #undef protected
53103 #undef private
53104#endif
53105//
53106#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
53107 #define rand the_rand
53108#endif
53109
53110// #undef often_noexcept
53111#undef noexcept_as
53112#undef noexcept_as_auto
53113#undef constexpr_as
53114#undef constexpr_as_auto
53115
53116#undef using_method_from_base_t
53117#undef using_method_from_value
53118
53119#undef floop
53120#undef times
53121#undef debug_times
53122#undef enable_adl
53123
53124#undef re_declvalue
53125#undef re_decltype
53126
53127#undef declvalue
53128
53129#undef template_error
53130#undef template_error_of_type
53131#undef template_warning
53132
53133#undef type_info_of
53134#undef type_name_of
53135
53136#undef is_common_attribute
53137#undef is_special_attribute
53138
53139#undef has_attribute
53140#undef not_has_attribute
53141
53142#undef float_size_of
53143#undef bitnum_of
53144
53145#undef def_common_attribute_with_nothing
53146#undef def_special_attribute_with_nothing
53147
53148#undef common_attribute_t
53149#undef special_attribute_t
53150
53151#undef enable_if
53152#undef enabled_by_default
53153#undef disabled_by_default
53154#undef enable_if_not_ill_form
53155#undef enable_flag
53156
53157#undef was_an_ill_form
53158#undef was_an_ill_form_with_parameter
53159#undef was_not_an_ill_form
53160#undef was_not_an_ill_form_and_noexcept
53161#undef was_not_an_ill_form_with_parameter
53162
53163#undef recursive_λ
53164#undef get_recursive_λ_caller
53165#undef λ
53166#undef exλ
53167#undef λ_with_catch
53168#undef self_recursion
53169#undef λ_RLSRRS
53170#undef λ_inline
53171#undef λ_force_inline
53172
53173#undef MAGIC
53174
53175#undef nothing
53176
53177#undef elseif
53178#undef _big_than_
53179#undef _small_than_
53180
53181#if defined(_MSC_VER)
53182 #undef not
53183 #undef and
53184 #undef or
53185#endif
53186
53187#undef INTER_NAMESPACE
53188#undef BREAK_NAMESPACE
53189
53190#undef szie
53191#undef form
53192
53193#undef template_name
53194#undef type_name
53195
53196#undef not_in_debug
53197
53198#undef es
53199#undef ec
53200
53201#undef ELC_TEST_EVENTNAME
53202
53203#undef override_instance_struct
53204
53205#undef distinctive
53206
53207#undef force_inline
53208
53209#undef with_no_vtable
53210
53211#undef in_consteval
53212
53213#undef no_vtable_struct
53214#undef no_vtable_class
53215
53216//#undef get_elc_defs
53217
53218//file_end
53219
53220#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
53221
53222//file_end
53223
53224 #line 47 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_body.hpp"
53225}
53226namespace elc{
53227 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_export.hpp"
53228//_export.hpp
53229//at namespace elc
53230/*
53231未完成的elc解释器memory_stream文件
53232由steve02081504与Alex0125设计、编写
53233转载时请在不对此文件做任何修改的同时注明出处
53234项目地址:https://github.com/ELC-lang/ELC
53235*/
53236/*
53237 ,??????????????????????????
53238 ????????????????????????????
53239 ?????????????????????????????+
53240 ?????+++++++++++++++++++++++++
53241 ?????+++++++++++++++++++++++++
53242 ??????++++++++++++++++++++++++
53243 ?????++
53244 ?????+++
53245 ??????+++IIIIIIIIIIIIIIIIII
53246 ?????+++++IIIIIIIIIIIIIIIIII
53247 ?????++++++++++++++++++++++++
53248 ??????+++++++++++++++++++++++:
53249 ?????++
53250 ?????+++
53251 ??????++
53252 ??????????????????????????????II
53253 ??????????????????????????????IIII
53254 ,?????????????????????????????IIIII+
53255 =???++++++++++++++++++++++++++III?
53256 ?++++++++++++++++++++++++++++I+
53257*/
53258#define export using defs::
53259export memory_stream;
53260#undef export
53261
53262//file_end
53263
53264 #line 50 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/memory_stream/_body.hpp"
53265}
53266
53267//file_end
53268
53269 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/memory_stream"
53270#endif
53271
53272//file_end
53273
53274 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
53275 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/namespace"
53276//namespace
53277//at namespace ::
53278/*@
53279未完成的elc解释器include文件
53280由steve02081504与Alex0125设计、编写
53281转载时请在不对此文件做任何修改的同时注明出处
53282项目地址:https://github.com/ELC-lang/ELC
53283*/
53284/*
53285 ,??????????????????????????
53286 ????????????????????????????
53287 ?????????????????????????????+
53288 ?????+++++++++++++++++++++++++
53289 ?????+++++++++++++++++++++++++
53290 ??????++++++++++++++++++++++++
53291 ?????++
53292 ?????+++
53293 ??????+++IIIIIIIIIIIIIIIIII
53294 ?????+++++IIIIIIIIIIIIIIIIII
53295 ?????++++++++++++++++++++++++
53296 ??????+++++++++++++++++++++++:
53297 ?????++
53298 ?????+++
53299 ??????++
53300 ??????????????????????????????II
53301 ??????????????????????????????IIII
53302 ,?????????????????????????????IIIII+
53303 =???++++++++++++++++++++++++++III?
53304 ?++++++++++++++++++++++++++++I+
53305*/
53306#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
53307//pre_checks.hpp
53308/*
53309未完成的elc解释器_share文件
53310由steve02081504与Alex0125设计、编写
53311转载时请在不对此文件做任何修改的同时注明出处
53312项目地址:https://github.com/ELC-lang/ELC
53313*/
53314/*
53315 ,??????????????????????????
53316 ????????????????????????????
53317 ?????????????????????????????+
53318 ?????+++++++++++++++++++++++++
53319 ?????+++++++++++++++++++++++++
53320 ??????++++++++++++++++++++++++
53321 ?????++
53322 ?????+++
53323 ??????+++IIIIIIIIIIIIIIIIII
53324 ?????+++++IIIIIIIIIIIIIIIIII
53325 ?????++++++++++++++++++++++++
53326 ??????+++++++++++++++++++++++:
53327 ?????++
53328 ?????+++
53329 ??????++
53330 ??????????????????????????????II
53331 ??????????????????????????????IIII
53332 ,?????????????????????????????IIIII+
53333 =???++++++++++++++++++++++++++III?
53334 ?++++++++++++++++++++++++++++I+
53335*/
53336//__cplusplus needs 20+
53337#if !defined(__cplusplus)||__cplusplus<202002L
53338 //if msvc, check _MSVC_LANG
53339 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
53340 //ok
53341 #else
53342 #error "elc files needs c++20 or higher"
53343 #endif
53344#endif
53345
53346//check if the compiler is msvc
53347#if defined(_MSC_VER)
53348 //check if _CPPRTTI
53349 #if !defined(_CPPRTTI)
53350 #error "elc files needs rtti"
53351 #endif
53352 //check _MSC_VER at last 1932
53353 #if _MSC_VER<1932
53354 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
53355 #endif
53356#endif
53357
53358//file_end
53359
53360#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/namespace"
53361#if !defined(ELC_NAMESPACE)
53362 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
53363//core
53364//at namespace ::
53365/*@
53366未完成的elc解释器include文件
53367由steve02081504与Alex0125设计、编写
53368转载时请在不对此文件做任何修改的同时注明出处
53369项目地址:https://github.com/ELC-lang/ELC
53370*/
53371/*
53372 ,??????????????????????????
53373 ????????????????????????????
53374 ?????????????????????????????+
53375 ?????+++++++++++++++++++++++++
53376 ?????+++++++++++++++++++++++++
53377 ??????++++++++++++++++++++++++
53378 ?????++
53379 ?????+++
53380 ??????+++IIIIIIIIIIIIIIIIII
53381 ?????+++++IIIIIIIIIIIIIIIIII
53382 ?????++++++++++++++++++++++++
53383 ??????+++++++++++++++++++++++:
53384 ?????++
53385 ?????+++
53386 ??????++
53387 ??????????????????????????????II
53388 ??????????????????????????????IIII
53389 ,?????????????????????????????IIIII+
53390 =???++++++++++++++++++++++++++III?
53391 ?++++++++++++++++++++++++++++I+
53392*/
53393#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
53394//pre_checks.hpp
53395/*
53396未完成的elc解释器_share文件
53397由steve02081504与Alex0125设计、编写
53398转载时请在不对此文件做任何修改的同时注明出处
53399项目地址:https://github.com/ELC-lang/ELC
53400*/
53401/*
53402 ,??????????????????????????
53403 ????????????????????????????
53404 ?????????????????????????????+
53405 ?????+++++++++++++++++++++++++
53406 ?????+++++++++++++++++++++++++
53407 ??????++++++++++++++++++++++++
53408 ?????++
53409 ?????+++
53410 ??????+++IIIIIIIIIIIIIIIIII
53411 ?????+++++IIIIIIIIIIIIIIIIII
53412 ?????++++++++++++++++++++++++
53413 ??????+++++++++++++++++++++++:
53414 ?????++
53415 ?????+++
53416 ??????++
53417 ??????????????????????????????II
53418 ??????????????????????????????IIII
53419 ,?????????????????????????????IIIII+
53420 =???++++++++++++++++++++++++++III?
53421 ?++++++++++++++++++++++++++++I+
53422*/
53423//__cplusplus needs 20+
53424#if !defined(__cplusplus)||__cplusplus<202002L
53425 //if msvc, check _MSVC_LANG
53426 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
53427 //ok
53428 #else
53429 #error "elc files needs c++20 or higher"
53430 #endif
53431#endif
53432
53433//check if the compiler is msvc
53434#if defined(_MSC_VER)
53435 //check if _CPPRTTI
53436 #if !defined(_CPPRTTI)
53437 #error "elc files needs rtti"
53438 #endif
53439 //check _MSC_VER at last 1932
53440 #if _MSC_VER<1932
53441 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
53442 #endif
53443#endif
53444
53445//file_end
53446
53447#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
53448#line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
53449
53450//file_end
53451
53452 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/namespace"
53453 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
53454//string
53455//at namespace ::
53456/*@
53457未完成的elc解释器include文件
53458由steve02081504与Alex0125设计、编写
53459转载时请在不对此文件做任何修改的同时注明出处
53460项目地址:https://github.com/ELC-lang/ELC
53461*/
53462/*
53463 ,??????????????????????????
53464 ????????????????????????????
53465 ?????????????????????????????+
53466 ?????+++++++++++++++++++++++++
53467 ?????+++++++++++++++++++++++++
53468 ??????++++++++++++++++++++++++
53469 ?????++
53470 ?????+++
53471 ??????+++IIIIIIIIIIIIIIIIII
53472 ?????+++++IIIIIIIIIIIIIIIIII
53473 ?????++++++++++++++++++++++++
53474 ??????+++++++++++++++++++++++:
53475 ?????++
53476 ?????+++
53477 ??????++
53478 ??????????????????????????????II
53479 ??????????????????????????????IIII
53480 ,?????????????????????????????IIIII+
53481 =???++++++++++++++++++++++++++III?
53482 ?++++++++++++++++++++++++++++I+
53483*/
53484#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
53485//pre_checks.hpp
53486/*
53487未完成的elc解释器_share文件
53488由steve02081504与Alex0125设计、编写
53489转载时请在不对此文件做任何修改的同时注明出处
53490项目地址:https://github.com/ELC-lang/ELC
53491*/
53492/*
53493 ,??????????????????????????
53494 ????????????????????????????
53495 ?????????????????????????????+
53496 ?????+++++++++++++++++++++++++
53497 ?????+++++++++++++++++++++++++
53498 ??????++++++++++++++++++++++++
53499 ?????++
53500 ?????+++
53501 ??????+++IIIIIIIIIIIIIIIIII
53502 ?????+++++IIIIIIIIIIIIIIIIII
53503 ?????++++++++++++++++++++++++
53504 ??????+++++++++++++++++++++++:
53505 ?????++
53506 ?????+++
53507 ??????++
53508 ??????????????????????????????II
53509 ??????????????????????????????IIII
53510 ,?????????????????????????????IIIII+
53511 =???++++++++++++++++++++++++++III?
53512 ?++++++++++++++++++++++++++++I+
53513*/
53514//__cplusplus needs 20+
53515#if !defined(__cplusplus)||__cplusplus<202002L
53516 //if msvc, check _MSVC_LANG
53517 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
53518 //ok
53519 #else
53520 #error "elc files needs c++20 or higher"
53521 #endif
53522#endif
53523
53524//check if the compiler is msvc
53525#if defined(_MSC_VER)
53526 //check if _CPPRTTI
53527 #if !defined(_CPPRTTI)
53528 #error "elc files needs rtti"
53529 #endif
53530 //check _MSC_VER at last 1932
53531 #if _MSC_VER<1932
53532 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
53533 #endif
53534#endif
53535
53536//file_end
53537
53538#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
53539#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
53540
53541//file_end
53542
53543 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/namespace"
53544 #define ELC_NAMESPACE
53545 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_body.hpp"
53546//_body.hpp
53547//at namespace ::
53548/*
53549未完成的elc解释器namespace文件
53550由steve02081504与Alex0125设计、编写
53551转载时请在不对此文件做任何修改的同时注明出处
53552项目地址:https://github.com/ELC-lang/ELC
53553*/
53554/*
53555 ,??????????????????????????
53556 ????????????????????????????
53557 ?????????????????????????????+
53558 ?????+++++++++++++++++++++++++
53559 ?????+++++++++++++++++++++++++
53560 ??????++++++++++++++++++++++++
53561 ?????++
53562 ?????+++
53563 ??????+++IIIIIIIIIIIIIIIIII
53564 ?????+++++IIIIIIIIIIIIIIIIII
53565 ?????++++++++++++++++++++++++
53566 ??????+++++++++++++++++++++++:
53567 ?????++
53568 ?????+++
53569 ??????++
53570 ??????????????????????????????II
53571 ??????????????????????????????IIII
53572 ,?????????????????????????????IIIII+
53573 =???++++++++++++++++++++++++++III?
53574 ?++++++++++++++++++++++++++++I+
53575*/
53576#if defined(ELC_TEST)
53577 #error "this part cannot be tested."
53578#endif
53579namespace elc::defs{
53580 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
53581//_defs.hpp
53582/*
53583未完成的elc解释器basic文件
53584由steve02081504与Alex0125设计、编写
53585转载时请在不对此文件做任何修改的同时注明出处
53586项目地址:https://github.com/ELC-lang/ELC
53587*/
53588/*
53589 ,??????????????????????????
53590 ????????????????????????????
53591 ?????????????????????????????+
53592 ?????+++++++++++++++++++++++++
53593 ?????+++++++++++++++++++++++++
53594 ??????++++++++++++++++++++++++
53595 ?????++
53596 ?????+++
53597 ??????+++IIIIIIIIIIIIIIIIII
53598 ?????+++++IIIIIIIIIIIIIIIIII
53599 ?????++++++++++++++++++++++++
53600 ??????+++++++++++++++++++++++:
53601 ?????++
53602 ?????+++
53603 ??????++
53604 ??????????????????????????????II
53605 ??????????????????????????????IIII
53606 ,?????????????????????????????IIIII+
53607 =???++++++++++++++++++++++++++III?
53608 ?++++++++++++++++++++++++++++I+
53609*/
53610#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
53611//_defs.hpp
53612/*
53613未完成的elc解释器_share文件
53614由steve02081504与Alex0125设计、编写
53615转载时请在不对此文件做任何修改的同时注明出处
53616项目地址:https://github.com/ELC-lang/ELC
53617*/
53618/*
53619 ,??????????????????????????
53620 ????????????????????????????
53621 ?????????????????????????????+
53622 ?????+++++++++++++++++++++++++
53623 ?????+++++++++++++++++++++++++
53624 ??????++++++++++++++++++++++++
53625 ?????++
53626 ?????+++
53627 ??????+++IIIIIIIIIIIIIIIIII
53628 ?????+++++IIIIIIIIIIIIIIIIII
53629 ?????++++++++++++++++++++++++
53630 ??????+++++++++++++++++++++++:
53631 ?????++
53632 ?????+++
53633 ??????++
53634 ??????????????????????????????II
53635 ??????????????????????????????IIII
53636 ,?????????????????????????????IIIII+
53637 =???++++++++++++++++++++++++++III?
53638 ?++++++++++++++++++++++++++++I+
53639*/
53640
53641//undefs at "_undefs.hpp"
53642
53643#if defined(ELC_CODE_REALM)
53644 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
53645#endif
53646
53647//set ELC_WARNING_LEVEL default to 4(max)
53648#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
53649
53650#if defined(_MSC_VER)
53651 #pragma warning(push,ELC_WARNING_LEVEL)
53652 #pragma warning(disable:4099)//class与struct混用警告diss
53653 #pragma warning(disable:4584)//重复子类警告diss
53654 #pragma warning(disable:4250)//域控制继承警告diss
53655 #pragma warning(disable:26432)//不完全默认方法警告diss
53656 #pragma warning(disable:26435)//virtual override方法警告diss
53657 #pragma warning(disable:26481)//容器安利diss
53658 #pragma warning(disable:26446)//gsl::at安利diss
53659 #pragma warning(disable:26434)//方法覆盖警告diss
53660 #pragma warning(disable:26429)//gsl::not_null安利diss
53661 #pragma warning(disable:26471)//对void*进行static_cast安利diss
53662 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
53663 #pragma warning(disable:26473)//相同指针显式cast警告diss
53664 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
53665 #pragma warning(disable:26485)//数组作指针警告diss
53666 #pragma warning(disable:26490)//reinterpret_cast警告diss
53667 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
53668 #pragma warning(disable:26482)//非常数数组索引警告diss
53669 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
53670#endif
53671#if defined(__GNUC__)
53672 #pragma GCC diagnostic push
53673 #pragma GCC diagnostic warning "-Wall"//开启所有警告
53674 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
53675#endif
53676#if defined(_MSC_VER)
53677 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
53678 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
53679 #define push_msvc_warning() __pragma(warning(push))
53680 #define pop_msvc_warning() __pragma(warning(pop))
53681 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
53682#else
53683 //#define suppress_msvc_warning(...)
53684 #define disable_msvc_warning(...)
53685 #define push_msvc_warning()
53686 #define pop_msvc_warning()
53687 #define push_and_disable_msvc_warning(...)
53688#endif
53689#if defined(_MSC_VER)
53690 //push pack settings
53691 #pragma pack(push)
53692 #pragma pack()
53693#endif
53694#if defined(_MSC_VER)
53695 //push and undef common macros
53696 #pragma push_macro("new")
53697 #undef new
53698 #pragma push_macro("delete")
53699 #undef delete
53700 #pragma push_macro("min")
53701 #undef min
53702 #pragma push_macro("max")
53703 #undef max
53704 #pragma push_macro("abs")
53705 #undef abs
53706 #pragma push_macro("export")
53707 #undef export
53708 #pragma push_macro("rand")
53709 #undef rand
53710 #pragma push_macro("sqrt")
53711 #undef sqrt
53712 #pragma push_macro("type_info")
53713 #undef type_info
53714 #pragma push_macro("elc")
53715 #undef elc
53716#endif
53717//
53718#if defined(ELC_VOID_NAME)
53719 #undef void
53720#endif
53721//
53722#if defined(ELC_PUBLIC_ALL)
53723 #define protected public
53724 #define private public
53725#endif
53726//
53727#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
53728 #undef rand
53729#endif
53730
53731// #define often_noexcept
53732#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
53733#define noexcept_as_auto MAGIC//哦现在有了
53734#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
53735#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
53736
53737#define using_method_from_base_t(name,...) \
53738template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
53739auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
53740{\
53741 return base_t::name(forward<Args>(rest)...);\
53742}\
53743
53744#define using_method_from_value(name,value_name,...) \
53745template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
53746auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
53747{\
53748 return value_name.name(forward<Args>(rest)...);\
53749}\
53750
53751#define floop while(__builtin_is_my_dick_still_there())
53752#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
53753#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
53754#if defined(_MSC_VER) && _MSC_VER>=1935
53755 //@see https://developercommunity.visualstudio.com/t/10193638
53756 #define enable_adl(name) template<typename=void>void name()noexcept=delete
53757#else
53758 #define enable_adl(name) void name()noexcept=delete
53759#endif
53760
53761#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
53762#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
53763
53764#define declvalue(...) (::std::declval<__VA_ARGS__>())
53765
53767#define template_error(reason) static_assert(template_error_helper<T>,reason)
53769#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
53771#define template_warning(reason) template_warning_helper<T>(reason)
53772
53773//for type_info
53774#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
53775#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
53776
53777#define is_common_attribute(name) public attribute<T,name<T>>
53778#define is_special_attribute(name) public attribute<T,name>
53779
53780#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
53781#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
53782
53783//for float_size_t
53784#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
53785//bitnum_of
53786#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
53787
53788//for attribute
53789#define def_common_attribute_with_nothing(name) \
53790template<typename T>\
53791class name{}\
53792
53793#define def_special_attribute_with_nothing(name) \
53794class name{}\
53795
53796#define common_attribute_t template<class>class
53797#define special_attribute_t class
53798
53807#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
53809#define enabled_by_default class enable_state=void
53811#define disabled_by_default class enable_state= ::std::enable_if_t<false>
53813#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
53815#define enable_flag class enable_state
53816
53817#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
53818#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
53819#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
53820#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
53821#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
53822
53824#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
53826#define get_recursive_λ_caller(name,...) \
53827exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
53828 return name(name,Args...);\
53829}
53831#define λ []
53833#define exλ [&]
53835#define λ_with_catch(...) [__VA_ARGS__]
53837#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
53838//recursive_λ_self_referential_reserved_symbolname
53839#define λ_RLSRRS _my_jb_super_sb_name_
53840
53841#if defined(_MSC_VER) && !defined(__clang__)
53842 #define λ_inline [[msvc::forceinline]]
53843 #define λ_force_inline [[msvc::forceinline]]
53844#elif
53845 #define λ_inline [[gnu::always_inline]]
53846 #define λ_force_inline [[gnu::always_inline]]
53847#else
53848 #define λ_inline
53849 #define λ_force_inline
53850#endif
53851
53852#define MAGIC//ahh,ko no tenno da!
53853
53855#define nothing
53856
53858#define elseif else if
53860#define _big_than_ >
53862#define _small_than_ <
53863
53864#if defined(_MSC_VER)
53865 #define not !
53866 #define and &&
53867 #define or ||
53868#endif
53869
53871#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
53873#define BREAK_NAMESPACE }
53874
53876#define template_name template
53878#define type_name class
53879
53880#if defined(DEBUG) || defined(_DEBUG)
53881 #define not_in_debug 0
53882 #define in_debug 1
53883#else
53884 #define not_in_debug 1
53885 #define in_debug 0
53886#endif
53887
53888#define es U""
53889#define ec(ch) U ## ch
53890
53891#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
53892 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
53893#else
53894 #define ELC_TEST_EVENTNAME(name)
53895#endif
53896
53897#define override_instance_struct \
53898protected:\
53899 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
53900 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
53901 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
53902 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
53903 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
53904
53905#if defined(_MSC_VER) && !defined(__clang__)
53906 #define distinctive __declspec(dllexport)
53907#else
53908 #define distinctive
53909#endif
53910
53911#if defined(_MSC_VER) && !defined(__clang__)
53912 #define force_inline __forceinline
53913#elif defined(__GNUC__) || defined(__clang__)
53914 #define force_inline __attribute__((always_inline)) inline
53915#else
53916 #define force_inline inline
53917#endif
53918
53919#if defined(_MSC_VER) && !defined(__clang__)
53920 #define with_no_vtable __declspec(novtable)
53921#else
53922 #define with_no_vtable
53923#endif
53924
53925#define in_consteval (::std::is_constant_evaluated())
53926
53927#define no_vtable_struct struct with_no_vtable
53928#define no_vtable_class class with_no_vtable
53929
53930//#define get_elc_defs using namespace ::elc::defs
53931
53932//file_end
53933
53934#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
53935
53936//file_end
53937
53938 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_body.hpp"
53939
53940 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/defs.hpp"
53941//defs.hpp
53942/*
53943未完成的elc解释器namespace文件
53944由steve02081504与Alex0125设计、编写
53945转载时请在不对此文件做任何修改的同时注明出处
53946项目地址:https://github.com/ELC-lang/ELC
53947*/
53948/*
53949 ,??????????????????????????
53950 ????????????????????????????
53951 ?????????????????????????????+
53952 ?????+++++++++++++++++++++++++
53953 ?????+++++++++++++++++++++++++
53954 ??????++++++++++++++++++++++++
53955 ?????++
53956 ?????+++
53957 ??????+++IIIIIIIIIIIIIIIIII
53958 ?????+++++IIIIIIIIIIIIIIIIII
53959 ?????++++++++++++++++++++++++
53960 ??????+++++++++++++++++++++++:
53961 ?????++
53962 ?????+++
53963 ??????++
53964 ??????????????????????????????II
53965 ??????????????????????????????IIII
53966 ,?????????????????????????????IIIII+
53967 =???++++++++++++++++++++++++++III?
53968 ?++++++++++++++++++++++++++++I+
53969*/
53970namespace core{
53971 template<>
53972 distinctive inline map_t<ptr,string> long_term_binary_node_storager<string>{};
53973}
53974namespace namespace_n{
53978 value get_symbol_type_map(ptr thenamespace){
53979 return (*thenamespace)[es".symbol_type_map"];
53980 }
53981 namespace_t()noexcept{
53982 _namespace_root = get<common_node>();
53983 auto&nmsp = *_namespace_root;
53984 _namespace_now = &nmsp;
53985 push_and_disable_msvc_warning(26447);//may throw警告diss
53986 nmsp[es".."] = the_void;
53987 nmsp[es"."] = nmsp;
53988 nmsp[es"t"] = t;
53989 nmsp[es"nil"] = nil;
53990 nmsp[es"void"] = the_void;
53991 value nmsptm = get_symbol_type_map(&nmsp);
53992 nmsptm = get<common_node>();
53993 nmsptm[es"void"] = es"void";
53995 }
53996 ptr get_symbol_namespace(const value index){
53997 ptr namespace_now_p = _namespace_now;
53998 while(namespace_now_p && !(*namespace_now_p)[index] && !get_symbol_type_map(namespace_now_p)[index])
53999 namespace_now_p = (*namespace_now_p)[es".."];
54000 return namespace_now_p;
54001 }
54002 ptr get_symbol_namespace(auto&& index){ return get_symbol_namespace(as_value(index)); }
54003 bool has_symbol(const value index){
54004 auto nmsp=get_symbol_namespace(index);
54005 if((*nmsp)[index] || get_symbol_type_map(nmsp)[index])
54006 return true;
54007 return false;
54008 }
54009 bool has_symbol(auto&& index){ return has_symbol(as_value(index)); }
54010 value get_symbol(const value index){
54011 return (*get_symbol_namespace(index))[index];
54012 }
54013 value get_symbol(auto&& index){ return get_symbol(as_value(index)); }
54014 value get_symbol_type(const value index){
54015 return get_symbol_type_map(get_symbol_namespace(index))[index];
54016 }
54017 value get_symbol_type(auto&& index){ return get_symbol_type(as_value(index)); }
54018
54019 void inter_namespace(const value namespace_name){
54020 _namespace_now = get_symbol(namespace_name);
54021 }
54022 void inter_namespace(auto&& index){ inter_namespace(as_value(index)); }
54023
54024 void leave_namespace(){ inter_namespace(es".."); }
54025 }names{};
54026}
54027
54028//file_end
54029
54030 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_body.hpp"
54031
54032 #if defined(ELC_TEST_ON)
54033 namespace namespace_part_test{
54034 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_test.hpp"
54035//_test.hpp
54036/*
54037未完成的elc解释器namespace文件
54038由steve02081504与Alex0125设计、编写
54039转载时请在不对此文件做任何修改的同时注明出处
54040项目地址:https://github.com/ELC-lang/ELC
54041*/
54042/*
54043 ,??????????????????????????
54044 ????????????????????????????
54045 ?????????????????????????????+
54046 ?????+++++++++++++++++++++++++
54047 ?????+++++++++++++++++++++++++
54048 ??????++++++++++++++++++++++++
54049 ?????++
54050 ?????+++
54051 ??????+++IIIIIIIIIIIIIIIIII
54052 ?????+++++IIIIIIIIIIIIIIIIII
54053 ?????++++++++++++++++++++++++
54054 ??????+++++++++++++++++++++++:
54055 ?????++
54056 ?????+++
54057 ??????++
54058 ??????????????????????????????II
54059 ??????????????????????????????IIII
54060 ,?????????????????????????????IIIII+
54061 =???++++++++++++++++++++++++++III?
54062 ?++++++++++++++++++++++++++++I+
54063*/
54064inline void test(){
54065 ELC_TEST_EVENTNAME("namespace部分测试");
54066}
54067inline void test_log_out(){
54068}
54069inline void test_end{
54070}
54071
54072//file_end
54073
54074 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_body.hpp"
54075 }
54076 #endif
54077
54078 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
54079//_undefs.hpp
54080/*
54081未完成的elc解释器basic文件
54082由steve02081504与Alex0125设计、编写
54083转载时请在不对此文件做任何修改的同时注明出处
54084项目地址:https://github.com/ELC-lang/ELC
54085*/
54086/*
54087 ,??????????????????????????
54088 ????????????????????????????
54089 ?????????????????????????????+
54090 ?????+++++++++++++++++++++++++
54091 ?????+++++++++++++++++++++++++
54092 ??????++++++++++++++++++++++++
54093 ?????++
54094 ?????+++
54095 ??????+++IIIIIIIIIIIIIIIIII
54096 ?????+++++IIIIIIIIIIIIIIIIII
54097 ?????++++++++++++++++++++++++
54098 ??????+++++++++++++++++++++++:
54099 ?????++
54100 ?????+++
54101 ??????++
54102 ??????????????????????????????II
54103 ??????????????????????????????IIII
54104 ,?????????????????????????????IIIII+
54105 =???++++++++++++++++++++++++++III?
54106 ?++++++++++++++++++++++++++++I+
54107*/
54108#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
54109//_undefs.hpp
54110/*
54111未完成的elc解释器_share文件
54112由steve02081504与Alex0125设计、编写
54113转载时请在不对此文件做任何修改的同时注明出处
54114项目地址:https://github.com/ELC-lang/ELC
54115*/
54116/*
54117 ,??????????????????????????
54118 ????????????????????????????
54119 ?????????????????????????????+
54120 ?????+++++++++++++++++++++++++
54121 ?????+++++++++++++++++++++++++
54122 ??????++++++++++++++++++++++++
54123 ?????++
54124 ?????+++
54125 ??????+++IIIIIIIIIIIIIIIIII
54126 ?????+++++IIIIIIIIIIIIIIIIII
54127 ?????++++++++++++++++++++++++
54128 ??????+++++++++++++++++++++++:
54129 ?????++
54130 ?????+++
54131 ??????++
54132 ??????????????????????????????II
54133 ??????????????????????????????IIII
54134 ,?????????????????????????????IIIII+
54135 =???++++++++++++++++++++++++++III?
54136 ?++++++++++++++++++++++++++++I+
54137*/
54138
54139//defs at "_defs.hpp"
54140
54141#if defined(_MSC_VER)
54142 #pragma warning(pop)
54143#endif
54144//#undef suppress_msvc_warning
54145#undef disable_msvc_warning
54146#undef push_msvc_warning
54147#undef pop_msvc_warning
54148#undef push_and_disable_msvc_warning
54149#if defined(_MSC_VER)
54150 #pragma pack(pop)
54151#endif
54152#if defined(__GNUC__)
54153 #pragma GCC diagnostic pop
54154#endif
54155#if defined(_MSC_VER)
54156 #pragma pop_macro("new")
54157 #pragma pop_macro("delete")
54158 #pragma pop_macro("min")
54159 #pragma pop_macro("max")
54160 #pragma pop_macro("abs")
54161 #pragma pop_macro("export")
54162 #pragma pop_macro("rand")
54163 #pragma pop_macro("sqrt")
54164 #pragma pop_macro("type_info")
54165 #pragma pop_macro("elc")
54166#endif
54167
54168//
54169#if defined(ELC_VOID_NAME)
54170 #define void the_void
54171#endif
54172//
54173#if defined(ELC_PUBLIC_ALL)
54174 #undef protected
54175 #undef private
54176#endif
54177//
54178#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
54179 #define rand the_rand
54180#endif
54181
54182// #undef often_noexcept
54183#undef noexcept_as
54184#undef noexcept_as_auto
54185#undef constexpr_as
54186#undef constexpr_as_auto
54187
54188#undef using_method_from_base_t
54189#undef using_method_from_value
54190
54191#undef floop
54192#undef times
54193#undef debug_times
54194#undef enable_adl
54195
54196#undef re_declvalue
54197#undef re_decltype
54198
54199#undef declvalue
54200
54201#undef template_error
54202#undef template_error_of_type
54203#undef template_warning
54204
54205#undef type_info_of
54206#undef type_name_of
54207
54208#undef is_common_attribute
54209#undef is_special_attribute
54210
54211#undef has_attribute
54212#undef not_has_attribute
54213
54214#undef float_size_of
54215#undef bitnum_of
54216
54217#undef def_common_attribute_with_nothing
54218#undef def_special_attribute_with_nothing
54219
54220#undef common_attribute_t
54221#undef special_attribute_t
54222
54223#undef enable_if
54224#undef enabled_by_default
54225#undef disabled_by_default
54226#undef enable_if_not_ill_form
54227#undef enable_flag
54228
54229#undef was_an_ill_form
54230#undef was_an_ill_form_with_parameter
54231#undef was_not_an_ill_form
54232#undef was_not_an_ill_form_and_noexcept
54233#undef was_not_an_ill_form_with_parameter
54234
54235#undef recursive_λ
54236#undef get_recursive_λ_caller
54237#undef λ
54238#undef exλ
54239#undef λ_with_catch
54240#undef self_recursion
54241#undef λ_RLSRRS
54242#undef λ_inline
54243#undef λ_force_inline
54244
54245#undef MAGIC
54246
54247#undef nothing
54248
54249#undef elseif
54250#undef _big_than_
54251#undef _small_than_
54252
54253#if defined(_MSC_VER)
54254 #undef not
54255 #undef and
54256 #undef or
54257#endif
54258
54259#undef INTER_NAMESPACE
54260#undef BREAK_NAMESPACE
54261
54262#undef szie
54263#undef form
54264
54265#undef template_name
54266#undef type_name
54267
54268#undef not_in_debug
54269
54270#undef es
54271#undef ec
54272
54273#undef ELC_TEST_EVENTNAME
54274
54275#undef override_instance_struct
54276
54277#undef distinctive
54278
54279#undef force_inline
54280
54281#undef with_no_vtable
54282
54283#undef in_consteval
54284
54285#undef no_vtable_struct
54286#undef no_vtable_class
54287
54288//#undef get_elc_defs
54289
54290//file_end
54291
54292#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
54293
54294//file_end
54295
54296 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_body.hpp"
54297}
54298namespace elc{
54299 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_export.hpp"
54300//_export.hpp
54301//at namespace elc
54302/*
54303未完成的elc解释器namespace文件
54304由steve02081504与Alex0125设计、编写
54305转载时请在不对此文件做任何修改的同时注明出处
54306项目地址:https://github.com/ELC-lang/ELC
54307*/
54308/*
54309 ,??????????????????????????
54310 ????????????????????????????
54311 ?????????????????????????????+
54312 ?????+++++++++++++++++++++++++
54313 ?????+++++++++++++++++++++++++
54314 ??????++++++++++++++++++++++++
54315 ?????++
54316 ?????+++
54317 ??????+++IIIIIIIIIIIIIIIIII
54318 ?????+++++IIIIIIIIIIIIIIIIII
54319 ?????++++++++++++++++++++++++
54320 ??????+++++++++++++++++++++++:
54321 ?????++
54322 ?????+++
54323 ??????++
54324 ??????????????????????????????II
54325 ??????????????????????????????IIII
54326 ,?????????????????????????????IIIII+
54327 =???++++++++++++++++++++++++++III?
54328 ?++++++++++++++++++++++++++++I+
54329*/
54330#define export using defs::
54331export namespace_n::names;
54332#undef export
54333
54334//file_end
54335
54336 #line 48 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/namespace/_body.hpp"
54337}
54338
54339//file_end
54340
54341 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/namespace"
54342#endif
54343
54344//file_end
54345
54346 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
54347 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
54348//numerical_representation
54349//at namespace ::
54350/*@
54351未完成的elc解释器include文件
54352由steve02081504与Alex0125设计、编写
54353转载时请在不对此文件做任何修改的同时注明出处
54354项目地址:https://github.com/ELC-lang/ELC
54355*/
54356/*
54357 ,??????????????????????????
54358 ????????????????????????????
54359 ?????????????????????????????+
54360 ?????+++++++++++++++++++++++++
54361 ?????+++++++++++++++++++++++++
54362 ??????++++++++++++++++++++++++
54363 ?????++
54364 ?????+++
54365 ??????+++IIIIIIIIIIIIIIIIII
54366 ?????+++++IIIIIIIIIIIIIIIIII
54367 ?????++++++++++++++++++++++++
54368 ??????+++++++++++++++++++++++:
54369 ?????++
54370 ?????+++
54371 ??????++
54372 ??????????????????????????????II
54373 ??????????????????????????????IIII
54374 ,?????????????????????????????IIIII+
54375 =???++++++++++++++++++++++++++III?
54376 ?++++++++++++++++++++++++++++I+
54377*/
54378#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
54379//pre_checks.hpp
54380/*
54381未完成的elc解释器_share文件
54382由steve02081504与Alex0125设计、编写
54383转载时请在不对此文件做任何修改的同时注明出处
54384项目地址:https://github.com/ELC-lang/ELC
54385*/
54386/*
54387 ,??????????????????????????
54388 ????????????????????????????
54389 ?????????????????????????????+
54390 ?????+++++++++++++++++++++++++
54391 ?????+++++++++++++++++++++++++
54392 ??????++++++++++++++++++++++++
54393 ?????++
54394 ?????+++
54395 ??????+++IIIIIIIIIIIIIIIIII
54396 ?????+++++IIIIIIIIIIIIIIIIII
54397 ?????++++++++++++++++++++++++
54398 ??????+++++++++++++++++++++++:
54399 ?????++
54400 ?????+++
54401 ??????++
54402 ??????????????????????????????II
54403 ??????????????????????????????IIII
54404 ,?????????????????????????????IIIII+
54405 =???++++++++++++++++++++++++++III?
54406 ?++++++++++++++++++++++++++++I+
54407*/
54408//__cplusplus needs 20+
54409#if !defined(__cplusplus)||__cplusplus<202002L
54410 //if msvc, check _MSVC_LANG
54411 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
54412 //ok
54413 #else
54414 #error "elc files needs c++20 or higher"
54415 #endif
54416#endif
54417
54418//check if the compiler is msvc
54419#if defined(_MSC_VER)
54420 //check if _CPPRTTI
54421 #if !defined(_CPPRTTI)
54422 #error "elc files needs rtti"
54423 #endif
54424 //check _MSC_VER at last 1932
54425 #if _MSC_VER<1932
54426 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
54427 #endif
54428#endif
54429
54430//file_end
54431
54432#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
54433#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
54434
54435//file_end
54436
54437 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
54438 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/package_symbol_loader"
54439//lib_loader
54440//at namespace ::
54441/*@
54442未完成的elc解释器include文件
54443由steve02081504与Alex0125设计、编写
54444转载时请在不对此文件做任何修改的同时注明出处
54445项目地址:https://github.com/ELC-lang/ELC
54446*/
54447/*
54448 ,??????????????????????????
54449 ????????????????????????????
54450 ?????????????????????????????+
54451 ?????+++++++++++++++++++++++++
54452 ?????+++++++++++++++++++++++++
54453 ??????++++++++++++++++++++++++
54454 ?????++
54455 ?????+++
54456 ??????+++IIIIIIIIIIIIIIIIII
54457 ?????+++++IIIIIIIIIIIIIIIIII
54458 ?????++++++++++++++++++++++++
54459 ??????+++++++++++++++++++++++:
54460 ?????++
54461 ?????+++
54462 ??????++
54463 ??????????????????????????????II
54464 ??????????????????????????????IIII
54465 ,?????????????????????????????IIIII+
54466 =???++++++++++++++++++++++++++III?
54467 ?++++++++++++++++++++++++++++I+
54468*/
54469#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
54470//pre_checks.hpp
54471/*
54472未完成的elc解释器_share文件
54473由steve02081504与Alex0125设计、编写
54474转载时请在不对此文件做任何修改的同时注明出处
54475项目地址:https://github.com/ELC-lang/ELC
54476*/
54477/*
54478 ,??????????????????????????
54479 ????????????????????????????
54480 ?????????????????????????????+
54481 ?????+++++++++++++++++++++++++
54482 ?????+++++++++++++++++++++++++
54483 ??????++++++++++++++++++++++++
54484 ?????++
54485 ?????+++
54486 ??????+++IIIIIIIIIIIIIIIIII
54487 ?????+++++IIIIIIIIIIIIIIIIII
54488 ?????++++++++++++++++++++++++
54489 ??????+++++++++++++++++++++++:
54490 ?????++
54491 ?????+++
54492 ??????++
54493 ??????????????????????????????II
54494 ??????????????????????????????IIII
54495 ,?????????????????????????????IIIII+
54496 =???++++++++++++++++++++++++++III?
54497 ?++++++++++++++++++++++++++++I+
54498*/
54499//__cplusplus needs 20+
54500#if !defined(__cplusplus)||__cplusplus<202002L
54501 //if msvc, check _MSVC_LANG
54502 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
54503 //ok
54504 #else
54505 #error "elc files needs c++20 or higher"
54506 #endif
54507#endif
54508
54509//check if the compiler is msvc
54510#if defined(_MSC_VER)
54511 //check if _CPPRTTI
54512 #if !defined(_CPPRTTI)
54513 #error "elc files needs rtti"
54514 #endif
54515 //check _MSC_VER at last 1932
54516 #if _MSC_VER<1932
54517 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
54518 #endif
54519#endif
54520
54521//file_end
54522
54523#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/package_symbol_loader"
54524#if !defined(ELC_PACKAGE_SYMBOL_LOADER)
54525 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
54526//core
54527//at namespace ::
54528/*@
54529未完成的elc解释器include文件
54530由steve02081504与Alex0125设计、编写
54531转载时请在不对此文件做任何修改的同时注明出处
54532项目地址:https://github.com/ELC-lang/ELC
54533*/
54534/*
54535 ,??????????????????????????
54536 ????????????????????????????
54537 ?????????????????????????????+
54538 ?????+++++++++++++++++++++++++
54539 ?????+++++++++++++++++++++++++
54540 ??????++++++++++++++++++++++++
54541 ?????++
54542 ?????+++
54543 ??????+++IIIIIIIIIIIIIIIIII
54544 ?????+++++IIIIIIIIIIIIIIIIII
54545 ?????++++++++++++++++++++++++
54546 ??????+++++++++++++++++++++++:
54547 ?????++
54548 ?????+++
54549 ??????++
54550 ??????????????????????????????II
54551 ??????????????????????????????IIII
54552 ,?????????????????????????????IIIII+
54553 =???++++++++++++++++++++++++++III?
54554 ?++++++++++++++++++++++++++++I+
54555*/
54556#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
54557//pre_checks.hpp
54558/*
54559未完成的elc解释器_share文件
54560由steve02081504与Alex0125设计、编写
54561转载时请在不对此文件做任何修改的同时注明出处
54562项目地址:https://github.com/ELC-lang/ELC
54563*/
54564/*
54565 ,??????????????????????????
54566 ????????????????????????????
54567 ?????????????????????????????+
54568 ?????+++++++++++++++++++++++++
54569 ?????+++++++++++++++++++++++++
54570 ??????++++++++++++++++++++++++
54571 ?????++
54572 ?????+++
54573 ??????+++IIIIIIIIIIIIIIIIII
54574 ?????+++++IIIIIIIIIIIIIIIIII
54575 ?????++++++++++++++++++++++++
54576 ??????+++++++++++++++++++++++:
54577 ?????++
54578 ?????+++
54579 ??????++
54580 ??????????????????????????????II
54581 ??????????????????????????????IIII
54582 ,?????????????????????????????IIIII+
54583 =???++++++++++++++++++++++++++III?
54584 ?++++++++++++++++++++++++++++I+
54585*/
54586//__cplusplus needs 20+
54587#if !defined(__cplusplus)||__cplusplus<202002L
54588 //if msvc, check _MSVC_LANG
54589 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
54590 //ok
54591 #else
54592 #error "elc files needs c++20 or higher"
54593 #endif
54594#endif
54595
54596//check if the compiler is msvc
54597#if defined(_MSC_VER)
54598 //check if _CPPRTTI
54599 #if !defined(_CPPRTTI)
54600 #error "elc files needs rtti"
54601 #endif
54602 //check _MSC_VER at last 1932
54603 #if _MSC_VER<1932
54604 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
54605 #endif
54606#endif
54607
54608//file_end
54609
54610#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
54611#line 38 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/core"
54612
54613//file_end
54614
54615 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/package_symbol_loader"
54616 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
54617//string
54618//at namespace ::
54619/*@
54620未完成的elc解释器include文件
54621由steve02081504与Alex0125设计、编写
54622转载时请在不对此文件做任何修改的同时注明出处
54623项目地址:https://github.com/ELC-lang/ELC
54624*/
54625/*
54626 ,??????????????????????????
54627 ????????????????????????????
54628 ?????????????????????????????+
54629 ?????+++++++++++++++++++++++++
54630 ?????+++++++++++++++++++++++++
54631 ??????++++++++++++++++++++++++
54632 ?????++
54633 ?????+++
54634 ??????+++IIIIIIIIIIIIIIIIII
54635 ?????+++++IIIIIIIIIIIIIIIIII
54636 ?????++++++++++++++++++++++++
54637 ??????+++++++++++++++++++++++:
54638 ?????++
54639 ?????+++
54640 ??????++
54641 ??????????????????????????????II
54642 ??????????????????????????????IIII
54643 ,?????????????????????????????IIIII+
54644 =???++++++++++++++++++++++++++III?
54645 ?++++++++++++++++++++++++++++I+
54646*/
54647#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
54648//pre_checks.hpp
54649/*
54650未完成的elc解释器_share文件
54651由steve02081504与Alex0125设计、编写
54652转载时请在不对此文件做任何修改的同时注明出处
54653项目地址:https://github.com/ELC-lang/ELC
54654*/
54655/*
54656 ,??????????????????????????
54657 ????????????????????????????
54658 ?????????????????????????????+
54659 ?????+++++++++++++++++++++++++
54660 ?????+++++++++++++++++++++++++
54661 ??????++++++++++++++++++++++++
54662 ?????++
54663 ?????+++
54664 ??????+++IIIIIIIIIIIIIIIIII
54665 ?????+++++IIIIIIIIIIIIIIIIII
54666 ?????++++++++++++++++++++++++
54667 ??????+++++++++++++++++++++++:
54668 ?????++
54669 ?????+++
54670 ??????++
54671 ??????????????????????????????II
54672 ??????????????????????????????IIII
54673 ,?????????????????????????????IIIII+
54674 =???++++++++++++++++++++++++++III?
54675 ?++++++++++++++++++++++++++++I+
54676*/
54677//__cplusplus needs 20+
54678#if !defined(__cplusplus)||__cplusplus<202002L
54679 //if msvc, check _MSVC_LANG
54680 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
54681 //ok
54682 #else
54683 #error "elc files needs c++20 or higher"
54684 #endif
54685#endif
54686
54687//check if the compiler is msvc
54688#if defined(_MSC_VER)
54689 //check if _CPPRTTI
54690 #if !defined(_CPPRTTI)
54691 #error "elc files needs rtti"
54692 #endif
54693 //check _MSC_VER at last 1932
54694 #if _MSC_VER<1932
54695 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
54696 #endif
54697#endif
54698
54699//file_end
54700
54701#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
54702#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
54703
54704//file_end
54705
54706 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/package_symbol_loader"
54707 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
54708//lib_loader
54709//at namespace ::
54710/*@
54711未完成的elc解释器include文件
54712由steve02081504与Alex0125设计、编写
54713转载时请在不对此文件做任何修改的同时注明出处
54714项目地址:https://github.com/ELC-lang/ELC
54715*/
54716/*
54717 ,??????????????????????????
54718 ????????????????????????????
54719 ?????????????????????????????+
54720 ?????+++++++++++++++++++++++++
54721 ?????+++++++++++++++++++++++++
54722 ??????++++++++++++++++++++++++
54723 ?????++
54724 ?????+++
54725 ??????+++IIIIIIIIIIIIIIIIII
54726 ?????+++++IIIIIIIIIIIIIIIIII
54727 ?????++++++++++++++++++++++++
54728 ??????+++++++++++++++++++++++:
54729 ?????++
54730 ?????+++
54731 ??????++
54732 ??????????????????????????????II
54733 ??????????????????????????????IIII
54734 ,?????????????????????????????IIIII+
54735 =???++++++++++++++++++++++++++III?
54736 ?++++++++++++++++++++++++++++I+
54737*/
54738#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
54739//pre_checks.hpp
54740/*
54741未完成的elc解释器_share文件
54742由steve02081504与Alex0125设计、编写
54743转载时请在不对此文件做任何修改的同时注明出处
54744项目地址:https://github.com/ELC-lang/ELC
54745*/
54746/*
54747 ,??????????????????????????
54748 ????????????????????????????
54749 ?????????????????????????????+
54750 ?????+++++++++++++++++++++++++
54751 ?????+++++++++++++++++++++++++
54752 ??????++++++++++++++++++++++++
54753 ?????++
54754 ?????+++
54755 ??????+++IIIIIIIIIIIIIIIIII
54756 ?????+++++IIIIIIIIIIIIIIIIII
54757 ?????++++++++++++++++++++++++
54758 ??????+++++++++++++++++++++++:
54759 ?????++
54760 ?????+++
54761 ??????++
54762 ??????????????????????????????II
54763 ??????????????????????????????IIII
54764 ,?????????????????????????????IIIII+
54765 =???++++++++++++++++++++++++++III?
54766 ?++++++++++++++++++++++++++++I+
54767*/
54768//__cplusplus needs 20+
54769#if !defined(__cplusplus)||__cplusplus<202002L
54770 //if msvc, check _MSVC_LANG
54771 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
54772 //ok
54773 #else
54774 #error "elc files needs c++20 or higher"
54775 #endif
54776#endif
54777
54778//check if the compiler is msvc
54779#if defined(_MSC_VER)
54780 //check if _CPPRTTI
54781 #if !defined(_CPPRTTI)
54782 #error "elc files needs rtti"
54783 #endif
54784 //check _MSC_VER at last 1932
54785 #if _MSC_VER<1932
54786 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
54787 #endif
54788#endif
54789
54790//file_end
54791
54792#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
54793#line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/lib_loader"
54794
54795//file_end
54796
54797 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/package_symbol_loader"
54798 #define ELC_PACKAGE_SYMBOL_LOADER
54799 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
54800//_body.hpp
54801//at namespace ::
54802/*
54803未完成的elc解释器template文件
54804由steve02081504与Alex0125设计、编写
54805转载时请在不对此文件做任何修改的同时注明出处
54806项目地址:https://github.com/ELC-lang/ELC
54807*/
54808/*
54809 ,??????????????????????????
54810 ????????????????????????????
54811 ?????????????????????????????+
54812 ?????+++++++++++++++++++++++++
54813 ?????+++++++++++++++++++++++++
54814 ??????++++++++++++++++++++++++
54815 ?????++
54816 ?????+++
54817 ??????+++IIIIIIIIIIIIIIIIII
54818 ?????+++++IIIIIIIIIIIIIIIIII
54819 ?????++++++++++++++++++++++++
54820 ??????+++++++++++++++++++++++:
54821 ?????++
54822 ?????+++
54823 ??????++
54824 ??????????????????????????????II
54825 ??????????????????????????????IIII
54826 ,?????????????????????????????IIIII+
54827 =???++++++++++++++++++++++++++III?
54828 ?++++++++++++++++++++++++++++I+
54829*/
54830#if defined(ELC_TEST)
54831 #error "this part cannot be tested."
54832#endif
54833//include locale:自然语言相关的字符串
54834//strings
54835#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
54836//using.hpp
54837/*
54838未完成的elc解释器_share文件
54839由steve02081504与Alex0125设计、编写
54840转载时请在不对此文件做任何修改的同时注明出处
54841项目地址:https://github.com/ELC-lang/ELC
54842*/
54843/*
54844 ,??????????????????????????
54845 ????????????????????????????
54846 ?????????????????????????????+
54847 ?????+++++++++++++++++++++++++
54848 ?????+++++++++++++++++++++++++
54849 ??????++++++++++++++++++++++++
54850 ?????++
54851 ?????+++
54852 ??????+++IIIIIIIIIIIIIIIIII
54853 ?????+++++IIIIIIIIIIIIIIIIII
54854 ?????++++++++++++++++++++++++
54855 ??????+++++++++++++++++++++++:
54856 ?????++
54857 ?????+++
54858 ??????++
54859 ??????????????????????????????II
54860 ??????????????????????????????IIII
54861 ,?????????????????????????????IIIII+
54862 =???++++++++++++++++++++++++++III?
54863 ?++++++++++++++++++++++++++++I+
54864*/
54865/*
54866locale说明
54867elc使用的字符串.
54868调整这些,实现快速本地化.
54869*/
54870#line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/locale/using.hpp"
54871
54872//file_end
54873
54874#line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
54875//include paths:获取package_symbol_loader的实际位置
54876//package_symbol_loader_path
54877#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
54878//paths.hpp
54879/*
54880未完成的elc解释器_share文件
54881由steve02081504与Alex0125设计、编写
54882转载时请在不对此文件做任何修改的同时注明出处
54883项目地址:https://github.com/ELC-lang/ELC
54884*/
54885/*
54886 ,??????????????????????????
54887 ????????????????????????????
54888 ?????????????????????????????+
54889 ?????+++++++++++++++++++++++++
54890 ?????+++++++++++++++++++++++++
54891 ??????++++++++++++++++++++++++
54892 ?????++
54893 ?????+++
54894 ??????+++IIIIIIIIIIIIIIIIII
54895 ?????+++++IIIIIIIIIIIIIIIIII
54896 ?????++++++++++++++++++++++++
54897 ??????+++++++++++++++++++++++:
54898 ?????++
54899 ?????+++
54900 ??????++
54901 ??????????????????????????????II
54902 ??????????????????????????????IIII
54903 ,?????????????????????????????IIIII+
54904 =???++++++++++++++++++++++++++III?
54905 ?++++++++++++++++++++++++++++I+
54906*/
54907#if !defined(ELC_PATHS)
54908 #define ELC_PATHS
54909 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
54910//base_defs
54911//at namespace ::
54912/*@
54913未完成的elc解释器include文件
54914由steve02081504与Alex0125设计、编写
54915转载时请在不对此文件做任何修改的同时注明出处
54916项目地址:https://github.com/ELC-lang/ELC
54917*/
54918/*
54919 ,??????????????????????????
54920 ????????????????????????????
54921 ?????????????????????????????+
54922 ?????+++++++++++++++++++++++++
54923 ?????+++++++++++++++++++++++++
54924 ??????++++++++++++++++++++++++
54925 ?????++
54926 ?????+++
54927 ??????+++IIIIIIIIIIIIIIIIII
54928 ?????+++++IIIIIIIIIIIIIIIIII
54929 ?????++++++++++++++++++++++++
54930 ??????+++++++++++++++++++++++:
54931 ?????++
54932 ?????+++
54933 ??????++
54934 ??????????????????????????????II
54935 ??????????????????????????????IIII
54936 ,?????????????????????????????IIIII+
54937 =???++++++++++++++++++++++++++III?
54938 ?++++++++++++++++++++++++++++I+
54939*/
54940#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
54941//pre_checks.hpp
54942/*
54943未完成的elc解释器_share文件
54944由steve02081504与Alex0125设计、编写
54945转载时请在不对此文件做任何修改的同时注明出处
54946项目地址:https://github.com/ELC-lang/ELC
54947*/
54948/*
54949 ,??????????????????????????
54950 ????????????????????????????
54951 ?????????????????????????????+
54952 ?????+++++++++++++++++++++++++
54953 ?????+++++++++++++++++++++++++
54954 ??????++++++++++++++++++++++++
54955 ?????++
54956 ?????+++
54957 ??????+++IIIIIIIIIIIIIIIIII
54958 ?????+++++IIIIIIIIIIIIIIIIII
54959 ?????++++++++++++++++++++++++
54960 ??????+++++++++++++++++++++++:
54961 ?????++
54962 ?????+++
54963 ??????++
54964 ??????????????????????????????II
54965 ??????????????????????????????IIII
54966 ,?????????????????????????????IIIII+
54967 =???++++++++++++++++++++++++++III?
54968 ?++++++++++++++++++++++++++++I+
54969*/
54970//__cplusplus needs 20+
54971#if !defined(__cplusplus)||__cplusplus<202002L
54972 //if msvc, check _MSVC_LANG
54973 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
54974 //ok
54975 #else
54976 #error "elc files needs c++20 or higher"
54977 #endif
54978#endif
54979
54980//check if the compiler is msvc
54981#if defined(_MSC_VER)
54982 //check if _CPPRTTI
54983 #if !defined(_CPPRTTI)
54984 #error "elc files needs rtti"
54985 #endif
54986 //check _MSC_VER at last 1932
54987 #if _MSC_VER<1932
54988 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
54989 #endif
54990#endif
54991
54992//file_end
54993
54994#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
54995#line 57 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_defs"
54996
54997//file_end
54998
54999 #line 32 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55000 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
55001//string
55002//at namespace ::
55003/*@
55004未完成的elc解释器include文件
55005由steve02081504与Alex0125设计、编写
55006转载时请在不对此文件做任何修改的同时注明出处
55007项目地址:https://github.com/ELC-lang/ELC
55008*/
55009/*
55010 ,??????????????????????????
55011 ????????????????????????????
55012 ?????????????????????????????+
55013 ?????+++++++++++++++++++++++++
55014 ?????+++++++++++++++++++++++++
55015 ??????++++++++++++++++++++++++
55016 ?????++
55017 ?????+++
55018 ??????+++IIIIIIIIIIIIIIIIII
55019 ?????+++++IIIIIIIIIIIIIIIIII
55020 ?????++++++++++++++++++++++++
55021 ??????+++++++++++++++++++++++:
55022 ?????++
55023 ?????+++
55024 ??????++
55025 ??????????????????????????????II
55026 ??????????????????????????????IIII
55027 ,?????????????????????????????IIIII+
55028 =???++++++++++++++++++++++++++III?
55029 ?++++++++++++++++++++++++++++I+
55030*/
55031#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
55032//pre_checks.hpp
55033/*
55034未完成的elc解释器_share文件
55035由steve02081504与Alex0125设计、编写
55036转载时请在不对此文件做任何修改的同时注明出处
55037项目地址:https://github.com/ELC-lang/ELC
55038*/
55039/*
55040 ,??????????????????????????
55041 ????????????????????????????
55042 ?????????????????????????????+
55043 ?????+++++++++++++++++++++++++
55044 ?????+++++++++++++++++++++++++
55045 ??????++++++++++++++++++++++++
55046 ?????++
55047 ?????+++
55048 ??????+++IIIIIIIIIIIIIIIIII
55049 ?????+++++IIIIIIIIIIIIIIIIII
55050 ?????++++++++++++++++++++++++
55051 ??????+++++++++++++++++++++++:
55052 ?????++
55053 ?????+++
55054 ??????++
55055 ??????????????????????????????II
55056 ??????????????????????????????IIII
55057 ,?????????????????????????????IIIII+
55058 =???++++++++++++++++++++++++++III?
55059 ?++++++++++++++++++++++++++++I+
55060*/
55061//__cplusplus needs 20+
55062#if !defined(__cplusplus)||__cplusplus<202002L
55063 //if msvc, check _MSVC_LANG
55064 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
55065 //ok
55066 #else
55067 #error "elc files needs c++20 or higher"
55068 #endif
55069#endif
55070
55071//check if the compiler is msvc
55072#if defined(_MSC_VER)
55073 //check if _CPPRTTI
55074 #if !defined(_CPPRTTI)
55075 #error "elc files needs rtti"
55076 #endif
55077 //check _MSC_VER at last 1932
55078 #if _MSC_VER<1932
55079 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
55080 #endif
55081#endif
55082
55083//file_end
55084
55085#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
55086#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
55087
55088//file_end
55089
55090 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55091 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
55092//str_code_convert.hpp
55093/*
55094未完成的elc解释器_share文件
55095由steve02081504与Alex0125设计、编写
55096转载时请在不对此文件做任何修改的同时注明出处
55097项目地址:https://github.com/ELC-lang/ELC
55098*/
55099/*
55100 ,??????????????????????????
55101 ????????????????????????????
55102 ?????????????????????????????+
55103 ?????+++++++++++++++++++++++++
55104 ?????+++++++++++++++++++++++++
55105 ??????++++++++++++++++++++++++
55106 ?????++
55107 ?????+++
55108 ??????+++IIIIIIIIIIIIIIIIII
55109 ?????+++++IIIIIIIIIIIIIIIIII
55110 ?????++++++++++++++++++++++++
55111 ??????+++++++++++++++++++++++:
55112 ?????++
55113 ?????+++
55114 ??????++
55115 ??????????????????????????????II
55116 ??????????????????????????????IIII
55117 ,?????????????????????????????IIIII+
55118 =???++++++++++++++++++++++++++III?
55119 ?++++++++++++++++++++++++++++I+
55120*/
55121/*
55122APIs说明
55123elc依赖的基础函数.
55124调整这些,实现快速移植,快速优化与行为自定义.
55125*/
55126#line 84 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/str_code_convert.hpp"
55127
55128//file_end
55129
55130 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55131 //
55132 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/decl_system_type.hpp"
55133//decl_system_type.hpp
55134/*
55135未完成的elc解释器_share文件
55136由steve02081504与Alex0125设计、编写
55137转载时请在不对此文件做任何修改的同时注明出处
55138项目地址:https://github.com/ELC-lang/ELC
55139*/
55140/*
55141 ,??????????????????????????
55142 ????????????????????????????
55143 ?????????????????????????????+
55144 ?????+++++++++++++++++++++++++
55145 ?????+++++++++++++++++++++++++
55146 ??????++++++++++++++++++++++++
55147 ?????++
55148 ?????+++
55149 ??????+++IIIIIIIIIIIIIIIIII
55150 ?????+++++IIIIIIIIIIIIIIIIII
55151 ?????++++++++++++++++++++++++
55152 ??????+++++++++++++++++++++++:
55153 ?????++
55154 ?????+++
55155 ??????++
55156 ??????????????????????????????II
55157 ??????????????????????????????IIII
55158 ,?????????????????????????????IIIII+
55159 =???++++++++++++++++++++++++++III?
55160 ?++++++++++++++++++++++++++++I+
55161*/
55162//copy&rewrite from steve02081504/steve.h
55163#define linux 2
55164#define windows 3
55165#define other 4
55166#if defined(__linux)||defined(__linux__)||defined(__gnu_linux__)
55167 #define SYSTEM_TYPE linux
55168#elif defined(_WIN32)||defined(__MINGW32__)||defined(__CYGWIN__)
55169 #define SYSTEM_TYPE windows
55170#else
55171 #define SYSTEM_TYPE other
55172#endif
55173#define ERROR_MSG_UNABLE_OS "Unable OS,edit this file on your own or contact ELC's producers."
55174
55175//file_end
55176
55177 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55178 //
55179 #if SYSTEM_TYPE == windows
55180 #include <shlobj_core.h>
55181 #elif SYSTEM_TYPE == linux
55182 #include <unistd.h>
55183 #else
55184 #include <cstdio>
55185 #endif
55186 //
55187 namespace elc::paths{
55188 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
55189//_defs.hpp
55190/*
55191未完成的elc解释器_share文件
55192由steve02081504与Alex0125设计、编写
55193转载时请在不对此文件做任何修改的同时注明出处
55194项目地址:https://github.com/ELC-lang/ELC
55195*/
55196/*
55197 ,??????????????????????????
55198 ????????????????????????????
55199 ?????????????????????????????+
55200 ?????+++++++++++++++++++++++++
55201 ?????+++++++++++++++++++++++++
55202 ??????++++++++++++++++++++++++
55203 ?????++
55204 ?????+++
55205 ??????+++IIIIIIIIIIIIIIIIII
55206 ?????+++++IIIIIIIIIIIIIIIIII
55207 ?????++++++++++++++++++++++++
55208 ??????+++++++++++++++++++++++:
55209 ?????++
55210 ?????+++
55211 ??????++
55212 ??????????????????????????????II
55213 ??????????????????????????????IIII
55214 ,?????????????????????????????IIIII+
55215 =???++++++++++++++++++++++++++III?
55216 ?++++++++++++++++++++++++++++I+
55217*/
55218
55219//undefs at "_undefs.hpp"
55220
55221#if defined(ELC_CODE_REALM)
55222 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
55223#endif
55224
55225//set ELC_WARNING_LEVEL default to 4(max)
55226#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
55227
55228#if defined(_MSC_VER)
55229 #pragma warning(push,ELC_WARNING_LEVEL)
55230 #pragma warning(disable:4099)//class与struct混用警告diss
55231 #pragma warning(disable:4584)//重复子类警告diss
55232 #pragma warning(disable:4250)//域控制继承警告diss
55233 #pragma warning(disable:26432)//不完全默认方法警告diss
55234 #pragma warning(disable:26435)//virtual override方法警告diss
55235 #pragma warning(disable:26481)//容器安利diss
55236 #pragma warning(disable:26446)//gsl::at安利diss
55237 #pragma warning(disable:26434)//方法覆盖警告diss
55238 #pragma warning(disable:26429)//gsl::not_null安利diss
55239 #pragma warning(disable:26471)//对void*进行static_cast安利diss
55240 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
55241 #pragma warning(disable:26473)//相同指针显式cast警告diss
55242 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
55243 #pragma warning(disable:26485)//数组作指针警告diss
55244 #pragma warning(disable:26490)//reinterpret_cast警告diss
55245 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
55246 #pragma warning(disable:26482)//非常数数组索引警告diss
55247 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
55248#endif
55249#if defined(__GNUC__)
55250 #pragma GCC diagnostic push
55251 #pragma GCC diagnostic warning "-Wall"//开启所有警告
55252 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
55253#endif
55254#if defined(_MSC_VER)
55255 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
55256 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
55257 #define push_msvc_warning() __pragma(warning(push))
55258 #define pop_msvc_warning() __pragma(warning(pop))
55259 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
55260#else
55261 //#define suppress_msvc_warning(...)
55262 #define disable_msvc_warning(...)
55263 #define push_msvc_warning()
55264 #define pop_msvc_warning()
55265 #define push_and_disable_msvc_warning(...)
55266#endif
55267#if defined(_MSC_VER)
55268 //push pack settings
55269 #pragma pack(push)
55270 #pragma pack()
55271#endif
55272#if defined(_MSC_VER)
55273 //push and undef common macros
55274 #pragma push_macro("new")
55275 #undef new
55276 #pragma push_macro("delete")
55277 #undef delete
55278 #pragma push_macro("min")
55279 #undef min
55280 #pragma push_macro("max")
55281 #undef max
55282 #pragma push_macro("abs")
55283 #undef abs
55284 #pragma push_macro("export")
55285 #undef export
55286 #pragma push_macro("rand")
55287 #undef rand
55288 #pragma push_macro("sqrt")
55289 #undef sqrt
55290 #pragma push_macro("type_info")
55291 #undef type_info
55292 #pragma push_macro("elc")
55293 #undef elc
55294#endif
55295//
55296#if defined(ELC_VOID_NAME)
55297 #undef void
55298#endif
55299//
55300#if defined(ELC_PUBLIC_ALL)
55301 #define protected public
55302 #define private public
55303#endif
55304//
55305#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
55306 #undef rand
55307#endif
55308
55309// #define often_noexcept
55310#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
55311#define noexcept_as_auto MAGIC//哦现在有了
55312#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
55313#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
55314
55315#define using_method_from_base_t(name,...) \
55316template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
55317auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
55318{\
55319 return base_t::name(forward<Args>(rest)...);\
55320}\
55321
55322#define using_method_from_value(name,value_name,...) \
55323template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
55324auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
55325{\
55326 return value_name.name(forward<Args>(rest)...);\
55327}\
55328
55329#define floop while(__builtin_is_my_dick_still_there())
55330#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
55331#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
55332#if defined(_MSC_VER) && _MSC_VER>=1935
55333 //@see https://developercommunity.visualstudio.com/t/10193638
55334 #define enable_adl(name) template<typename=void>void name()noexcept=delete
55335#else
55336 #define enable_adl(name) void name()noexcept=delete
55337#endif
55338
55339#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
55340#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
55341
55342#define declvalue(...) (::std::declval<__VA_ARGS__>())
55343
55345#define template_error(reason) static_assert(template_error_helper<T>,reason)
55347#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
55349#define template_warning(reason) template_warning_helper<T>(reason)
55350
55351//for type_info
55352#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
55353#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
55354
55355#define is_common_attribute(name) public attribute<T,name<T>>
55356#define is_special_attribute(name) public attribute<T,name>
55357
55358#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
55359#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
55360
55361//for float_size_t
55362#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
55363//bitnum_of
55364#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
55365
55366//for attribute
55367#define def_common_attribute_with_nothing(name) \
55368template<typename T>\
55369class name{}\
55370
55371#define def_special_attribute_with_nothing(name) \
55372class name{}\
55373
55374#define common_attribute_t template<class>class
55375#define special_attribute_t class
55376
55385#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
55387#define enabled_by_default class enable_state=void
55389#define disabled_by_default class enable_state= ::std::enable_if_t<false>
55391#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
55393#define enable_flag class enable_state
55394
55395#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
55396#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
55397#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
55398#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
55399#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
55400
55402#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
55404#define get_recursive_λ_caller(name,...) \
55405exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
55406 return name(name,Args...);\
55407}
55409#define λ []
55411#define exλ [&]
55413#define λ_with_catch(...) [__VA_ARGS__]
55415#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
55416//recursive_λ_self_referential_reserved_symbolname
55417#define λ_RLSRRS _my_jb_super_sb_name_
55418
55419#if defined(_MSC_VER) && !defined(__clang__)
55420 #define λ_inline [[msvc::forceinline]]
55421 #define λ_force_inline [[msvc::forceinline]]
55422#elif
55423 #define λ_inline [[gnu::always_inline]]
55424 #define λ_force_inline [[gnu::always_inline]]
55425#else
55426 #define λ_inline
55427 #define λ_force_inline
55428#endif
55429
55430#define MAGIC//ahh,ko no tenno da!
55431
55433#define nothing
55434
55436#define elseif else if
55438#define _big_than_ >
55440#define _small_than_ <
55441
55442#if defined(_MSC_VER)
55443 #define not !
55444 #define and &&
55445 #define or ||
55446#endif
55447
55449#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
55451#define BREAK_NAMESPACE }
55452
55454#define template_name template
55456#define type_name class
55457
55458#if defined(DEBUG) || defined(_DEBUG)
55459 #define not_in_debug 0
55460 #define in_debug 1
55461#else
55462 #define not_in_debug 1
55463 #define in_debug 0
55464#endif
55465
55466#define es U""
55467#define ec(ch) U ## ch
55468
55469#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
55470 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
55471#else
55472 #define ELC_TEST_EVENTNAME(name)
55473#endif
55474
55475#define override_instance_struct \
55476protected:\
55477 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
55478 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
55479 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
55480 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
55481 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
55482
55483#if defined(_MSC_VER) && !defined(__clang__)
55484 #define distinctive __declspec(dllexport)
55485#else
55486 #define distinctive
55487#endif
55488
55489#if defined(_MSC_VER) && !defined(__clang__)
55490 #define force_inline __forceinline
55491#elif defined(__GNUC__) || defined(__clang__)
55492 #define force_inline __attribute__((always_inline)) inline
55493#else
55494 #define force_inline inline
55495#endif
55496
55497#if defined(_MSC_VER) && !defined(__clang__)
55498 #define with_no_vtable __declspec(novtable)
55499#else
55500 #define with_no_vtable
55501#endif
55502
55503#define in_consteval (::std::is_constant_evaluated())
55504
55505#define no_vtable_struct struct with_no_vtable
55506#define no_vtable_class class with_no_vtable
55507
55508//#define get_elc_defs using namespace ::elc::defs
55509
55510//file_end
55511
55512 #line 47 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55513
55514 using namespace ::elc::defs;
55515 namespace defs{
55516 #if SYSTEM_TYPE == windows
55517 #define DYNAMIC_LIBRARY_SUFFIX ".dll"
55518 #else
55519 #define DYNAMIC_LIBRARY_SUFFIX ".so"
55520 #endif
55521
55522 [[nodiscard]]inline bool file_exists(const string&name)noexcept{
55523 #if SYSTEM_TYPE == windows
55524 return GetFileAttributesA(to_char_str(name).c_str())!=INVALID_FILE_ATTRIBUTES;
55525 #elif SYSTEM_TYPE == linux
55526 return access(to_char_str(name).c_str(),F_OK)==0;
55527 #else
55528 auto fp = ::std::fopen(to_char_str(name).c_str(), "rb");
55529 if(fp){
55530 ::std::fclose(fp);
55531 return true;
55532 }
55533 return false;
55534 #endif
55535 }
55536 [[nodiscard]]inline string get_program_data_path()noexcept{
55537 #if SYSTEM_TYPE == windows
55538 char path[MAX_PATH];
55539 if(!SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_COMMON_APPDATA, NULL, 0, path)))
55540 return string{};
55541 return to_char_t_str(path);
55542 #elif SYSTEM_TYPE == linux
55543 return es"/usr/local/share"_constexpr_str;
55544 #else
55545 return string{};
55546 #endif
55547 }
55548 [[nodiscard]]inline string get_system_drive()noexcept{
55549 #if SYSTEM_TYPE == windows
55550 char path[MAX_PATH];
55551 if(!SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_WINDOWS, NULL, 0, path)))
55552 return string{};
55553 return to_char_t_str(path)+es"\\.."_constexpr_str;
55554 #elif SYSTEM_TYPE == linux
55555 return es"/"_constexpr_str;
55556 #else
55557 return string{};
55558 #endif
55559 }
55560 [[nodiscard]]inline string get_elc_runtime_lib_path()noexcept{
55561 #if SYSTEM_TYPE == windows
55562 //windows: if can read file ProgramData/elc/flag , use ProgramData/elc
55563 //else try to read SystemDrive/elc/flag , use ProgramData/elc
55564 //else return "./elc"
55565 {
55566 string program_data_path=get_program_data_path();
55567 if(program_data_path.size() && file_exists(program_data_path + es"/elc/flag"_constexpr_str))
55568 return program_data_path+es"/elc"_constexpr_str;
55569 }
55570 {
55571 string system_drive=get_system_drive();
55572 if(system_drive.size() && file_exists(system_drive + es"/elc/flag"_constexpr_str))
55573 return system_drive+es"/elc"_constexpr_str;
55574 }
55575 #elif SYSTEM_TYPE == linux
55576 //linux: if can read file /usr/lib/elc/flag , use /usr/lib/elc
55577 //else return "./elc"
55578 string flag_path=es"/usr/lib/elc/flag"_constexpr_str;
55579 if(file_exists(flag_path))
55580 return es"/usr/lib/elc"_constexpr_str;
55581 #endif
55582 return es"./elc"_constexpr_str;
55583 }
55584 }
55585 inline constexpr auto package_symbol_loader_file_name = es"package_symbol_loader" DYNAMIC_LIBRARY_SUFFIX ""_constexpr_str;
55586
55587 push_and_disable_msvc_warning(26426);//动态初始化警告diss
55588 distinctive inline string elc_runtime_lib_path=defs::get_elc_runtime_lib_path();
55591
55592 #undef DYNAMIC_LIBRARY_SUFFIX
55593
55594 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
55595//_undefs.hpp
55596/*
55597未完成的elc解释器_share文件
55598由steve02081504与Alex0125设计、编写
55599转载时请在不对此文件做任何修改的同时注明出处
55600项目地址:https://github.com/ELC-lang/ELC
55601*/
55602/*
55603 ,??????????????????????????
55604 ????????????????????????????
55605 ?????????????????????????????+
55606 ?????+++++++++++++++++++++++++
55607 ?????+++++++++++++++++++++++++
55608 ??????++++++++++++++++++++++++
55609 ?????++
55610 ?????+++
55611 ??????+++IIIIIIIIIIIIIIIIII
55612 ?????+++++IIIIIIIIIIIIIIIIII
55613 ?????++++++++++++++++++++++++
55614 ??????+++++++++++++++++++++++:
55615 ?????++
55616 ?????+++
55617 ??????++
55618 ??????????????????????????????II
55619 ??????????????????????????????IIII
55620 ,?????????????????????????????IIIII+
55621 =???++++++++++++++++++++++++++III?
55622 ?++++++++++++++++++++++++++++I+
55623*/
55624
55625//defs at "_defs.hpp"
55626
55627#if defined(_MSC_VER)
55628 #pragma warning(pop)
55629#endif
55630//#undef suppress_msvc_warning
55631#undef disable_msvc_warning
55632#undef push_msvc_warning
55633#undef pop_msvc_warning
55634#undef push_and_disable_msvc_warning
55635#if defined(_MSC_VER)
55636 #pragma pack(pop)
55637#endif
55638#if defined(__GNUC__)
55639 #pragma GCC diagnostic pop
55640#endif
55641#if defined(_MSC_VER)
55642 #pragma pop_macro("new")
55643 #pragma pop_macro("delete")
55644 #pragma pop_macro("min")
55645 #pragma pop_macro("max")
55646 #pragma pop_macro("abs")
55647 #pragma pop_macro("export")
55648 #pragma pop_macro("rand")
55649 #pragma pop_macro("sqrt")
55650 #pragma pop_macro("type_info")
55651 #pragma pop_macro("elc")
55652#endif
55653
55654//
55655#if defined(ELC_VOID_NAME)
55656 #define void the_void
55657#endif
55658//
55659#if defined(ELC_PUBLIC_ALL)
55660 #undef protected
55661 #undef private
55662#endif
55663//
55664#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
55665 #define rand the_rand
55666#endif
55667
55668// #undef often_noexcept
55669#undef noexcept_as
55670#undef noexcept_as_auto
55671#undef constexpr_as
55672#undef constexpr_as_auto
55673
55674#undef using_method_from_base_t
55675#undef using_method_from_value
55676
55677#undef floop
55678#undef times
55679#undef debug_times
55680#undef enable_adl
55681
55682#undef re_declvalue
55683#undef re_decltype
55684
55685#undef declvalue
55686
55687#undef template_error
55688#undef template_error_of_type
55689#undef template_warning
55690
55691#undef type_info_of
55692#undef type_name_of
55693
55694#undef is_common_attribute
55695#undef is_special_attribute
55696
55697#undef has_attribute
55698#undef not_has_attribute
55699
55700#undef float_size_of
55701#undef bitnum_of
55702
55703#undef def_common_attribute_with_nothing
55704#undef def_special_attribute_with_nothing
55705
55706#undef common_attribute_t
55707#undef special_attribute_t
55708
55709#undef enable_if
55710#undef enabled_by_default
55711#undef disabled_by_default
55712#undef enable_if_not_ill_form
55713#undef enable_flag
55714
55715#undef was_an_ill_form
55716#undef was_an_ill_form_with_parameter
55717#undef was_not_an_ill_form
55718#undef was_not_an_ill_form_and_noexcept
55719#undef was_not_an_ill_form_with_parameter
55720
55721#undef recursive_λ
55722#undef get_recursive_λ_caller
55723#undef λ
55724#undef exλ
55725#undef λ_with_catch
55726#undef self_recursion
55727#undef λ_RLSRRS
55728#undef λ_inline
55729#undef λ_force_inline
55730
55731#undef MAGIC
55732
55733#undef nothing
55734
55735#undef elseif
55736#undef _big_than_
55737#undef _small_than_
55738
55739#if defined(_MSC_VER)
55740 #undef not
55741 #undef and
55742 #undef or
55743#endif
55744
55745#undef INTER_NAMESPACE
55746#undef BREAK_NAMESPACE
55747
55748#undef szie
55749#undef form
55750
55751#undef template_name
55752#undef type_name
55753
55754#undef not_in_debug
55755
55756#undef es
55757#undef ec
55758
55759#undef ELC_TEST_EVENTNAME
55760
55761#undef override_instance_struct
55762
55763#undef distinctive
55764
55765#undef force_inline
55766
55767#undef with_no_vtable
55768
55769#undef in_consteval
55770
55771#undef no_vtable_struct
55772#undef no_vtable_class
55773
55774//#undef get_elc_defs
55775
55776//file_end
55777
55778 #line 129 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55779 }
55780 //
55781 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/undef_decl_system_type.hpp"
55782//undef_decl_system_type.hpp
55783/*
55784未完成的elc解释器_share文件
55785由steve02081504与Alex0125设计、编写
55786转载时请在不对此文件做任何修改的同时注明出处
55787项目地址:https://github.com/ELC-lang/ELC
55788*/
55789/*
55790 ,??????????????????????????
55791 ????????????????????????????
55792 ?????????????????????????????+
55793 ?????+++++++++++++++++++++++++
55794 ?????+++++++++++++++++++++++++
55795 ??????++++++++++++++++++++++++
55796 ?????++
55797 ?????+++
55798 ??????+++IIIIIIIIIIIIIIIIII
55799 ?????+++++IIIIIIIIIIIIIIIIII
55800 ?????++++++++++++++++++++++++
55801 ??????+++++++++++++++++++++++:
55802 ?????++
55803 ?????+++
55804 ??????++
55805 ??????????????????????????????II
55806 ??????????????????????????????IIII
55807 ,?????????????????????????????IIIII+
55808 =???++++++++++++++++++++++++++III?
55809 ?++++++++++++++++++++++++++++I+
55810*/
55811//copy&rewrite from steve02081504/evest.h
55812#undef linux
55813#undef windows
55814#undef other
55815#undef SYSTEM_TYPE
55816#undef ERROR_MSG_UNABLE_OS
55817
55818//file_end
55819
55820 #line 132 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/paths.hpp"
55821#endif
55822
55823//file_end
55824
55825#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
55826namespace elc::defs{
55827 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
55828//_defs.hpp
55829/*
55830未完成的elc解释器basic文件
55831由steve02081504与Alex0125设计、编写
55832转载时请在不对此文件做任何修改的同时注明出处
55833项目地址:https://github.com/ELC-lang/ELC
55834*/
55835/*
55836 ,??????????????????????????
55837 ????????????????????????????
55838 ?????????????????????????????+
55839 ?????+++++++++++++++++++++++++
55840 ?????+++++++++++++++++++++++++
55841 ??????++++++++++++++++++++++++
55842 ?????++
55843 ?????+++
55844 ??????+++IIIIIIIIIIIIIIIIII
55845 ?????+++++IIIIIIIIIIIIIIIIII
55846 ?????++++++++++++++++++++++++
55847 ??????+++++++++++++++++++++++:
55848 ?????++
55849 ?????+++
55850 ??????++
55851 ??????????????????????????????II
55852 ??????????????????????????????IIII
55853 ,?????????????????????????????IIIII+
55854 =???++++++++++++++++++++++++++III?
55855 ?++++++++++++++++++++++++++++I+
55856*/
55857#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
55858//_defs.hpp
55859/*
55860未完成的elc解释器_share文件
55861由steve02081504与Alex0125设计、编写
55862转载时请在不对此文件做任何修改的同时注明出处
55863项目地址:https://github.com/ELC-lang/ELC
55864*/
55865/*
55866 ,??????????????????????????
55867 ????????????????????????????
55868 ?????????????????????????????+
55869 ?????+++++++++++++++++++++++++
55870 ?????+++++++++++++++++++++++++
55871 ??????++++++++++++++++++++++++
55872 ?????++
55873 ?????+++
55874 ??????+++IIIIIIIIIIIIIIIIII
55875 ?????+++++IIIIIIIIIIIIIIIIII
55876 ?????++++++++++++++++++++++++
55877 ??????+++++++++++++++++++++++:
55878 ?????++
55879 ?????+++
55880 ??????++
55881 ??????????????????????????????II
55882 ??????????????????????????????IIII
55883 ,?????????????????????????????IIIII+
55884 =???++++++++++++++++++++++++++III?
55885 ?++++++++++++++++++++++++++++I+
55886*/
55887
55888//undefs at "_undefs.hpp"
55889
55890#if defined(ELC_CODE_REALM)
55891 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
55892#endif
55893
55894//set ELC_WARNING_LEVEL default to 4(max)
55895#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
55896
55897#if defined(_MSC_VER)
55898 #pragma warning(push,ELC_WARNING_LEVEL)
55899 #pragma warning(disable:4099)//class与struct混用警告diss
55900 #pragma warning(disable:4584)//重复子类警告diss
55901 #pragma warning(disable:4250)//域控制继承警告diss
55902 #pragma warning(disable:26432)//不完全默认方法警告diss
55903 #pragma warning(disable:26435)//virtual override方法警告diss
55904 #pragma warning(disable:26481)//容器安利diss
55905 #pragma warning(disable:26446)//gsl::at安利diss
55906 #pragma warning(disable:26434)//方法覆盖警告diss
55907 #pragma warning(disable:26429)//gsl::not_null安利diss
55908 #pragma warning(disable:26471)//对void*进行static_cast安利diss
55909 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
55910 #pragma warning(disable:26473)//相同指针显式cast警告diss
55911 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
55912 #pragma warning(disable:26485)//数组作指针警告diss
55913 #pragma warning(disable:26490)//reinterpret_cast警告diss
55914 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
55915 #pragma warning(disable:26482)//非常数数组索引警告diss
55916 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
55917#endif
55918#if defined(__GNUC__)
55919 #pragma GCC diagnostic push
55920 #pragma GCC diagnostic warning "-Wall"//开启所有警告
55921 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
55922#endif
55923#if defined(_MSC_VER)
55924 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
55925 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
55926 #define push_msvc_warning() __pragma(warning(push))
55927 #define pop_msvc_warning() __pragma(warning(pop))
55928 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
55929#else
55930 //#define suppress_msvc_warning(...)
55931 #define disable_msvc_warning(...)
55932 #define push_msvc_warning()
55933 #define pop_msvc_warning()
55934 #define push_and_disable_msvc_warning(...)
55935#endif
55936#if defined(_MSC_VER)
55937 //push pack settings
55938 #pragma pack(push)
55939 #pragma pack()
55940#endif
55941#if defined(_MSC_VER)
55942 //push and undef common macros
55943 #pragma push_macro("new")
55944 #undef new
55945 #pragma push_macro("delete")
55946 #undef delete
55947 #pragma push_macro("min")
55948 #undef min
55949 #pragma push_macro("max")
55950 #undef max
55951 #pragma push_macro("abs")
55952 #undef abs
55953 #pragma push_macro("export")
55954 #undef export
55955 #pragma push_macro("rand")
55956 #undef rand
55957 #pragma push_macro("sqrt")
55958 #undef sqrt
55959 #pragma push_macro("type_info")
55960 #undef type_info
55961 #pragma push_macro("elc")
55962 #undef elc
55963#endif
55964//
55965#if defined(ELC_VOID_NAME)
55966 #undef void
55967#endif
55968//
55969#if defined(ELC_PUBLIC_ALL)
55970 #define protected public
55971 #define private public
55972#endif
55973//
55974#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
55975 #undef rand
55976#endif
55977
55978// #define often_noexcept
55979#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
55980#define noexcept_as_auto MAGIC//哦现在有了
55981#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
55982#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
55983
55984#define using_method_from_base_t(name,...) \
55985template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
55986auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
55987{\
55988 return base_t::name(forward<Args>(rest)...);\
55989}\
55990
55991#define using_method_from_value(name,value_name,...) \
55992template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
55993auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
55994{\
55995 return value_name.name(forward<Args>(rest)...);\
55996}\
55997
55998#define floop while(__builtin_is_my_dick_still_there())
55999#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
56000#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
56001#if defined(_MSC_VER) && _MSC_VER>=1935
56002 //@see https://developercommunity.visualstudio.com/t/10193638
56003 #define enable_adl(name) template<typename=void>void name()noexcept=delete
56004#else
56005 #define enable_adl(name) void name()noexcept=delete
56006#endif
56007
56008#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
56009#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
56010
56011#define declvalue(...) (::std::declval<__VA_ARGS__>())
56012
56014#define template_error(reason) static_assert(template_error_helper<T>,reason)
56016#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
56018#define template_warning(reason) template_warning_helper<T>(reason)
56019
56020//for type_info
56021#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
56022#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
56023
56024#define is_common_attribute(name) public attribute<T,name<T>>
56025#define is_special_attribute(name) public attribute<T,name>
56026
56027#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
56028#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
56029
56030//for float_size_t
56031#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
56032//bitnum_of
56033#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
56034
56035//for attribute
56036#define def_common_attribute_with_nothing(name) \
56037template<typename T>\
56038class name{}\
56039
56040#define def_special_attribute_with_nothing(name) \
56041class name{}\
56042
56043#define common_attribute_t template<class>class
56044#define special_attribute_t class
56045
56054#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
56056#define enabled_by_default class enable_state=void
56058#define disabled_by_default class enable_state= ::std::enable_if_t<false>
56060#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
56062#define enable_flag class enable_state
56063
56064#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
56065#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
56066#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
56067#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
56068#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
56069
56071#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
56073#define get_recursive_λ_caller(name,...) \
56074exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
56075 return name(name,Args...);\
56076}
56078#define λ []
56080#define exλ [&]
56082#define λ_with_catch(...) [__VA_ARGS__]
56084#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
56085//recursive_λ_self_referential_reserved_symbolname
56086#define λ_RLSRRS _my_jb_super_sb_name_
56087
56088#if defined(_MSC_VER) && !defined(__clang__)
56089 #define λ_inline [[msvc::forceinline]]
56090 #define λ_force_inline [[msvc::forceinline]]
56091#elif
56092 #define λ_inline [[gnu::always_inline]]
56093 #define λ_force_inline [[gnu::always_inline]]
56094#else
56095 #define λ_inline
56096 #define λ_force_inline
56097#endif
56098
56099#define MAGIC//ahh,ko no tenno da!
56100
56102#define nothing
56103
56105#define elseif else if
56107#define _big_than_ >
56109#define _small_than_ <
56110
56111#if defined(_MSC_VER)
56112 #define not !
56113 #define and &&
56114 #define or ||
56115#endif
56116
56118#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
56120#define BREAK_NAMESPACE }
56121
56123#define template_name template
56125#define type_name class
56126
56127#if defined(DEBUG) || defined(_DEBUG)
56128 #define not_in_debug 0
56129 #define in_debug 1
56130#else
56131 #define not_in_debug 1
56132 #define in_debug 0
56133#endif
56134
56135#define es U""
56136#define ec(ch) U ## ch
56137
56138#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
56139 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
56140#else
56141 #define ELC_TEST_EVENTNAME(name)
56142#endif
56143
56144#define override_instance_struct \
56145protected:\
56146 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
56147 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
56148 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
56149 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
56150 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
56151
56152#if defined(_MSC_VER) && !defined(__clang__)
56153 #define distinctive __declspec(dllexport)
56154#else
56155 #define distinctive
56156#endif
56157
56158#if defined(_MSC_VER) && !defined(__clang__)
56159 #define force_inline __forceinline
56160#elif defined(__GNUC__) || defined(__clang__)
56161 #define force_inline __attribute__((always_inline)) inline
56162#else
56163 #define force_inline inline
56164#endif
56165
56166#if defined(_MSC_VER) && !defined(__clang__)
56167 #define with_no_vtable __declspec(novtable)
56168#else
56169 #define with_no_vtable
56170#endif
56171
56172#define in_consteval (::std::is_constant_evaluated())
56173
56174#define no_vtable_struct struct with_no_vtable
56175#define no_vtable_class class with_no_vtable
56176
56177//#define get_elc_defs using namespace ::elc::defs
56178
56179//file_end
56180
56181#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
56182
56183//file_end
56184
56185 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
56186
56187 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/package_symbol_loader.hpp"
56188//package_symbol_loader.hpp
56189/*
56190未完成的elc解释器template文件
56191由steve02081504与Alex0125设计、编写
56192转载时请在不对此文件做任何修改的同时注明出处
56193项目地址:https://github.com/ELC-lang/ELC
56194*/
56195/*
56196 ,??????????????????????????
56197 ????????????????????????????
56198 ?????????????????????????????+
56199 ?????+++++++++++++++++++++++++
56200 ?????+++++++++++++++++++++++++
56201 ??????++++++++++++++++++++++++
56202 ?????++
56203 ?????+++
56204 ??????+++IIIIIIIIIIIIIIIIII
56205 ?????+++++IIIIIIIIIIIIIIIIII
56206 ?????++++++++++++++++++++++++
56207 ??????+++++++++++++++++++++++:
56208 ?????++
56209 ?????+++
56210 ??????++
56211 ??????????????????????????????II
56212 ??????????????????????????????IIII
56213 ,?????????????????????????????IIIII+
56214 =???++++++++++++++++++++++++++III?
56215 ?++++++++++++++++++++++++++++I+
56216*/
56217namespace package_symbol_loader_n{
56220 function_t<ptr(string lib_name, size_t lib_ver, string symbol_name)noexcept> load_interface;
56221 function_t<ptr()noexcept> load_error_interface;
56222
56224 if(package_symbol_loader_handle = load_lib(paths::package_symbol_loader_path)){
56225 load_interface = package_symbol_loader_handle->get_symbol_as_function<ptr(string lib_name,size_t lib_ver,string symbol_name)noexcept>(es"load_interface");
56226 load_error_interface = package_symbol_loader_handle->get_symbol_as_function<ptr()noexcept>(es"load_error_interface");
56227 }
56228 else
56229 die_with(locale::str::package_symbol_loader::load_failed);
56230 if(!load_interface)
56231 die_with(locale::str::package_symbol_loader::load_interface_failed);
56232 }
56233 ~package_symbol_loader_t()noexcept = default;
56234
56235 ptr load_symbol(string lib_name,size_t lib_ver,string symbol_name)noexcept{
56236 return load_interface(lib_name,lib_ver,symbol_name);
56237 }
56238 ptr get_load_error()noexcept{
56239 return load_error_interface();
56240 }
56241 };
56242}
56243
56244//file_end
56245 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
56246 #if defined(ELC_TEST_ON)
56247 namespace package_symbol_loader_part_test{
56248 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_test.hpp"
56249//_test.hpp
56250/*
56251未完成的elc解释器template文件
56252由steve02081504与Alex0125设计、编写
56253转载时请在不对此文件做任何修改的同时注明出处
56254项目地址:https://github.com/ELC-lang/ELC
56255*/
56256/*
56257 ,??????????????????????????
56258 ????????????????????????????
56259 ?????????????????????????????+
56260 ?????+++++++++++++++++++++++++
56261 ?????+++++++++++++++++++++++++
56262 ??????++++++++++++++++++++++++
56263 ?????++
56264 ?????+++
56265 ??????+++IIIIIIIIIIIIIIIIII
56266 ?????+++++IIIIIIIIIIIIIIIIII
56267 ?????++++++++++++++++++++++++
56268 ??????+++++++++++++++++++++++:
56269 ?????++
56270 ?????+++
56271 ??????++
56272 ??????????????????????????????II
56273 ??????????????????????????????IIII
56274 ,?????????????????????????????IIIII+
56275 =???++++++++++++++++++++++++++III?
56276 ?++++++++++++++++++++++++++++I+
56277*/
56278inline void test(){
56279 ELC_TEST_EVENTNAME("package_symbol_loader部分测试");
56280}
56281inline void test_log_out(){}
56282inline void test_end{}
56283
56284//file_end
56285
56286 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
56287 }
56288 #endif
56289
56290 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
56291//_undefs.hpp
56292/*
56293未完成的elc解释器basic文件
56294由steve02081504与Alex0125设计、编写
56295转载时请在不对此文件做任何修改的同时注明出处
56296项目地址:https://github.com/ELC-lang/ELC
56297*/
56298/*
56299 ,??????????????????????????
56300 ????????????????????????????
56301 ?????????????????????????????+
56302 ?????+++++++++++++++++++++++++
56303 ?????+++++++++++++++++++++++++
56304 ??????++++++++++++++++++++++++
56305 ?????++
56306 ?????+++
56307 ??????+++IIIIIIIIIIIIIIIIII
56308 ?????+++++IIIIIIIIIIIIIIIIII
56309 ?????++++++++++++++++++++++++
56310 ??????+++++++++++++++++++++++:
56311 ?????++
56312 ?????+++
56313 ??????++
56314 ??????????????????????????????II
56315 ??????????????????????????????IIII
56316 ,?????????????????????????????IIIII+
56317 =???++++++++++++++++++++++++++III?
56318 ?++++++++++++++++++++++++++++I+
56319*/
56320#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
56321//_undefs.hpp
56322/*
56323未完成的elc解释器_share文件
56324由steve02081504与Alex0125设计、编写
56325转载时请在不对此文件做任何修改的同时注明出处
56326项目地址:https://github.com/ELC-lang/ELC
56327*/
56328/*
56329 ,??????????????????????????
56330 ????????????????????????????
56331 ?????????????????????????????+
56332 ?????+++++++++++++++++++++++++
56333 ?????+++++++++++++++++++++++++
56334 ??????++++++++++++++++++++++++
56335 ?????++
56336 ?????+++
56337 ??????+++IIIIIIIIIIIIIIIIII
56338 ?????+++++IIIIIIIIIIIIIIIIII
56339 ?????++++++++++++++++++++++++
56340 ??????+++++++++++++++++++++++:
56341 ?????++
56342 ?????+++
56343 ??????++
56344 ??????????????????????????????II
56345 ??????????????????????????????IIII
56346 ,?????????????????????????????IIIII+
56347 =???++++++++++++++++++++++++++III?
56348 ?++++++++++++++++++++++++++++I+
56349*/
56350
56351//defs at "_defs.hpp"
56352
56353#if defined(_MSC_VER)
56354 #pragma warning(pop)
56355#endif
56356//#undef suppress_msvc_warning
56357#undef disable_msvc_warning
56358#undef push_msvc_warning
56359#undef pop_msvc_warning
56360#undef push_and_disable_msvc_warning
56361#if defined(_MSC_VER)
56362 #pragma pack(pop)
56363#endif
56364#if defined(__GNUC__)
56365 #pragma GCC diagnostic pop
56366#endif
56367#if defined(_MSC_VER)
56368 #pragma pop_macro("new")
56369 #pragma pop_macro("delete")
56370 #pragma pop_macro("min")
56371 #pragma pop_macro("max")
56372 #pragma pop_macro("abs")
56373 #pragma pop_macro("export")
56374 #pragma pop_macro("rand")
56375 #pragma pop_macro("sqrt")
56376 #pragma pop_macro("type_info")
56377 #pragma pop_macro("elc")
56378#endif
56379
56380//
56381#if defined(ELC_VOID_NAME)
56382 #define void the_void
56383#endif
56384//
56385#if defined(ELC_PUBLIC_ALL)
56386 #undef protected
56387 #undef private
56388#endif
56389//
56390#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
56391 #define rand the_rand
56392#endif
56393
56394// #undef often_noexcept
56395#undef noexcept_as
56396#undef noexcept_as_auto
56397#undef constexpr_as
56398#undef constexpr_as_auto
56399
56400#undef using_method_from_base_t
56401#undef using_method_from_value
56402
56403#undef floop
56404#undef times
56405#undef debug_times
56406#undef enable_adl
56407
56408#undef re_declvalue
56409#undef re_decltype
56410
56411#undef declvalue
56412
56413#undef template_error
56414#undef template_error_of_type
56415#undef template_warning
56416
56417#undef type_info_of
56418#undef type_name_of
56419
56420#undef is_common_attribute
56421#undef is_special_attribute
56422
56423#undef has_attribute
56424#undef not_has_attribute
56425
56426#undef float_size_of
56427#undef bitnum_of
56428
56429#undef def_common_attribute_with_nothing
56430#undef def_special_attribute_with_nothing
56431
56432#undef common_attribute_t
56433#undef special_attribute_t
56434
56435#undef enable_if
56436#undef enabled_by_default
56437#undef disabled_by_default
56438#undef enable_if_not_ill_form
56439#undef enable_flag
56440
56441#undef was_an_ill_form
56442#undef was_an_ill_form_with_parameter
56443#undef was_not_an_ill_form
56444#undef was_not_an_ill_form_and_noexcept
56445#undef was_not_an_ill_form_with_parameter
56446
56447#undef recursive_λ
56448#undef get_recursive_λ_caller
56449#undef λ
56450#undef exλ
56451#undef λ_with_catch
56452#undef self_recursion
56453#undef λ_RLSRRS
56454#undef λ_inline
56455#undef λ_force_inline
56456
56457#undef MAGIC
56458
56459#undef nothing
56460
56461#undef elseif
56462#undef _big_than_
56463#undef _small_than_
56464
56465#if defined(_MSC_VER)
56466 #undef not
56467 #undef and
56468 #undef or
56469#endif
56470
56471#undef INTER_NAMESPACE
56472#undef BREAK_NAMESPACE
56473
56474#undef szie
56475#undef form
56476
56477#undef template_name
56478#undef type_name
56479
56480#undef not_in_debug
56481
56482#undef es
56483#undef ec
56484
56485#undef ELC_TEST_EVENTNAME
56486
56487#undef override_instance_struct
56488
56489#undef distinctive
56490
56491#undef force_inline
56492
56493#undef with_no_vtable
56494
56495#undef in_consteval
56496
56497#undef no_vtable_struct
56498#undef no_vtable_class
56499
56500//#undef get_elc_defs
56501
56502//file_end
56503
56504#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
56505
56506//file_end
56507
56508 #line 48 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
56509}
56510namespace elc{
56511 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_export.hpp"
56512//_export.hpp
56513//at namespace elc
56514/*
56515未完成的elc解释器template文件
56516由steve02081504与Alex0125设计、编写
56517转载时请在不对此文件做任何修改的同时注明出处
56518项目地址:https://github.com/ELC-lang/ELC
56519*/
56520/*
56521 ,??????????????????????????
56522 ????????????????????????????
56523 ?????????????????????????????+
56524 ?????+++++++++++++++++++++++++
56525 ?????+++++++++++++++++++++++++
56526 ??????++++++++++++++++++++++++
56527 ?????++
56528 ?????+++
56529 ??????+++IIIIIIIIIIIIIIIIII
56530 ?????+++++IIIIIIIIIIIIIIIIII
56531 ?????++++++++++++++++++++++++
56532 ??????+++++++++++++++++++++++:
56533 ?????++
56534 ?????+++
56535 ??????++
56536 ??????????????????????????????II
56537 ??????????????????????????????IIII
56538 ,?????????????????????????????IIIII+
56539 =???++++++++++++++++++++++++++III?
56540 ?++++++++++++++++++++++++++++I+
56541*/
56542#define export using defs::package_symbol_loader_n::
56543
56544#undef export
56545
56546//file_end
56547
56548 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/package_symbol_loader/_body.hpp"
56549}
56550
56551//file_end
56552
56553 #line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/package_symbol_loader"
56554#endif
56555
56556//file_end
56557
56558 #line 45 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
56559 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
56560//stream
56561//at namespace ::
56562/*@
56563未完成的elc解释器include文件
56564由steve02081504与Alex0125设计、编写
56565转载时请在不对此文件做任何修改的同时注明出处
56566项目地址:https://github.com/ELC-lang/ELC
56567*/
56568/*
56569 ,??????????????????????????
56570 ????????????????????????????
56571 ?????????????????????????????+
56572 ?????+++++++++++++++++++++++++
56573 ?????+++++++++++++++++++++++++
56574 ??????++++++++++++++++++++++++
56575 ?????++
56576 ?????+++
56577 ??????+++IIIIIIIIIIIIIIIIII
56578 ?????+++++IIIIIIIIIIIIIIIIII
56579 ?????++++++++++++++++++++++++
56580 ??????+++++++++++++++++++++++:
56581 ?????++
56582 ?????+++
56583 ??????++
56584 ??????????????????????????????II
56585 ??????????????????????????????IIII
56586 ,?????????????????????????????IIIII+
56587 =???++++++++++++++++++++++++++III?
56588 ?++++++++++++++++++++++++++++I+
56589*/
56590#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
56591//pre_checks.hpp
56592/*
56593未完成的elc解释器_share文件
56594由steve02081504与Alex0125设计、编写
56595转载时请在不对此文件做任何修改的同时注明出处
56596项目地址:https://github.com/ELC-lang/ELC
56597*/
56598/*
56599 ,??????????????????????????
56600 ????????????????????????????
56601 ?????????????????????????????+
56602 ?????+++++++++++++++++++++++++
56603 ?????+++++++++++++++++++++++++
56604 ??????++++++++++++++++++++++++
56605 ?????++
56606 ?????+++
56607 ??????+++IIIIIIIIIIIIIIIIII
56608 ?????+++++IIIIIIIIIIIIIIIIII
56609 ?????++++++++++++++++++++++++
56610 ??????+++++++++++++++++++++++:
56611 ?????++
56612 ?????+++
56613 ??????++
56614 ??????????????????????????????II
56615 ??????????????????????????????IIII
56616 ,?????????????????????????????IIIII+
56617 =???++++++++++++++++++++++++++III?
56618 ?++++++++++++++++++++++++++++I+
56619*/
56620//__cplusplus needs 20+
56621#if !defined(__cplusplus)||__cplusplus<202002L
56622 //if msvc, check _MSVC_LANG
56623 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
56624 //ok
56625 #else
56626 #error "elc files needs c++20 or higher"
56627 #endif
56628#endif
56629
56630//check if the compiler is msvc
56631#if defined(_MSC_VER)
56632 //check if _CPPRTTI
56633 #if !defined(_CPPRTTI)
56634 #error "elc files needs rtti"
56635 #endif
56636 //check _MSC_VER at last 1932
56637 #if _MSC_VER<1932
56638 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
56639 #endif
56640#endif
56641
56642//file_end
56643
56644#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
56645#if !defined(ELC_STREAM)
56646 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
56647//base
56648//at namespace ::
56649/*@
56650未完成的elc解释器include文件
56651由steve02081504与Alex0125设计、编写
56652转载时请在不对此文件做任何修改的同时注明出处
56653项目地址:https://github.com/ELC-lang/ELC
56654*/
56655/*
56656 ,??????????????????????????
56657 ????????????????????????????
56658 ?????????????????????????????+
56659 ?????+++++++++++++++++++++++++
56660 ?????+++++++++++++++++++++++++
56661 ??????++++++++++++++++++++++++
56662 ?????++
56663 ?????+++
56664 ??????+++IIIIIIIIIIIIIIIIII
56665 ?????+++++IIIIIIIIIIIIIIIIII
56666 ?????++++++++++++++++++++++++
56667 ??????+++++++++++++++++++++++:
56668 ?????++
56669 ?????+++
56670 ??????++
56671 ??????????????????????????????II
56672 ??????????????????????????????IIII
56673 ,?????????????????????????????IIIII+
56674 =???++++++++++++++++++++++++++III?
56675 ?++++++++++++++++++++++++++++I+
56676*/
56677#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
56678//pre_checks.hpp
56679/*
56680未完成的elc解释器_share文件
56681由steve02081504与Alex0125设计、编写
56682转载时请在不对此文件做任何修改的同时注明出处
56683项目地址:https://github.com/ELC-lang/ELC
56684*/
56685/*
56686 ,??????????????????????????
56687 ????????????????????????????
56688 ?????????????????????????????+
56689 ?????+++++++++++++++++++++++++
56690 ?????+++++++++++++++++++++++++
56691 ??????++++++++++++++++++++++++
56692 ?????++
56693 ?????+++
56694 ??????+++IIIIIIIIIIIIIIIIII
56695 ?????+++++IIIIIIIIIIIIIIIIII
56696 ?????++++++++++++++++++++++++
56697 ??????+++++++++++++++++++++++:
56698 ?????++
56699 ?????+++
56700 ??????++
56701 ??????????????????????????????II
56702 ??????????????????????????????IIII
56703 ,?????????????????????????????IIIII+
56704 =???++++++++++++++++++++++++++III?
56705 ?++++++++++++++++++++++++++++I+
56706*/
56707//__cplusplus needs 20+
56708#if !defined(__cplusplus)||__cplusplus<202002L
56709 //if msvc, check _MSVC_LANG
56710 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
56711 //ok
56712 #else
56713 #error "elc files needs c++20 or higher"
56714 #endif
56715#endif
56716
56717//check if the compiler is msvc
56718#if defined(_MSC_VER)
56719 //check if _CPPRTTI
56720 #if !defined(_CPPRTTI)
56721 #error "elc files needs rtti"
56722 #endif
56723 //check _MSC_VER at last 1932
56724 #if _MSC_VER<1932
56725 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
56726 #endif
56727#endif
56728
56729//file_end
56730
56731#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
56732#line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base"
56733
56734//file_end
56735
56736 #line 33 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
56737 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
56738//base_stream
56739//at namespace ::
56740/*@
56741未完成的elc解释器include文件
56742由steve02081504与Alex0125设计、编写
56743转载时请在不对此文件做任何修改的同时注明出处
56744项目地址:https://github.com/ELC-lang/ELC
56745*/
56746/*
56747 ,??????????????????????????
56748 ????????????????????????????
56749 ?????????????????????????????+
56750 ?????+++++++++++++++++++++++++
56751 ?????+++++++++++++++++++++++++
56752 ??????++++++++++++++++++++++++
56753 ?????++
56754 ?????+++
56755 ??????+++IIIIIIIIIIIIIIIIII
56756 ?????+++++IIIIIIIIIIIIIIIIII
56757 ?????++++++++++++++++++++++++
56758 ??????+++++++++++++++++++++++:
56759 ?????++
56760 ?????+++
56761 ??????++
56762 ??????????????????????????????II
56763 ??????????????????????????????IIII
56764 ,?????????????????????????????IIIII+
56765 =???++++++++++++++++++++++++++III?
56766 ?++++++++++++++++++++++++++++I+
56767*/
56768#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
56769//pre_checks.hpp
56770/*
56771未完成的elc解释器_share文件
56772由steve02081504与Alex0125设计、编写
56773转载时请在不对此文件做任何修改的同时注明出处
56774项目地址:https://github.com/ELC-lang/ELC
56775*/
56776/*
56777 ,??????????????????????????
56778 ????????????????????????????
56779 ?????????????????????????????+
56780 ?????+++++++++++++++++++++++++
56781 ?????+++++++++++++++++++++++++
56782 ??????++++++++++++++++++++++++
56783 ?????++
56784 ?????+++
56785 ??????+++IIIIIIIIIIIIIIIIII
56786 ?????+++++IIIIIIIIIIIIIIIIII
56787 ?????++++++++++++++++++++++++
56788 ??????+++++++++++++++++++++++:
56789 ?????++
56790 ?????+++
56791 ??????++
56792 ??????????????????????????????II
56793 ??????????????????????????????IIII
56794 ,?????????????????????????????IIIII+
56795 =???++++++++++++++++++++++++++III?
56796 ?++++++++++++++++++++++++++++I+
56797*/
56798//__cplusplus needs 20+
56799#if !defined(__cplusplus)||__cplusplus<202002L
56800 //if msvc, check _MSVC_LANG
56801 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
56802 //ok
56803 #else
56804 #error "elc files needs c++20 or higher"
56805 #endif
56806#endif
56807
56808//check if the compiler is msvc
56809#if defined(_MSC_VER)
56810 //check if _CPPRTTI
56811 #if !defined(_CPPRTTI)
56812 #error "elc files needs rtti"
56813 #endif
56814 //check _MSC_VER at last 1932
56815 #if _MSC_VER<1932
56816 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
56817 #endif
56818#endif
56819
56820//file_end
56821
56822#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
56823#line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
56824
56825//file_end
56826
56827 #line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
56828 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
56829//string
56830//at namespace ::
56831/*@
56832未完成的elc解释器include文件
56833由steve02081504与Alex0125设计、编写
56834转载时请在不对此文件做任何修改的同时注明出处
56835项目地址:https://github.com/ELC-lang/ELC
56836*/
56837/*
56838 ,??????????????????????????
56839 ????????????????????????????
56840 ?????????????????????????????+
56841 ?????+++++++++++++++++++++++++
56842 ?????+++++++++++++++++++++++++
56843 ??????++++++++++++++++++++++++
56844 ?????++
56845 ?????+++
56846 ??????+++IIIIIIIIIIIIIIIIII
56847 ?????+++++IIIIIIIIIIIIIIIIII
56848 ?????++++++++++++++++++++++++
56849 ??????+++++++++++++++++++++++:
56850 ?????++
56851 ?????+++
56852 ??????++
56853 ??????????????????????????????II
56854 ??????????????????????????????IIII
56855 ,?????????????????????????????IIIII+
56856 =???++++++++++++++++++++++++++III?
56857 ?++++++++++++++++++++++++++++I+
56858*/
56859#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
56860//pre_checks.hpp
56861/*
56862未完成的elc解释器_share文件
56863由steve02081504与Alex0125设计、编写
56864转载时请在不对此文件做任何修改的同时注明出处
56865项目地址:https://github.com/ELC-lang/ELC
56866*/
56867/*
56868 ,??????????????????????????
56869 ????????????????????????????
56870 ?????????????????????????????+
56871 ?????+++++++++++++++++++++++++
56872 ?????+++++++++++++++++++++++++
56873 ??????++++++++++++++++++++++++
56874 ?????++
56875 ?????+++
56876 ??????+++IIIIIIIIIIIIIIIIII
56877 ?????+++++IIIIIIIIIIIIIIIIII
56878 ?????++++++++++++++++++++++++
56879 ??????+++++++++++++++++++++++:
56880 ?????++
56881 ?????+++
56882 ??????++
56883 ??????????????????????????????II
56884 ??????????????????????????????IIII
56885 ,?????????????????????????????IIIII+
56886 =???++++++++++++++++++++++++++III?
56887 ?++++++++++++++++++++++++++++I+
56888*/
56889//__cplusplus needs 20+
56890#if !defined(__cplusplus)||__cplusplus<202002L
56891 //if msvc, check _MSVC_LANG
56892 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
56893 //ok
56894 #else
56895 #error "elc files needs c++20 or higher"
56896 #endif
56897#endif
56898
56899//check if the compiler is msvc
56900#if defined(_MSC_VER)
56901 //check if _CPPRTTI
56902 #if !defined(_CPPRTTI)
56903 #error "elc files needs rtti"
56904 #endif
56905 //check _MSC_VER at last 1932
56906 #if _MSC_VER<1932
56907 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
56908 #endif
56909#endif
56910
56911//file_end
56912
56913#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
56914#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
56915
56916//file_end
56917
56918 #line 35 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
56919 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
56920//numerical_representation
56921//at namespace ::
56922/*@
56923未完成的elc解释器include文件
56924由steve02081504与Alex0125设计、编写
56925转载时请在不对此文件做任何修改的同时注明出处
56926项目地址:https://github.com/ELC-lang/ELC
56927*/
56928/*
56929 ,??????????????????????????
56930 ????????????????????????????
56931 ?????????????????????????????+
56932 ?????+++++++++++++++++++++++++
56933 ?????+++++++++++++++++++++++++
56934 ??????++++++++++++++++++++++++
56935 ?????++
56936 ?????+++
56937 ??????+++IIIIIIIIIIIIIIIIII
56938 ?????+++++IIIIIIIIIIIIIIIIII
56939 ?????++++++++++++++++++++++++
56940 ??????+++++++++++++++++++++++:
56941 ?????++
56942 ?????+++
56943 ??????++
56944 ??????????????????????????????II
56945 ??????????????????????????????IIII
56946 ,?????????????????????????????IIIII+
56947 =???++++++++++++++++++++++++++III?
56948 ?++++++++++++++++++++++++++++I+
56949*/
56950#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
56951//pre_checks.hpp
56952/*
56953未完成的elc解释器_share文件
56954由steve02081504与Alex0125设计、编写
56955转载时请在不对此文件做任何修改的同时注明出处
56956项目地址:https://github.com/ELC-lang/ELC
56957*/
56958/*
56959 ,??????????????????????????
56960 ????????????????????????????
56961 ?????????????????????????????+
56962 ?????+++++++++++++++++++++++++
56963 ?????+++++++++++++++++++++++++
56964 ??????++++++++++++++++++++++++
56965 ?????++
56966 ?????+++
56967 ??????+++IIIIIIIIIIIIIIIIII
56968 ?????+++++IIIIIIIIIIIIIIIIII
56969 ?????++++++++++++++++++++++++
56970 ??????+++++++++++++++++++++++:
56971 ?????++
56972 ?????+++
56973 ??????++
56974 ??????????????????????????????II
56975 ??????????????????????????????IIII
56976 ,?????????????????????????????IIIII+
56977 =???++++++++++++++++++++++++++III?
56978 ?++++++++++++++++++++++++++++I+
56979*/
56980//__cplusplus needs 20+
56981#if !defined(__cplusplus)||__cplusplus<202002L
56982 //if msvc, check _MSVC_LANG
56983 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
56984 //ok
56985 #else
56986 #error "elc files needs c++20 or higher"
56987 #endif
56988#endif
56989
56990//check if the compiler is msvc
56991#if defined(_MSC_VER)
56992 //check if _CPPRTTI
56993 #if !defined(_CPPRTTI)
56994 #error "elc files needs rtti"
56995 #endif
56996 //check _MSC_VER at last 1932
56997 #if _MSC_VER<1932
56998 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
56999 #endif
57000#endif
57001
57002//file_end
57003
57004#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
57005#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/numerical_representation"
57006
57007//file_end
57008
57009 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
57010 #include <cstdio>
57011 #define ELC_STREAM
57012 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
57013//_body.hpp
57014//at namespace ::
57015/*
57016未完成的elc解释器stream文件
57017由steve02081504与Alex0125设计、编写
57018转载时请在不对此文件做任何修改的同时注明出处
57019项目地址:https://github.com/ELC-lang/ELC
57020*/
57021/*
57022 ,??????????????????????????
57023 ????????????????????????????
57024 ?????????????????????????????+
57025 ?????+++++++++++++++++++++++++
57026 ?????+++++++++++++++++++++++++
57027 ??????++++++++++++++++++++++++
57028 ?????++
57029 ?????+++
57030 ??????+++IIIIIIIIIIIIIIIIII
57031 ?????+++++IIIIIIIIIIIIIIIIII
57032 ?????++++++++++++++++++++++++
57033 ??????+++++++++++++++++++++++:
57034 ?????++
57035 ?????+++
57036 ??????++
57037 ??????????????????????????????II
57038 ??????????????????????????????IIII
57039 ,?????????????????????????????IIIII+
57040 =???++++++++++++++++++++++++++III?
57041 ?++++++++++++++++++++++++++++I+
57042*/
57043#if defined(ELC_TEST)
57044 #error "this part cannot be tested."
57045#endif
57046#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57047//streams.hpp
57048/*
57049未完成的elc解释器_share文件
57050由steve02081504与Alex0125设计、编写
57051转载时请在不对此文件做任何修改的同时注明出处
57052项目地址:https://github.com/ELC-lang/ELC
57053*/
57054/*
57055 ,??????????????????????????
57056 ????????????????????????????
57057 ?????????????????????????????+
57058 ?????+++++++++++++++++++++++++
57059 ?????+++++++++++++++++++++++++
57060 ??????++++++++++++++++++++++++
57061 ?????++
57062 ?????+++
57063 ??????+++IIIIIIIIIIIIIIIIII
57064 ?????+++++IIIIIIIIIIIIIIIIII
57065 ?????++++++++++++++++++++++++
57066 ??????+++++++++++++++++++++++:
57067 ?????++
57068 ?????+++
57069 ??????++
57070 ??????????????????????????????II
57071 ??????????????????????????????IIII
57072 ,?????????????????????????????IIIII+
57073 =???++++++++++++++++++++++++++III?
57074 ?++++++++++++++++++++++++++++I+
57075*/
57076/*
57077APIs说明
57078elc依赖的基础函数.
57079调整这些,实现快速移植,快速优化与行为自定义.
57080*/
57081#if !defined(ELC_APIS_streams)
57082 #define ELC_APIS_streams
57083 #include <cuchar>
57084 #include <clocale>
57085 #include <cstdio>
57086 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/default_data_type.hpp"
57087//default_data_type.hpp
57088/*
57089未完成的elc解释器_share文件
57090由steve02081504与Alex0125设计、编写
57091转载时请在不对此文件做任何修改的同时注明出处
57092项目地址:https://github.com/ELC-lang/ELC
57093*/
57094/*
57095 ,??????????????????????????
57096 ????????????????????????????
57097 ?????????????????????????????+
57098 ?????+++++++++++++++++++++++++
57099 ?????+++++++++++++++++++++++++
57100 ??????++++++++++++++++++++++++
57101 ?????++
57102 ?????+++
57103 ??????+++IIIIIIIIIIIIIIIIII
57104 ?????+++++IIIIIIIIIIIIIIIIII
57105 ?????++++++++++++++++++++++++
57106 ??????+++++++++++++++++++++++:
57107 ?????++
57108 ?????+++
57109 ??????++
57110 ??????????????????????????????II
57111 ??????????????????????????????IIII
57112 ,?????????????????????????????IIIII+
57113 =???++++++++++++++++++++++++++III?
57114 ?++++++++++++++++++++++++++++I+
57115*/
57116namespace elc{
57117 /*ELC内部string统一采用char_t宽字符,使用setlocale(LC_ALL,"en_US.utf8")下的UTF编码。*/
57118 typedef char32_t char_t;
57119 /*c_string表示*/
57120 typedef char_t* string_ptr_t;
57121 /*c_string表示*/
57122 typedef const char_t* const_string_ptr_t;
57123 /*ELC内部钦定int_t类型*/
57124 typedef int64_t int_t;
57125 /*ELC内部钦定uint_t类型*/
57126 typedef uint64_t uint_t;
57127 /*ELC内部钦定float_t类型*/
57128 typedef double float_t;
57129 /*ELC内部钦定float_size_t类型,用以描述内存大小的浮点状况*/
57130 typedef long double float_size_t;
57131}
57132
57133//file_end
57134
57135 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57136 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
57137//_body.hpp
57138/*
57139未完成的elc解释器_share文件
57140由steve02081504与Alex0125设计、编写
57141转载时请在不对此文件做任何修改的同时注明出处
57142项目地址:https://github.com/ELC-lang/ELC
57143*/
57144/*
57145 ,??????????????????????????
57146 ????????????????????????????
57147 ?????????????????????????????+
57148 ?????+++++++++++++++++++++++++
57149 ?????+++++++++++++++++++++++++
57150 ??????++++++++++++++++++++++++
57151 ?????++
57152 ?????+++
57153 ??????+++IIIIIIIIIIIIIIIIII
57154 ?????+++++IIIIIIIIIIIIIIIIII
57155 ?????++++++++++++++++++++++++
57156 ??????+++++++++++++++++++++++:
57157 ?????++
57158 ?????+++
57159 ??????++
57160 ??????????????????????????????II
57161 ??????????????????????????????IIII
57162 ,?????????????????????????????IIIII+
57163 =???++++++++++++++++++++++++++III?
57164 ?++++++++++++++++++++++++++++I+
57165*/
57166/*
57167APIs说明
57168elc依赖的基础函数.
57169调整这些,实现快速移植,快速优化与行为自定义.
57170*/
57171#line 53 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/char_set/_body.hpp"
57172
57173//file_end
57174
57175 #line 41 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57176 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
57177//string
57178//at namespace ::
57179/*@
57180未完成的elc解释器include文件
57181由steve02081504与Alex0125设计、编写
57182转载时请在不对此文件做任何修改的同时注明出处
57183项目地址:https://github.com/ELC-lang/ELC
57184*/
57185/*
57186 ,??????????????????????????
57187 ????????????????????????????
57188 ?????????????????????????????+
57189 ?????+++++++++++++++++++++++++
57190 ?????+++++++++++++++++++++++++
57191 ??????++++++++++++++++++++++++
57192 ?????++
57193 ?????+++
57194 ??????+++IIIIIIIIIIIIIIIIII
57195 ?????+++++IIIIIIIIIIIIIIIIII
57196 ?????++++++++++++++++++++++++
57197 ??????+++++++++++++++++++++++:
57198 ?????++
57199 ?????+++
57200 ??????++
57201 ??????????????????????????????II
57202 ??????????????????????????????IIII
57203 ,?????????????????????????????IIIII+
57204 =???++++++++++++++++++++++++++III?
57205 ?++++++++++++++++++++++++++++I+
57206*/
57207#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
57208//pre_checks.hpp
57209/*
57210未完成的elc解释器_share文件
57211由steve02081504与Alex0125设计、编写
57212转载时请在不对此文件做任何修改的同时注明出处
57213项目地址:https://github.com/ELC-lang/ELC
57214*/
57215/*
57216 ,??????????????????????????
57217 ????????????????????????????
57218 ?????????????????????????????+
57219 ?????+++++++++++++++++++++++++
57220 ?????+++++++++++++++++++++++++
57221 ??????++++++++++++++++++++++++
57222 ?????++
57223 ?????+++
57224 ??????+++IIIIIIIIIIIIIIIIII
57225 ?????+++++IIIIIIIIIIIIIIIIII
57226 ?????++++++++++++++++++++++++
57227 ??????+++++++++++++++++++++++:
57228 ?????++
57229 ?????+++
57230 ??????++
57231 ??????????????????????????????II
57232 ??????????????????????????????IIII
57233 ,?????????????????????????????IIIII+
57234 =???++++++++++++++++++++++++++III?
57235 ?++++++++++++++++++++++++++++I+
57236*/
57237//__cplusplus needs 20+
57238#if !defined(__cplusplus)||__cplusplus<202002L
57239 //if msvc, check _MSVC_LANG
57240 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
57241 //ok
57242 #else
57243 #error "elc files needs c++20 or higher"
57244 #endif
57245#endif
57246
57247//check if the compiler is msvc
57248#if defined(_MSC_VER)
57249 //check if _CPPRTTI
57250 #if !defined(_CPPRTTI)
57251 #error "elc files needs rtti"
57252 #endif
57253 //check _MSC_VER at last 1932
57254 #if _MSC_VER<1932
57255 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
57256 #endif
57257#endif
57258
57259//file_end
57260
57261#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
57262#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
57263
57264//file_end
57265
57266 #line 42 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57267 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
57268//base_stream
57269//at namespace ::
57270/*@
57271未完成的elc解释器include文件
57272由steve02081504与Alex0125设计、编写
57273转载时请在不对此文件做任何修改的同时注明出处
57274项目地址:https://github.com/ELC-lang/ELC
57275*/
57276/*
57277 ,??????????????????????????
57278 ????????????????????????????
57279 ?????????????????????????????+
57280 ?????+++++++++++++++++++++++++
57281 ?????+++++++++++++++++++++++++
57282 ??????++++++++++++++++++++++++
57283 ?????++
57284 ?????+++
57285 ??????+++IIIIIIIIIIIIIIIIII
57286 ?????+++++IIIIIIIIIIIIIIIIII
57287 ?????++++++++++++++++++++++++
57288 ??????+++++++++++++++++++++++:
57289 ?????++
57290 ?????+++
57291 ??????++
57292 ??????????????????????????????II
57293 ??????????????????????????????IIII
57294 ,?????????????????????????????IIIII+
57295 =???++++++++++++++++++++++++++III?
57296 ?++++++++++++++++++++++++++++I+
57297*/
57298#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
57299//pre_checks.hpp
57300/*
57301未完成的elc解释器_share文件
57302由steve02081504与Alex0125设计、编写
57303转载时请在不对此文件做任何修改的同时注明出处
57304项目地址:https://github.com/ELC-lang/ELC
57305*/
57306/*
57307 ,??????????????????????????
57308 ????????????????????????????
57309 ?????????????????????????????+
57310 ?????+++++++++++++++++++++++++
57311 ?????+++++++++++++++++++++++++
57312 ??????++++++++++++++++++++++++
57313 ?????++
57314 ?????+++
57315 ??????+++IIIIIIIIIIIIIIIIII
57316 ?????+++++IIIIIIIIIIIIIIIIII
57317 ?????++++++++++++++++++++++++
57318 ??????+++++++++++++++++++++++:
57319 ?????++
57320 ?????+++
57321 ??????++
57322 ??????????????????????????????II
57323 ??????????????????????????????IIII
57324 ,?????????????????????????????IIIII+
57325 =???++++++++++++++++++++++++++III?
57326 ?++++++++++++++++++++++++++++I+
57327*/
57328//__cplusplus needs 20+
57329#if !defined(__cplusplus)||__cplusplus<202002L
57330 //if msvc, check _MSVC_LANG
57331 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
57332 //ok
57333 #else
57334 #error "elc files needs c++20 or higher"
57335 #endif
57336#endif
57337
57338//check if the compiler is msvc
57339#if defined(_MSC_VER)
57340 //check if _CPPRTTI
57341 #if !defined(_CPPRTTI)
57342 #error "elc files needs rtti"
57343 #endif
57344 //check _MSC_VER at last 1932
57345 #if _MSC_VER<1932
57346 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
57347 #endif
57348#endif
57349
57350//file_end
57351
57352#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
57353#line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/base_stream"
57354
57355//file_end
57356
57357 #line 43 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57358 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/decl_system_type.hpp"
57359//decl_system_type.hpp
57360/*
57361未完成的elc解释器_share文件
57362由steve02081504与Alex0125设计、编写
57363转载时请在不对此文件做任何修改的同时注明出处
57364项目地址:https://github.com/ELC-lang/ELC
57365*/
57366/*
57367 ,??????????????????????????
57368 ????????????????????????????
57369 ?????????????????????????????+
57370 ?????+++++++++++++++++++++++++
57371 ?????+++++++++++++++++++++++++
57372 ??????++++++++++++++++++++++++
57373 ?????++
57374 ?????+++
57375 ??????+++IIIIIIIIIIIIIIIIII
57376 ?????+++++IIIIIIIIIIIIIIIIII
57377 ?????++++++++++++++++++++++++
57378 ??????+++++++++++++++++++++++:
57379 ?????++
57380 ?????+++
57381 ??????++
57382 ??????????????????????????????II
57383 ??????????????????????????????IIII
57384 ,?????????????????????????????IIIII+
57385 =???++++++++++++++++++++++++++III?
57386 ?++++++++++++++++++++++++++++I+
57387*/
57388//copy&rewrite from steve02081504/steve.h
57389#define linux 2
57390#define windows 3
57391#define other 4
57392#if defined(__linux)||defined(__linux__)||defined(__gnu_linux__)
57393 #define SYSTEM_TYPE linux
57394#elif defined(_WIN32)||defined(__MINGW32__)||defined(__CYGWIN__)
57395 #define SYSTEM_TYPE windows
57396#else
57397 #define SYSTEM_TYPE other
57398#endif
57399#define ERROR_MSG_UNABLE_OS "Unable OS,edit this file on your own or contact ELC's producers."
57400
57401//file_end
57402
57403 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57404 #if SYSTEM_TYPE == linux
57405 #include <unistd.h>
57406 #include <termios.h>
57407 #elif SYSTEM_TYPE == windows
57408 #define NOMINMAX
57409 #include <Windows.h>
57410 #include <ConsoleApi.h>
57411 #else
57412 #error ERROR_MSG_UNABLE_OS
57413 #endif
57415 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
57416//_defs.hpp
57417/*
57418未完成的elc解释器_share文件
57419由steve02081504与Alex0125设计、编写
57420转载时请在不对此文件做任何修改的同时注明出处
57421项目地址:https://github.com/ELC-lang/ELC
57422*/
57423/*
57424 ,??????????????????????????
57425 ????????????????????????????
57426 ?????????????????????????????+
57427 ?????+++++++++++++++++++++++++
57428 ?????+++++++++++++++++++++++++
57429 ??????++++++++++++++++++++++++
57430 ?????++
57431 ?????+++
57432 ??????+++IIIIIIIIIIIIIIIIII
57433 ?????+++++IIIIIIIIIIIIIIIIII
57434 ?????++++++++++++++++++++++++
57435 ??????+++++++++++++++++++++++:
57436 ?????++
57437 ?????+++
57438 ??????++
57439 ??????????????????????????????II
57440 ??????????????????????????????IIII
57441 ,?????????????????????????????IIIII+
57442 =???++++++++++++++++++++++++++III?
57443 ?++++++++++++++++++++++++++++I+
57444*/
57445
57446//undefs at "_undefs.hpp"
57447
57448#if defined(ELC_CODE_REALM)
57449 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
57450#endif
57451
57452//set ELC_WARNING_LEVEL default to 4(max)
57453#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
57454
57455#if defined(_MSC_VER)
57456 #pragma warning(push,ELC_WARNING_LEVEL)
57457 #pragma warning(disable:4099)//class与struct混用警告diss
57458 #pragma warning(disable:4584)//重复子类警告diss
57459 #pragma warning(disable:4250)//域控制继承警告diss
57460 #pragma warning(disable:26432)//不完全默认方法警告diss
57461 #pragma warning(disable:26435)//virtual override方法警告diss
57462 #pragma warning(disable:26481)//容器安利diss
57463 #pragma warning(disable:26446)//gsl::at安利diss
57464 #pragma warning(disable:26434)//方法覆盖警告diss
57465 #pragma warning(disable:26429)//gsl::not_null安利diss
57466 #pragma warning(disable:26471)//对void*进行static_cast安利diss
57467 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
57468 #pragma warning(disable:26473)//相同指针显式cast警告diss
57469 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
57470 #pragma warning(disable:26485)//数组作指针警告diss
57471 #pragma warning(disable:26490)//reinterpret_cast警告diss
57472 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
57473 #pragma warning(disable:26482)//非常数数组索引警告diss
57474 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
57475#endif
57476#if defined(__GNUC__)
57477 #pragma GCC diagnostic push
57478 #pragma GCC diagnostic warning "-Wall"//开启所有警告
57479 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
57480#endif
57481#if defined(_MSC_VER)
57482 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
57483 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
57484 #define push_msvc_warning() __pragma(warning(push))
57485 #define pop_msvc_warning() __pragma(warning(pop))
57486 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
57487#else
57488 //#define suppress_msvc_warning(...)
57489 #define disable_msvc_warning(...)
57490 #define push_msvc_warning()
57491 #define pop_msvc_warning()
57492 #define push_and_disable_msvc_warning(...)
57493#endif
57494#if defined(_MSC_VER)
57495 //push pack settings
57496 #pragma pack(push)
57497 #pragma pack()
57498#endif
57499#if defined(_MSC_VER)
57500 //push and undef common macros
57501 #pragma push_macro("new")
57502 #undef new
57503 #pragma push_macro("delete")
57504 #undef delete
57505 #pragma push_macro("min")
57506 #undef min
57507 #pragma push_macro("max")
57508 #undef max
57509 #pragma push_macro("abs")
57510 #undef abs
57511 #pragma push_macro("export")
57512 #undef export
57513 #pragma push_macro("rand")
57514 #undef rand
57515 #pragma push_macro("sqrt")
57516 #undef sqrt
57517 #pragma push_macro("type_info")
57518 #undef type_info
57519 #pragma push_macro("elc")
57520 #undef elc
57521#endif
57522//
57523#if defined(ELC_VOID_NAME)
57524 #undef void
57525#endif
57526//
57527#if defined(ELC_PUBLIC_ALL)
57528 #define protected public
57529 #define private public
57530#endif
57531//
57532#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
57533 #undef rand
57534#endif
57535
57536// #define often_noexcept
57537#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
57538#define noexcept_as_auto MAGIC//哦现在有了
57539#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
57540#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
57541
57542#define using_method_from_base_t(name,...) \
57543template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
57544auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
57545{\
57546 return base_t::name(forward<Args>(rest)...);\
57547}\
57548
57549#define using_method_from_value(name,value_name,...) \
57550template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
57551auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
57552{\
57553 return value_name.name(forward<Args>(rest)...);\
57554}\
57555
57556#define floop while(__builtin_is_my_dick_still_there())
57557#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
57558#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
57559#if defined(_MSC_VER) && _MSC_VER>=1935
57560 //@see https://developercommunity.visualstudio.com/t/10193638
57561 #define enable_adl(name) template<typename=void>void name()noexcept=delete
57562#else
57563 #define enable_adl(name) void name()noexcept=delete
57564#endif
57565
57566#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
57567#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
57568
57569#define declvalue(...) (::std::declval<__VA_ARGS__>())
57570
57572#define template_error(reason) static_assert(template_error_helper<T>,reason)
57574#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
57576#define template_warning(reason) template_warning_helper<T>(reason)
57577
57578//for type_info
57579#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
57580#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
57581
57582#define is_common_attribute(name) public attribute<T,name<T>>
57583#define is_special_attribute(name) public attribute<T,name>
57584
57585#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
57586#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
57587
57588//for float_size_t
57589#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
57590//bitnum_of
57591#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
57592
57593//for attribute
57594#define def_common_attribute_with_nothing(name) \
57595template<typename T>\
57596class name{}\
57597
57598#define def_special_attribute_with_nothing(name) \
57599class name{}\
57600
57601#define common_attribute_t template<class>class
57602#define special_attribute_t class
57603
57612#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
57614#define enabled_by_default class enable_state=void
57616#define disabled_by_default class enable_state= ::std::enable_if_t<false>
57618#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
57620#define enable_flag class enable_state
57621
57622#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
57623#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
57624#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
57625#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
57626#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
57627
57629#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
57631#define get_recursive_λ_caller(name,...) \
57632exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
57633 return name(name,Args...);\
57634}
57636#define λ []
57638#define exλ [&]
57640#define λ_with_catch(...) [__VA_ARGS__]
57642#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
57643//recursive_λ_self_referential_reserved_symbolname
57644#define λ_RLSRRS _my_jb_super_sb_name_
57645
57646#if defined(_MSC_VER) && !defined(__clang__)
57647 #define λ_inline [[msvc::forceinline]]
57648 #define λ_force_inline [[msvc::forceinline]]
57649#elif
57650 #define λ_inline [[gnu::always_inline]]
57651 #define λ_force_inline [[gnu::always_inline]]
57652#else
57653 #define λ_inline
57654 #define λ_force_inline
57655#endif
57656
57657#define MAGIC//ahh,ko no tenno da!
57658
57660#define nothing
57661
57663#define elseif else if
57665#define _big_than_ >
57667#define _small_than_ <
57668
57669#if defined(_MSC_VER)
57670 #define not !
57671 #define and &&
57672 #define or ||
57673#endif
57674
57676#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
57678#define BREAK_NAMESPACE }
57679
57681#define template_name template
57683#define type_name class
57684
57685#if defined(DEBUG) || defined(_DEBUG)
57686 #define not_in_debug 0
57687 #define in_debug 1
57688#else
57689 #define not_in_debug 1
57690 #define in_debug 0
57691#endif
57692
57693#define es U""
57694#define ec(ch) U ## ch
57695
57696#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
57697 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
57698#else
57699 #define ELC_TEST_EVENTNAME(name)
57700#endif
57701
57702#define override_instance_struct \
57703protected:\
57704 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
57705 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
57706 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
57707 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
57708 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
57709
57710#if defined(_MSC_VER) && !defined(__clang__)
57711 #define distinctive __declspec(dllexport)
57712#else
57713 #define distinctive
57714#endif
57715
57716#if defined(_MSC_VER) && !defined(__clang__)
57717 #define force_inline __forceinline
57718#elif defined(__GNUC__) || defined(__clang__)
57719 #define force_inline __attribute__((always_inline)) inline
57720#else
57721 #define force_inline inline
57722#endif
57723
57724#if defined(_MSC_VER) && !defined(__clang__)
57725 #define with_no_vtable __declspec(novtable)
57726#else
57727 #define with_no_vtable
57728#endif
57729
57730#define in_consteval (::std::is_constant_evaluated())
57731
57732#define no_vtable_struct struct with_no_vtable
57733#define no_vtable_class class with_no_vtable
57734
57735//#define get_elc_defs using namespace ::elc::defs
57736
57737//file_end
57738
57739 #line 56 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
57740
57741 using namespace ::elc::defs;//get def
57742
57743 typedef
57744 #if SYSTEM_TYPE == windows
57745 HANDLE
57746 #elif SYSTEM_TYPE == linux
57747 int
57748 #endif
57750
57751 push_and_disable_msvc_warning(26475);//强制转换警告diss
57752 inline constexpr auto zero_base_handle = base_handle_type(0);
57754
57755 inline bool is_terminal_stream(base_handle_type handle)noexcept{
57756 #if SYSTEM_TYPE == windows
57757 return GetFileType(handle)==FILE_TYPE_CHAR;
57758 #elif SYSTEM_TYPE == linux
57759 return isatty(handle);
57760 #endif
57761 }
57762
57765 constexpr handle_type(base_handle_type handle)noexcept:_handle(handle){}
57766 constexpr handle_type()noexcept:handle_type(zero_base_handle){}
57767 constexpr handle_type(const handle_type&)=default;
57768 constexpr handle_type(handle_type&&)=default;
57769 constexpr handle_type&operator=(const handle_type&)=default;
57770 constexpr handle_type&operator=(handle_type&&)=default;
57771 constexpr operator base_handle_type()const noexcept{return _handle;}
57772 inline bool is_terminal()const noexcept{return is_terminal_stream(_handle);}
57773 explicit constexpr operator bool()const noexcept{return _handle;}
57774 };
57775
57776
57777 //定义基础类型
57778 //用配套的系统api可以从handle_type指代的文件流中读写的基础类型,越大越好
57779 typedef
57780 #if SYSTEM_TYPE == windows
57781 char16_t//windows下的wchar_t是utf-16,可以使用WriteConsoleW和ReadConsoleW从控制台的handle_type中读写
57782 #elif SYSTEM_TYPE == linux
57783 char//linux下的char是utf-8,可以使用write和read从控制台的handle_type中读写
57784 #endif
57786
57787 constexpr size_t code_convert_buf_size=
57788 #if SYSTEM_TYPE == windows
57789 char_set::utf32_to_utf16_code_size
57790 #elif SYSTEM_TYPE == linux
57791 char_set::utf32_to_utf8_code_size
57792 #endif
57793 ;
57794
57795 //初始化流
57797 auto aret=
57798 #if SYSTEM_TYPE == windows
57799 GetStdHandle(STD_OUTPUT_HANDLE);
57800 #elif SYSTEM_TYPE == linux
57801 STDOUT_FILENO;
57802 #endif
57803 return aret;
57804 }
57806 auto aret=
57807 #if SYSTEM_TYPE == windows
57808 GetStdHandle(STD_INPUT_HANDLE);
57809 #elif SYSTEM_TYPE == linux
57810 STDIN_FILENO;
57811 #endif
57812 return aret;
57813 }
57815 auto aret=
57816 #if SYSTEM_TYPE == windows
57817 GetStdHandle(STD_ERROR_HANDLE);
57818 #elif SYSTEM_TYPE == linux
57819 STDERR_FILENO;
57820 #endif
57821 return aret;
57822 }
57823
57824 //判断handle是否eof
57825 inline bool is_eof(handle_type stream)noexcept{
57826 #if SYSTEM_TYPE == windows
57827 push_and_disable_msvc_warning(6031);//返回值忽略警告diss
57828 ReadFile(stream, nullptr, 0, nullptr, nullptr);
57830 return GetLastError() == ERROR_HANDLE_EOF;
57831 #elif SYSTEM_TYPE == linux
57832 return feof(stream);
57833 #endif
57834 }
57835 //判断handle是否等待输入并没有待处理的输入
57836 inline bool is_wait_input(handle_type stream)noexcept{
57837 #if SYSTEM_TYPE == windows
57838 if(stream.is_terminal())
57839 return WaitForSingleObject(stream, 0) == WAIT_OBJECT_0;
57840 else
57841 return false;
57842 #elif SYSTEM_TYPE == linux
57843 return false;
57844 #endif
57845 }
57846
57847 //basic_read_impl
57848 inline size_t basic_read_impl(handle_type handle, void* buffer, size_t size)noexcept{
57849 #if SYSTEM_TYPE == windows
57850 DWORD read_count;
57851 push_and_disable_msvc_warning(6031);//返回值忽略警告diss
57852 ReadFile(handle, buffer,(DWORD)size, &read_count, nullptr);
57854 return read_count;
57855 #elif SYSTEM_TYPE == linux
57856 return read(handle, buffer, size);
57857 #endif
57858 }
57859 template<class char_T>
57860 force_inline size_t basic_read_impl(handle_type handle, char_T* buffer, size_t size)noexcept{
57861 return basic_read_impl(handle, (void*)buffer, size*sizeof(char_T))/sizeof(char_T);
57862 }
57863 //basic_write_impl
57864 inline size_t basic_write_impl(handle_type handle, const void* buffer, size_t size)noexcept{
57865 #if SYSTEM_TYPE == windows
57866 DWORD write_count;
57867 WriteFile(handle, buffer,(DWORD)size, &write_count, nullptr);
57868 return write_count;
57869 #elif SYSTEM_TYPE == linux
57870 return write(handle, buffer, size);
57871 #endif
57872 }
57873 template<class char_T>
57874 force_inline size_t basic_write_impl(handle_type handle, const char_T* buffer, size_t size)noexcept{
57875 return basic_write_impl(handle, (const void*)buffer, size*sizeof(char_T))/sizeof(char_T);
57876 }
57877 //由于windows的WriteFile不能正确处理终端io,特化终端io所需的impl of read/write
57878 //basic_read_for_terminal_impl
57879 inline size_t basic_read_for_terminal_impl(handle_type handle, base_io_char_type* buffer, size_t size)noexcept{
57880 #if SYSTEM_TYPE == windows
57881 DWORD read_count;
57882 push_and_disable_msvc_warning(6031);//返回值忽略警告diss
57883 ReadConsoleW(handle, buffer,(DWORD)size, &read_count, nullptr);
57885 return read_count;
57886 #elif SYSTEM_TYPE == linux
57887 return read(handle, buffer, size*sizeof(base_io_char_type))/sizeof(base_io_char_type);
57888 #endif
57889 }
57890 //basic_write_for_terminal_impl
57891 inline size_t basic_write_for_terminal_impl(handle_type handle, const base_io_char_type* buffer, size_t size)noexcept{
57892 #if SYSTEM_TYPE == windows
57893 DWORD write_count;
57894 WriteConsoleW(handle, buffer,(DWORD)size, &write_count, nullptr);
57895 return write_count;
57896 #elif SYSTEM_TYPE == linux
57897 return write(handle, buffer, size*sizeof(base_io_char_type))/sizeof(base_io_char_type);
57898 #endif
57899 }
57900 //basic_flush_impl
57901 inline void basic_flush_impl(handle_type handle)noexcept{
57902 #if SYSTEM_TYPE == windows
57903 FlushFileBuffers(handle);
57904 #elif SYSTEM_TYPE == linux
57905 fsync(handle);
57906 #endif
57907 }
57908 //basic_sync_impl
57909 inline void basic_sync_impl(handle_type handle)noexcept{
57910 #if SYSTEM_TYPE == windows
57911 FlushFileBuffers(handle);
57912 #elif SYSTEM_TYPE == linux
57913 fsync(handle);
57914 #endif
57915 }
57916 //basic_close_impl
57917 inline void basic_close_impl(handle_type handle)noexcept{
57918 #if SYSTEM_TYPE == windows
57919 CloseHandle(handle);
57920 #elif SYSTEM_TYPE == linux
57921 close(handle);
57922 #endif
57923 }
57924 //basic_tell_impl
57925 inline int_t basic_tell_impl(handle_type handle)noexcept{
57926 #if SYSTEM_TYPE == windows
57927 return SetFilePointer(handle, 0, nullptr, FILE_CURRENT);
57928 #elif SYSTEM_TYPE == linux
57929 return lseek(handle, 0, SEEK_CUR);
57930 #endif
57931 }
57932 //basic_seek_impl
57933 inline int_t basic_seek_impl(handle_type handle,int_t offset,stream_n::seek_type type)noexcept{
57934 auto under_type =
57935 #if SYSTEM_TYPE == windows
57936 FILE_BEGIN
57937 #elif SYSTEM_TYPE == linux
57938 SEEK_SET
57939 #endif
57940 ;
57941 using namespace stream_n;
57942 switch(type){//{beg,end,cur};
57943 case beg:
57944 #if SYSTEM_TYPE == windows
57945 under_type = FILE_BEGIN;
57946 #elif SYSTEM_TYPE == linux
57947 under_type = SEEK_SET;
57948 #endif
57949 break;
57950 case end:
57951 #if SYSTEM_TYPE == windows
57952 under_type = FILE_END;
57953 #elif SYSTEM_TYPE == linux
57954 under_type = SEEK_END;
57955 #endif
57956 break;
57957 case cur:
57958 #if SYSTEM_TYPE == windows
57959 under_type = FILE_CURRENT;
57960 #elif SYSTEM_TYPE == linux
57961 under_type = SEEK_CUR;
57962 #endif
57963 break;
57964 }
57965 #if SYSTEM_TYPE == windows
57966 SetFilePointer(handle,(LONG)offset, nullptr, under_type);
57967 return basic_tell_impl(handle);
57968 #elif SYSTEM_TYPE == linux
57969 return lseek(handle, offset, under_type);
57970 #endif
57971 }
57972 //before_terminal_read
57974 //GetConsoleMode if LINE_INPUT_MODE
57975 #if SYSTEM_TYPE == windows
57976 DWORD ConsoleModeBackup;
57977 GetConsoleMode(stream, &ConsoleModeBackup);
57978 //disable line input mode
57979 SetConsoleMode(stream, ConsoleModeBackup & ~ENABLE_LINE_INPUT);
57980 return ConsoleModeBackup;
57981 #elif SYSTEM_TYPE == linux
57982 //no echo and disable line input mode
57983 termios oldt;
57984 tcgetattr(stream, &oldt);
57985 {
57986 auto flgbak = oldt.c_lflag;
57987 oldt.c_lflag &= ~(ECHO | ICANON);
57988 tcsetattr(stream, TCSANOW, &oldt);
57989 oldt.c_lflag = flgbak;
57990 }
57991 return oldt;
57992 #endif
57993 }
57994 //after_terminal_read
57995 force_inline void after_terminal_read(handle_type stream,auto something)noexcept{
57996 #if SYSTEM_TYPE == windows
57997 SetConsoleMode(stream, something);
57998 #elif SYSTEM_TYPE == linux
57999 tcsetattr(stream, TCSANOW, &something);
58000 #endif
58001 }
58002 //before_terminal_write
58004 //GetConsoleMode if LINE_INPUT_MODE
58005 #if SYSTEM_TYPE == windows
58006 DWORD ConsoleModeBackup;
58007 GetConsoleMode(stream, &ConsoleModeBackup);
58008 //enable ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT ENABLE_VIRTUAL_TERMINAL_PROCESSING
58009 SetConsoleMode(stream, ConsoleModeBackup | ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
58010 return ConsoleModeBackup;
58011 #elif SYSTEM_TYPE == linux
58012 //nothing to do
58013 return 0;
58014 #endif
58015 }
58016 //after_terminal_write
58017 force_inline void after_terminal_write(handle_type stream,auto something)noexcept{
58018 #if SYSTEM_TYPE == windows
58019 SetConsoleMode(stream, something);
58020 #elif SYSTEM_TYPE == linux
58021 //nothing to do
58022 #endif
58023 }
58024
58025 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
58026//_undefs.hpp
58027/*
58028未完成的elc解释器_share文件
58029由steve02081504与Alex0125设计、编写
58030转载时请在不对此文件做任何修改的同时注明出处
58031项目地址:https://github.com/ELC-lang/ELC
58032*/
58033/*
58034 ,??????????????????????????
58035 ????????????????????????????
58036 ?????????????????????????????+
58037 ?????+++++++++++++++++++++++++
58038 ?????+++++++++++++++++++++++++
58039 ??????++++++++++++++++++++++++
58040 ?????++
58041 ?????+++
58042 ??????+++IIIIIIIIIIIIIIIIII
58043 ?????+++++IIIIIIIIIIIIIIIIII
58044 ?????++++++++++++++++++++++++
58045 ??????+++++++++++++++++++++++:
58046 ?????++
58047 ?????+++
58048 ??????++
58049 ??????????????????????????????II
58050 ??????????????????????????????IIII
58051 ,?????????????????????????????IIIII+
58052 =???++++++++++++++++++++++++++III?
58053 ?++++++++++++++++++++++++++++I+
58054*/
58055
58056//defs at "_defs.hpp"
58057
58058#if defined(_MSC_VER)
58059 #pragma warning(pop)
58060#endif
58061//#undef suppress_msvc_warning
58062#undef disable_msvc_warning
58063#undef push_msvc_warning
58064#undef pop_msvc_warning
58065#undef push_and_disable_msvc_warning
58066#if defined(_MSC_VER)
58067 #pragma pack(pop)
58068#endif
58069#if defined(__GNUC__)
58070 #pragma GCC diagnostic pop
58071#endif
58072#if defined(_MSC_VER)
58073 #pragma pop_macro("new")
58074 #pragma pop_macro("delete")
58075 #pragma pop_macro("min")
58076 #pragma pop_macro("max")
58077 #pragma pop_macro("abs")
58078 #pragma pop_macro("export")
58079 #pragma pop_macro("rand")
58080 #pragma pop_macro("sqrt")
58081 #pragma pop_macro("type_info")
58082 #pragma pop_macro("elc")
58083#endif
58084
58085//
58086#if defined(ELC_VOID_NAME)
58087 #define void the_void
58088#endif
58089//
58090#if defined(ELC_PUBLIC_ALL)
58091 #undef protected
58092 #undef private
58093#endif
58094//
58095#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
58096 #define rand the_rand
58097#endif
58098
58099// #undef often_noexcept
58100#undef noexcept_as
58101#undef noexcept_as_auto
58102#undef constexpr_as
58103#undef constexpr_as_auto
58104
58105#undef using_method_from_base_t
58106#undef using_method_from_value
58107
58108#undef floop
58109#undef times
58110#undef debug_times
58111#undef enable_adl
58112
58113#undef re_declvalue
58114#undef re_decltype
58115
58116#undef declvalue
58117
58118#undef template_error
58119#undef template_error_of_type
58120#undef template_warning
58121
58122#undef type_info_of
58123#undef type_name_of
58124
58125#undef is_common_attribute
58126#undef is_special_attribute
58127
58128#undef has_attribute
58129#undef not_has_attribute
58130
58131#undef float_size_of
58132#undef bitnum_of
58133
58134#undef def_common_attribute_with_nothing
58135#undef def_special_attribute_with_nothing
58136
58137#undef common_attribute_t
58138#undef special_attribute_t
58139
58140#undef enable_if
58141#undef enabled_by_default
58142#undef disabled_by_default
58143#undef enable_if_not_ill_form
58144#undef enable_flag
58145
58146#undef was_an_ill_form
58147#undef was_an_ill_form_with_parameter
58148#undef was_not_an_ill_form
58149#undef was_not_an_ill_form_and_noexcept
58150#undef was_not_an_ill_form_with_parameter
58151
58152#undef recursive_λ
58153#undef get_recursive_λ_caller
58154#undef λ
58155#undef exλ
58156#undef λ_with_catch
58157#undef self_recursion
58158#undef λ_RLSRRS
58159#undef λ_inline
58160#undef λ_force_inline
58161
58162#undef MAGIC
58163
58164#undef nothing
58165
58166#undef elseif
58167#undef _big_than_
58168#undef _small_than_
58169
58170#if defined(_MSC_VER)
58171 #undef not
58172 #undef and
58173 #undef or
58174#endif
58175
58176#undef INTER_NAMESPACE
58177#undef BREAK_NAMESPACE
58178
58179#undef szie
58180#undef form
58181
58182#undef template_name
58183#undef type_name
58184
58185#undef not_in_debug
58186
58187#undef es
58188#undef ec
58189
58190#undef ELC_TEST_EVENTNAME
58191
58192#undef override_instance_struct
58193
58194#undef distinctive
58195
58196#undef force_inline
58197
58198#undef with_no_vtable
58199
58200#undef in_consteval
58201
58202#undef no_vtable_struct
58203#undef no_vtable_class
58204
58205//#undef get_elc_defs
58206
58207//file_end
58208
58209 #line 342 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
58210 }
58211 //
58212 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/_tools/undef_decl_system_type.hpp"
58213//undef_decl_system_type.hpp
58214/*
58215未完成的elc解释器_share文件
58216由steve02081504与Alex0125设计、编写
58217转载时请在不对此文件做任何修改的同时注明出处
58218项目地址:https://github.com/ELC-lang/ELC
58219*/
58220/*
58221 ,??????????????????????????
58222 ????????????????????????????
58223 ?????????????????????????????+
58224 ?????+++++++++++++++++++++++++
58225 ?????+++++++++++++++++++++++++
58226 ??????++++++++++++++++++++++++
58227 ?????++
58228 ?????+++
58229 ??????+++IIIIIIIIIIIIIIIIII
58230 ?????+++++IIIIIIIIIIIIIIIIII
58231 ?????++++++++++++++++++++++++
58232 ??????+++++++++++++++++++++++:
58233 ?????++
58234 ?????+++
58235 ??????++
58236 ??????????????????????????????II
58237 ??????????????????????????????IIII
58238 ,?????????????????????????????IIIII+
58239 =???++++++++++++++++++++++++++III?
58240 ?++++++++++++++++++++++++++++I+
58241*/
58242//copy&rewrite from steve02081504/evest.h
58243#undef linux
58244#undef windows
58245#undef other
58246#undef SYSTEM_TYPE
58247#undef ERROR_MSG_UNABLE_OS
58248
58249//file_end
58250
58251 #line 345 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/APIs/streams.hpp"
58252#endif
58253
58254//file_end
58255
58256#line 34 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
58257namespace elc::defs{
58258 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
58259//_defs.hpp
58260/*
58261未完成的elc解释器basic文件
58262由steve02081504与Alex0125设计、编写
58263转载时请在不对此文件做任何修改的同时注明出处
58264项目地址:https://github.com/ELC-lang/ELC
58265*/
58266/*
58267 ,??????????????????????????
58268 ????????????????????????????
58269 ?????????????????????????????+
58270 ?????+++++++++++++++++++++++++
58271 ?????+++++++++++++++++++++++++
58272 ??????++++++++++++++++++++++++
58273 ?????++
58274 ?????+++
58275 ??????+++IIIIIIIIIIIIIIIIII
58276 ?????+++++IIIIIIIIIIIIIIIIII
58277 ?????++++++++++++++++++++++++
58278 ??????+++++++++++++++++++++++:
58279 ?????++
58280 ?????+++
58281 ??????++
58282 ??????????????????????????????II
58283 ??????????????????????????????IIII
58284 ,?????????????????????????????IIIII+
58285 =???++++++++++++++++++++++++++III?
58286 ?++++++++++++++++++++++++++++I+
58287*/
58288#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
58289//_defs.hpp
58290/*
58291未完成的elc解释器_share文件
58292由steve02081504与Alex0125设计、编写
58293转载时请在不对此文件做任何修改的同时注明出处
58294项目地址:https://github.com/ELC-lang/ELC
58295*/
58296/*
58297 ,??????????????????????????
58298 ????????????????????????????
58299 ?????????????????????????????+
58300 ?????+++++++++++++++++++++++++
58301 ?????+++++++++++++++++++++++++
58302 ??????++++++++++++++++++++++++
58303 ?????++
58304 ?????+++
58305 ??????+++IIIIIIIIIIIIIIIIII
58306 ?????+++++IIIIIIIIIIIIIIIIII
58307 ?????++++++++++++++++++++++++
58308 ??????+++++++++++++++++++++++:
58309 ?????++
58310 ?????+++
58311 ??????++
58312 ??????????????????????????????II
58313 ??????????????????????????????IIII
58314 ,?????????????????????????????IIIII+
58315 =???++++++++++++++++++++++++++III?
58316 ?++++++++++++++++++++++++++++I+
58317*/
58318
58319//undefs at "_undefs.hpp"
58320
58321#if defined(ELC_CODE_REALM)
58322 #error "include <elc/code_realm> after any other elc headers then u can get all the stuffs in your code space!"
58323#endif
58324
58325//set ELC_WARNING_LEVEL default to 4(max)
58326#line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_defs.hpp"
58327
58328#if defined(_MSC_VER)
58329 #pragma warning(push,ELC_WARNING_LEVEL)
58330 #pragma warning(disable:4099)//class与struct混用警告diss
58331 #pragma warning(disable:4584)//重复子类警告diss
58332 #pragma warning(disable:4250)//域控制继承警告diss
58333 #pragma warning(disable:26432)//不完全默认方法警告diss
58334 #pragma warning(disable:26435)//virtual override方法警告diss
58335 #pragma warning(disable:26481)//容器安利diss
58336 #pragma warning(disable:26446)//gsl::at安利diss
58337 #pragma warning(disable:26434)//方法覆盖警告diss
58338 #pragma warning(disable:26429)//gsl::not_null安利diss
58339 #pragma warning(disable:26471)//对void*进行static_cast安利diss
58340 #pragma warning(disable:26474)//隐式指针转换显式cast警告diss
58341 #pragma warning(disable:26473)//相同指针显式cast警告diss
58342 #pragma warning(disable:26456)//隐藏非虚运算符警告diss
58343 #pragma warning(disable:26485)//数组作指针警告diss
58344 #pragma warning(disable:26490)//reinterpret_cast警告diss
58345 #pragma warning(disable:26472)//static_cast窄幅转换警告diss
58346 #pragma warning(disable:26482)//非常数数组索引警告diss
58347 #pragma warning(disable:26493)//c_cast转换警告diss:虽然有用但是太烦了,爬
58348#endif
58349#if defined(__GNUC__)
58350 #pragma GCC diagnostic push
58351 #pragma GCC diagnostic warning "-Wall"//开启所有警告
58352 #pragma GCC diagnostic ignored "-Wmissing-template-keyword"//忽略模板警告
58353#endif
58354#if defined(_MSC_VER)
58355 //#define suppress_msvc_warning(...) __pragma(warning(suppress:__VA_ARGS__)) //不再使用因为其不确定的作用域
58356 #define disable_msvc_warning(...) __pragma(warning(disable:__VA_ARGS__))
58357 #define push_msvc_warning() __pragma(warning(push))
58358 #define pop_msvc_warning() __pragma(warning(pop))
58359 #define push_and_disable_msvc_warning(...) push_msvc_warning() disable_msvc_warning(__VA_ARGS__)
58360#else
58361 //#define suppress_msvc_warning(...)
58362 #define disable_msvc_warning(...)
58363 #define push_msvc_warning()
58364 #define pop_msvc_warning()
58365 #define push_and_disable_msvc_warning(...)
58366#endif
58367#if defined(_MSC_VER)
58368 //push pack settings
58369 #pragma pack(push)
58370 #pragma pack()
58371#endif
58372#if defined(_MSC_VER)
58373 //push and undef common macros
58374 #pragma push_macro("new")
58375 #undef new
58376 #pragma push_macro("delete")
58377 #undef delete
58378 #pragma push_macro("min")
58379 #undef min
58380 #pragma push_macro("max")
58381 #undef max
58382 #pragma push_macro("abs")
58383 #undef abs
58384 #pragma push_macro("export")
58385 #undef export
58386 #pragma push_macro("rand")
58387 #undef rand
58388 #pragma push_macro("sqrt")
58389 #undef sqrt
58390 #pragma push_macro("type_info")
58391 #undef type_info
58392 #pragma push_macro("elc")
58393 #undef elc
58394#endif
58395//
58396#if defined(ELC_VOID_NAME)
58397 #undef void
58398#endif
58399//
58400#if defined(ELC_PUBLIC_ALL)
58401 #define protected public
58402 #define private public
58403#endif
58404//
58405#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
58406 #undef rand
58407#endif
58408
58409// #define often_noexcept
58410#define noexcept_as(...) noexcept(noexcept((__VA_ARGS__)))//dnmd C艹标准就是没有noexcept_as_auto
58411#define noexcept_as_auto MAGIC//哦现在有了
58412#define constexpr_as(...) MAGIC constexpr//( •̀ ω •́ )✌
58413#define constexpr_as_auto MAGIC MAGIC constexpr//✌( •̀ ω •́ )✌
58414
58415#define using_method_from_base_t(name,...) \
58416template<class...Args> requires was_not_an_ill_form(declvalue(base_t).name(declvalue(Args)...))\
58417auto name(Args&&...rest)__VA_ARGS__ noexcept_as(base_t::name(declvalue(Args)...))\
58418{\
58419 return base_t::name(forward<Args>(rest)...);\
58420}\
58421
58422#define using_method_from_value(name,value_name,...) \
58423template<class...Args> requires was_not_an_ill_form(re_declvalue(value_name).name(declvalue(Args)...))\
58424auto name(Args&&...rest)__VA_ARGS__ noexcept_as(re_declvalue(value_name).name(declvalue(Args)...))\
58425{\
58426 return value_name.name(forward<Args>(rest)...);\
58427}\
58428
58429#define floop while(__builtin_is_my_dick_still_there())
58430#define times(...) ([[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t(__VA_ARGS__)) //for times(72)do_something;
58431#define debug_times(...) (debug_timer_t timer;[[maybe_unused]]auto [loop_times,loop_end_value] : ::elc::defs::times_provider_t((timer.reset(),(__VA_ARGS__)))) //for times(72)do_something;
58432#if defined(_MSC_VER) && _MSC_VER>=1935
58433 //@see https://developercommunity.visualstudio.com/t/10193638
58434 #define enable_adl(name) template<typename=void>void name()noexcept=delete
58435#else
58436 #define enable_adl(name) void name()noexcept=delete
58437#endif
58438
58439#define re_declvalue(...) (declvalue(decltype(__VA_ARGS__)))
58440#define re_decltype(...) (decltype(declvalue(__VA_ARGS__)))
58441
58442#define declvalue(...) (::std::declval<__VA_ARGS__>())
58443
58445#define template_error(reason) static_assert(template_error_helper<T>,reason)
58447#define template_error_of_type(type,reason) static_assert(template_error_helper<type>,reason)
58449#define template_warning(reason) template_warning_helper<T>(reason)
58450
58451//for type_info
58452#define type_info_of(...) base_type_info_t(typeid(__VA_ARGS__))
58453#define type_name_of(...) (type_info_of(__VA_ARGS__).get_name())
58454
58455#define is_common_attribute(name) public attribute<T,name<T>>
58456#define is_special_attribute(name) public attribute<T,name>
58457
58458#define has_attribute(...) template_name has_attribute_helper<__VA_ARGS__>()
58459#define not_has_attribute(...) template_name not_has_has_attribute_helper<__VA_ARGS__>()
58460
58461//for float_size_t
58462#define float_size_of(...) (float_size_t{sizeof(__VA_ARGS__)})
58463//bitnum_of
58464#define bitnum_of(...) (sizeof(__VA_ARGS__)*CHAR_BIT)
58465
58466//for attribute
58467#define def_common_attribute_with_nothing(name) \
58468template<typename T>\
58469class name{}\
58470
58471#define def_special_attribute_with_nothing(name) \
58472class name{}\
58473
58474#define common_attribute_t template<class>class
58475#define special_attribute_t class
58476
58485#define enable_if(...) class enable_state= ::std::enable_if_t<__VA_ARGS__>
58487#define enabled_by_default class enable_state=void
58489#define disabled_by_default class enable_state= ::std::enable_if_t<false>
58491#define enable_if_not_ill_form(...) class enable_state= ::std::void_t<decltype(__VA_ARGS__)>
58493#define enable_flag class enable_state
58494
58495#define was_an_ill_form(...) (!was_not_an_ill_form(__VA_ARGS__))
58496#define was_an_ill_form_with_parameter(...) (!was_not_an_ill_form_with_parameter(__VA_ARGS__))
58497#define was_not_an_ill_form(...) (bool(requires{__VA_ARGS__;}))
58498#define was_not_an_ill_form_and_noexcept(...) (bool(requires{__VA_ARGS__;{__VA_ARGS__}noexcept;}))
58499#define was_not_an_ill_form_with_parameter(...) (bool(requires __VA_ARGS__ ))
58500
58502#define recursive_λ(...) λ(auto&&λ_RLSRRS,__VA_ARGS__)
58504#define get_recursive_λ_caller(name,...) \
58505exλ(auto&&...Args)__VA_ARGS__ λ_force_inline{\
58506 return name(name,Args...);\
58507}
58509#define λ []
58511#define exλ [&]
58513#define λ_with_catch(...) [__VA_ARGS__]
58515#define self_recursion(...) λ_RLSRRS(λ_RLSRRS,__VA_ARGS__)
58516//recursive_λ_self_referential_reserved_symbolname
58517#define λ_RLSRRS _my_jb_super_sb_name_
58518
58519#if defined(_MSC_VER) && !defined(__clang__)
58520 #define λ_inline [[msvc::forceinline]]
58521 #define λ_force_inline [[msvc::forceinline]]
58522#elif
58523 #define λ_inline [[gnu::always_inline]]
58524 #define λ_force_inline [[gnu::always_inline]]
58525#else
58526 #define λ_inline
58527 #define λ_force_inline
58528#endif
58529
58530#define MAGIC//ahh,ko no tenno da!
58531
58533#define nothing
58534
58536#define elseif else if
58538#define _big_than_ >
58540#define _small_than_ <
58541
58542#if defined(_MSC_VER)
58543 #define not !
58544 #define and &&
58545 #define or ||
58546#endif
58547
58549#define INTER_NAMESPACE(NAMESPACENAME) namespace NAMESPACENAME{
58551#define BREAK_NAMESPACE }
58552
58554#define template_name template
58556#define type_name class
58557
58558#if defined(DEBUG) || defined(_DEBUG)
58559 #define not_in_debug 0
58560 #define in_debug 1
58561#else
58562 #define not_in_debug 1
58563 #define in_debug 0
58564#endif
58565
58566#define es U""
58567#define ec(ch) U ## ch
58568
58569#if defined(ELC_TEST_ON)||defined(ELC_TEST_CHECK_MEMORY_LACK)
58570 #define ELC_TEST_EVENTNAME(name) stest_eventer _the_stest_eventer__(L""name)
58571#else
58572 #define ELC_TEST_EVENTNAME(name)
58573#endif
58574
58575#define override_instance_struct \
58576protected:\
58577 virtual void abstract_method_unget_this()noexcept_as(instance_struct<this_t>::abstract_method_unget_this())override{instance_struct<this_t>::abstract_method_unget_this();}\
58578 virtual void* _abstract_method_copy_get_this()noexcept_as(instance_struct<this_t>::_abstract_method_copy_get_this())override{return instance_struct<this_t>::_abstract_method_copy_get_this();}\
58579 virtual void* _abstract_method_get_resize_this(size_t size)noexcept_as(instance_struct<this_t>::instance_struct<this_t>::_abstract_method_get_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_resize_this(size);}\
58580 virtual void* _abstract_method_get_forward_resize_this(size_t size)noexcept_as(instance_struct<this_t>::_abstract_method_get_forward_resize_this(size))override{return instance_struct<this_t>::_abstract_method_get_forward_resize_this(size);}\
58581 virtual size_t abstract_method_get_size_of_get_for_this()noexcept override{return instance_struct<this_t>::abstract_method_get_size_of_get_for_this();}
58582
58583#if defined(_MSC_VER) && !defined(__clang__)
58584 #define distinctive __declspec(dllexport)
58585#else
58586 #define distinctive
58587#endif
58588
58589#if defined(_MSC_VER) && !defined(__clang__)
58590 #define force_inline __forceinline
58591#elif defined(__GNUC__) || defined(__clang__)
58592 #define force_inline __attribute__((always_inline)) inline
58593#else
58594 #define force_inline inline
58595#endif
58596
58597#if defined(_MSC_VER) && !defined(__clang__)
58598 #define with_no_vtable __declspec(novtable)
58599#else
58600 #define with_no_vtable
58601#endif
58602
58603#define in_consteval (::std::is_constant_evaluated())
58604
58605#define no_vtable_struct struct with_no_vtable
58606#define no_vtable_class class with_no_vtable
58607
58608//#define get_elc_defs using namespace ::elc::defs
58609
58610//file_end
58611
58612#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_defs.hpp"
58613
58614//file_end
58615
58616 #line 36 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
58617
58618 namespace stream_n{
58619 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/base_fstream/_body.hpp"
58620//_body.hpp
58621//at namespace elc::defs::stream_n
58622/*
58623未完成的elc解释器stream文件
58624由steve02081504与Alex0125设计、编写
58625转载时请在不对此文件做任何修改的同时注明出处
58626项目地址:https://github.com/ELC-lang/ELC
58627*/
58628/*
58629 ,??????????????????????????
58630 ????????????????????????????
58631 ?????????????????????????????+
58632 ?????+++++++++++++++++++++++++
58633 ?????+++++++++++++++++++++++++
58634 ??????++++++++++++++++++++++++
58635 ?????++
58636 ?????+++
58637 ??????+++IIIIIIIIIIIIIIIIII
58638 ?????+++++IIIIIIIIIIIIIIIIII
58639 ?????++++++++++++++++++++++++
58640 ??????+++++++++++++++++++++++:
58641 ?????++
58642 ?????+++
58643 ??????++
58644 ??????????????????????????????II
58645 ??????????????????????????????IIII
58646 ,?????????????????????????????IIIII+
58647 =???++++++++++++++++++++++++++III?
58648 ?++++++++++++++++++++++++++++I+
58649*/
58650namespace base_fstream_n{
58651 using namespace elc::APIs::streams;
58653
58654 struct base_frefstream:virtual noexcept_stream_t,instance_struct<base_frefstream>{
58655 protected:
58657 public:
58658 explicit base_frefstream(handle_t file)noexcept:_file(file){}
58659 virtual int_t seek(seek_type dir,int_t off)noexcept override{
58660 return basic_seek_impl(_file,off,dir);
58661 }
58662 virtual int_t tell()noexcept override{
58663 return basic_tell_impl(_file);
58664 }
58665 virtual bool seek_to(int_t pos)noexcept override{
58666 return basic_seek_impl(_file,pos,seek_type::beg)==pos;
58667 }
58668 virtual void sync()noexcept override{
58669 basic_sync_impl(_file);
58670 }
58671 virtual void flush()noexcept override{
58672 basic_flush_impl(_file);
58673 }
58674 virtual void close()noexcept override{
58675 basic_close_impl(_file);
58676 }
58677 //fried get_handle_from
58679 return stream._file;
58680 }
58681 };
58682 struct base_fstream:base_frefstream,instance_struct<base_fstream>{
58683 private:
58684 typedef base_frefstream base_t;
58685 typedef base_fstream this_t;
58687 public:
58688 using base_t::base_t;
58689
58690 virtual ~base_fstream()noexcept override{
58691 if(base_t::_file)
58692 base_t::close();
58693 }
58694 };
58695 template<class char_T,class base_fstream_T>
58696 struct base_not_unreadable_text_ifstream_wrapper:base_fstream_T,virtual noexcept_not_unreadable_text_istream_t<char_T>,instance_struct<base_not_unreadable_text_ifstream_wrapper<char_T,base_fstream_T>>{
58697 private:
58698 typedef base_fstream_T base_t;
58701 public:
58702 using base_t::base_t;
58703 typedef char_T char_type;
58704
58705 virtual size_t read(char_T*buf,size_t size)noexcept override{
58706 return basic_read_impl(base_t::_file,buf,size);
58707 }
58708 virtual bool is_end()noexcept override{
58709 return is_eof(base_t::_file);
58710 }
58711 virtual bool waitting_for_data()noexcept override{
58712 return is_wait_input(base_t::_file);
58713 }
58714 };
58715 template<class char_T,class base_fstream_T>
58717 template<class char_T,class base_fstream_T>
58718 struct base_text_ofstream_wrapper:base_fstream_T,virtual noexcept_text_ostream_t<char_T>,instance_struct<base_text_ofstream_wrapper<char_T,base_fstream_T>>{
58719 private:
58720 typedef base_fstream_T base_t;
58723
58724 using base_t::_file;
58725 public:
58726 using base_t::base_t;
58727
58728 virtual void write(const char_T*buf,size_t size)noexcept override{
58729 const auto var=before_terminal_write(_file);
58730 basic_write_impl(_file,buf,size);
58731 after_terminal_write(_file,var);
58732 }
58733 };
58734
58735 template<class char_T>
58737 template<class char_T>
58739 template<class char_T>
58741 template<class char_T>
58743
58744 struct system_terminal_irefstream:base_text_irefstream<base_io_char_type>,instance_struct<system_terminal_irefstream>{
58745 private:
58749
58750 using base_t::_file;
58751 protected:
58752 virtual size_t base_read_impl_for_wrapper(base_io_char_type*buf,size_t size)noexcept override{
58753 const auto var=before_terminal_read(_file);
58754 const auto result=basic_read_for_terminal_impl(_file,buf,size);
58755 after_terminal_read(_file,var);
58756 return result;
58757 }
58758 public:
58759 using base_t::base_t;
58760 };
58761 struct system_terminal_orefstream:base_text_orefstream<base_io_char_type>,instance_struct<system_terminal_orefstream>{
58762 private:
58766 protected:
58767 //ofstream没有缓冲区,所以覆写原有的write
58768 virtual void write(const base_io_char_type*buf,size_t size)noexcept override{
58769 basic_write_for_terminal_impl(base_t::_file,buf,size);
58770 }
58771 public:
58772 using base_t::base_t;
58773 };
58774}
58775
58776//file_end
58777
58778 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
58779 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/defs.hpp"
58780//defs.hpp
58781//at namespace elc::defs::stream_n
58782/*
58783未完成的elc解释器stream文件
58784由steve02081504与Alex0125设计、编写
58785转载时请在不对此文件做任何修改的同时注明出处
58786项目地址:https://github.com/ELC-lang/ELC
58787*/
58788/*
58789 ,??????????????????????????
58790 ????????????????????????????
58791 ?????????????????????????????+
58792 ?????+++++++++++++++++++++++++
58793 ?????+++++++++++++++++++++++++
58794 ??????++++++++++++++++++++++++
58795 ?????++
58796 ?????+++
58797 ??????+++IIIIIIIIIIIIIIIIII
58798 ?????+++++IIIIIIIIIIIIIIIIII
58799 ?????++++++++++++++++++++++++
58800 ??????+++++++++++++++++++++++:
58801 ?????++
58802 ?????+++
58803 ??????++
58804 ??????????????????????????????II
58805 ??????????????????????????????IIII
58806 ,?????????????????????????????IIIII+
58807 =???++++++++++++++++++++++++++III?
58808 ?++++++++++++++++++++++++++++I+
58809*/
58810namespace base_streams_impl_n{
58811 using namespace elc::APIs::streams;
58812 using namespace base_fstream_n;
58813
58814 #define inheriting_base_stream_operations_from(expr) \
58815 \
58816 virtual int_t seek(seek_type dir,int_t off)noexcept override{\
58817 return (expr).seek(dir,off);\
58818 }\
58819 virtual int_t tell()noexcept override{\
58820 return (expr).tell();\
58821 }\
58822 virtual bool seek_to(int_t pos)noexcept override{\
58823 return (expr).seek_to(pos);\
58824 }\
58825 virtual void sync()noexcept override{\
58826 (expr).sync();\
58827 }\
58828 virtual void flush()noexcept override{\
58829 (expr).flush();\
58830 }\
58831 virtual void close()noexcept override{\
58832 (expr).close();\
58833 }\
58834
58835 #define inheriting_base_stream_operations_from_pointer(ptr) \
58836 inheriting_base_stream_operations_from(*ptr)
58837
58838 #define inheriting_istream_operations_from(expr) \
58839 inheriting_base_stream_operations_from(expr)\
58840 \
58841 virtual bool is_end()noexcept override{\
58842 return (expr).is_end();\
58843 }\
58844 virtual bool waitting_for_data()noexcept override{\
58845 return (expr).waitting_for_data();\
58846 }\
58847 virtual size_t read(char_t*buf,size_t size)noexcept override{\
58848 return (expr).read(buf,size);\
58849 }\
58850 virtual void unread(const char_t*buf,size_t size)noexcept override{\
58851 (expr).unread(buf,size);\
58852 }\
58853 virtual explicit operator bool()noexcept override{\
58854 return (expr).operator bool();\
58855 }\
58856
58857 #define inheriting_istream_operations_from_pointer(ptr) \
58858 inheriting_istream_operations_from(*ptr)
58859
58860 #define inheriting_ostream_operations_from(expr) \
58861 inheriting_base_stream_operations_from(expr)\
58862 \
58863 virtual void write(const char_t*buf,size_t size)noexcept override{\
58864 (expr).write(buf,size);\
58865 }\
58866
58867 #define inheriting_ostream_operations_from_pointer(ptr) \
58868 inheriting_ostream_operations_from(*ptr)
58869
58870
58871 template<class char_T>
58872 struct not_unreadable_code_cvted_text_irefstream:virtual noexcept_not_unreadable_text_istream_t<char_t>,instance_struct<not_unreadable_code_cvted_text_irefstream<char_T>>{
58873 private:
58877
58879 public:
58881 virtual ~not_unreadable_code_cvted_text_irefstream()noexcept override=default;
58882
58884
58885 virtual bool is_end()noexcept override{
58886 return _base->is_end();
58887 }
58888 virtual bool waitting_for_data()noexcept override{
58889 return _base->waitting_for_data();
58890 }
58891 virtual size_t read(char_t*buf,size_t size)noexcept override{
58892 constexpr size_t this_code_convert_buf_size=char_set::to_u32_code_size<char_T>;
58893 push_and_disable_msvc_warning(26494);//未初始化警告diss
58894 char_T code_convert_buf[this_code_convert_buf_size];
58896 size_t readed=0;
58897 while(readed<size){
58898 const size_t readed_this_time=_base->read(code_convert_buf,this_code_convert_buf_size);
58899 if(readed_this_time==0)
58900 break;
58901 const auto result=char_set::auto_to_utf32(buf+readed,code_convert_buf,readed_this_time);
58902 if(!result)
58903 die_with(locale::str::code_convert_error);
58904 readed+=result.processed_output().size();
58905 const auto size_processed_input=result.processed_input().size();
58906 _base->unread(code_convert_buf+size_processed_input,readed_this_time-size_processed_input);
58907 }
58908 return readed;
58909 }
58910 };
58911 template<class char_T>
58913 template<class char_T>
58914 struct code_cvted_text_orefstream:virtual noexcept_text_ostream_t<char_t>,instance_struct<code_cvted_text_orefstream<char_T>>{
58915 private:
58919
58921 public:
58923 virtual ~code_cvted_text_orefstream()noexcept override=default;
58924
58926
58927 virtual void write(const char_t*buf,size_t size)noexcept override{
58928 constexpr size_t this_code_convert_buf_size=char_set::to_u32_code_size<char_T>;
58929 push_and_disable_msvc_warning(26494);//未初始化警告diss
58930 char_T code_convert_buf[this_code_convert_buf_size];
58932 size_t writed=0;
58933 while(writed<size){
58934 const auto result=char_set::utf32_to_auto(buf[writed],code_convert_buf);
58935 if(!result)//如果buf[writed] == 3452816845(0xCDCDCDCD),说明这是一个未初始化的内存,肯定是容器或者其他地方出了问题
58936 die_with(locale::str::code_convert_error);
58937 _base->write(code_convert_buf,result.processed_output().size());
58938 writed++;
58939 }
58940 }
58941 };
58942
58943 struct terminal_irefstream_impl:virtual noexcept_text_istream_t<char_t>,instance_struct<terminal_irefstream_impl>{
58944 private:
58948
58951 public:
58952 terminal_irefstream_impl(handle_type handle)noexcept:_in(handle){}
58953 virtual ~terminal_irefstream_impl()noexcept override=default;
58954
58956 };
58971 //文件流读入(自句柄读写)实现
58972 //目前懒得写各种编码转换,所以目前只假设编码utf-8。
58974 private:
58978
58981 public:
58982 file_irefstream_impl(handle_type handle)noexcept:_in(handle){}
58983 virtual ~file_irefstream_impl()noexcept override=default;
58984
58986 };
58987 //文件流写出(自句柄读写)实现
58988 //目前懒得写各种编码转换,所以目前只假设编码utf-8。
58990 private:
58994
58997 public:
58998 file_orefstream_impl(handle_type handle)noexcept:_out(handle){}
58999 virtual ~file_orefstream_impl()noexcept override=default;
59000
59002 };
59003 //句柄io流
59005 private:
59009
59011 public:
59013 using defs::get;//避免流的get函数覆盖defs::get
59014 if(handle.is_terminal())
59015 _base=get<terminal_irefstream_impl>(handle);
59016 else
59017 _base=get<file_irefstream_impl>(handle);
59018 }
59019 virtual ~handle_istream_impl()noexcept override{
59020 unget(_base);
59021 }
59022
59024 };
59025 struct handle_ostream_impl:virtual noexcept_text_ostream_t<char_t>,instance_struct<handle_ostream_impl>,non_copyable{
59026 private:
59030
59032 public:
59034 if(handle.is_terminal())
59035 _base=get<terminal_orefstream_impl>(handle);
59036 else
59037 _base=get<file_orefstream_impl>(handle);
59038 }
59039 virtual ~handle_ostream_impl()noexcept override{
59040 unget(_base);
59041 }
59042
59044 };
59045
59046 push_and_disable_msvc_warning(26426);//非常量初始化警告diss
59050
59053 //由于in需要回显,所以需要多一层定义以处理回显相关事宜
59054 distinctive inline struct in_impl_t:noexcept_text_istream_t<char_t>,instance_struct<in_impl_t>{
59055 private:
59058 size_t _unread_size=0;//避免重复回显
59059 public:
59060 in_impl_t()noexcept:_tie_with(&out_impl){}
59061 virtual ~in_impl_t()noexcept override=default;
59062
59064
59065 virtual size_t read(char_t*buf,size_t size)noexcept override{
59066 const size_t aret=_in.read(buf,size);
59067 if(_tie_with)
59068 if(aret>_unread_size){
59069 const size_t tie_size=aret-_unread_size;
59070 //回显中需要将回车换行、回车转换为换行
59071 string_view str{buf+size-tie_size,tie_size};
59072 while(str.size()){
59073 const auto pos=str.find(ec('\r'));
59074 if(pos==npos){
59075 *_tie_with<<str;
59076 break;
59077 }
59078 else{
59079 _tie_with->write(str.data(),pos);
59080 if(pos+1<str.size()&&str[pos+1]==ec('\n'))
59081 str=str.substr(pos+2);
59082 else
59083 str=str.substr(pos+1);
59084 *_tie_with << ec('\n');
59085 }
59086 }
59087 }
59088 if(aret<=_unread_size)
59089 _unread_size-=aret;
59090 else
59091 _unread_size=0;
59092 return aret;
59093 }
59094 virtual bool is_end()noexcept override{
59095 return _in.is_end();
59096 }
59097 virtual bool waitting_for_data()noexcept override{
59098 return _in.waitting_for_data();
59099 }
59100 virtual explicit operator bool()noexcept override{
59101 return _in.operator bool();
59102 }
59103 virtual void unread(const char_t*buf,size_t size)noexcept override{
59104 _in.unread(buf,size);
59105 _unread_size+=size;
59106 }
59108 _tie_with=stream;
59109 }
59111 return _tie_with;
59112 }
59113 }in_impl;
59115
59116 #undef inheriting_base_stream_operations_from_pointer
59117 #undef inheriting_base_stream_operations_from
59118
59119 #undef inheriting_istream_operations_from_pointer
59120 #undef inheriting_istream_operations_from
59121
59122 #undef inheriting_ostream_operations_from_pointer
59123 #undef inheriting_ostream_operations_from
59124}
59125inline auto&out=base_streams_impl_n::out_impl;
59126inline auto&err=base_streams_impl_n::err_impl;
59127inline auto&in=base_streams_impl_n::in_impl;
59128
59129//file_end
59130
59131 #line 40 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
59132 }
59133 #if defined(ELC_TEST_ON)
59134 namespace stream_part_test{
59135 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_test.hpp"
59136//_test.hpp
59137/*
59138未完成的elc解释器stream文件
59139由steve02081504与Alex0125设计、编写
59140转载时请在不对此文件做任何修改的同时注明出处
59141项目地址:https://github.com/ELC-lang/ELC
59142*/
59143/*
59144 ,??????????????????????????
59145 ????????????????????????????
59146 ?????????????????????????????+
59147 ?????+++++++++++++++++++++++++
59148 ?????+++++++++++++++++++++++++
59149 ??????++++++++++++++++++++++++
59150 ?????++
59151 ?????+++
59152 ??????+++IIIIIIIIIIIIIIIIII
59153 ?????+++++IIIIIIIIIIIIIIIIII
59154 ?????++++++++++++++++++++++++
59155 ??????+++++++++++++++++++++++:
59156 ?????++
59157 ?????+++
59158 ??????++
59159 ??????????????????????????????II
59160 ??????????????????????????????IIII
59161 ,?????????????????????????????IIIII+
59162 =???++++++++++++++++++++++++++III?
59163 ?++++++++++++++++++++++++++++I+
59164*/
59165inline void test(){
59166 ELC_TEST_EVENTNAME("stream部分测试");
59167}
59168inline void test_log_out(){
59169}
59170inline void test_end{
59171}
59172
59173//file_end
59174
59175 #line 44 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
59176 }
59177 #endif
59178
59179 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
59180//_undefs.hpp
59181/*
59182未完成的elc解释器basic文件
59183由steve02081504与Alex0125设计、编写
59184转载时请在不对此文件做任何修改的同时注明出处
59185项目地址:https://github.com/ELC-lang/ELC
59186*/
59187/*
59188 ,??????????????????????????
59189 ????????????????????????????
59190 ?????????????????????????????+
59191 ?????+++++++++++++++++++++++++
59192 ?????+++++++++++++++++++++++++
59193 ??????++++++++++++++++++++++++
59194 ?????++
59195 ?????+++
59196 ??????+++IIIIIIIIIIIIIIIIII
59197 ?????+++++IIIIIIIIIIIIIIIIII
59198 ?????++++++++++++++++++++++++
59199 ??????+++++++++++++++++++++++:
59200 ?????++
59201 ?????+++
59202 ??????++
59203 ??????????????????????????????II
59204 ??????????????????????????????IIII
59205 ,?????????????????????????????IIIII+
59206 =???++++++++++++++++++++++++++III?
59207 ?++++++++++++++++++++++++++++I+
59208*/
59209#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/_undefs.hpp"
59210//_undefs.hpp
59211/*
59212未完成的elc解释器_share文件
59213由steve02081504与Alex0125设计、编写
59214转载时请在不对此文件做任何修改的同时注明出处
59215项目地址:https://github.com/ELC-lang/ELC
59216*/
59217/*
59218 ,??????????????????????????
59219 ????????????????????????????
59220 ?????????????????????????????+
59221 ?????+++++++++++++++++++++++++
59222 ?????+++++++++++++++++++++++++
59223 ??????++++++++++++++++++++++++
59224 ?????++
59225 ?????+++
59226 ??????+++IIIIIIIIIIIIIIIIII
59227 ?????+++++IIIIIIIIIIIIIIIIII
59228 ?????++++++++++++++++++++++++
59229 ??????+++++++++++++++++++++++:
59230 ?????++
59231 ?????+++
59232 ??????++
59233 ??????????????????????????????II
59234 ??????????????????????????????IIII
59235 ,?????????????????????????????IIIII+
59236 =???++++++++++++++++++++++++++III?
59237 ?++++++++++++++++++++++++++++I+
59238*/
59239
59240//defs at "_defs.hpp"
59241
59242#if defined(_MSC_VER)
59243 #pragma warning(pop)
59244#endif
59245//#undef suppress_msvc_warning
59246#undef disable_msvc_warning
59247#undef push_msvc_warning
59248#undef pop_msvc_warning
59249#undef push_and_disable_msvc_warning
59250#if defined(_MSC_VER)
59251 #pragma pack(pop)
59252#endif
59253#if defined(__GNUC__)
59254 #pragma GCC diagnostic pop
59255#endif
59256#if defined(_MSC_VER)
59257 #pragma pop_macro("new")
59258 #pragma pop_macro("delete")
59259 #pragma pop_macro("min")
59260 #pragma pop_macro("max")
59261 #pragma pop_macro("abs")
59262 #pragma pop_macro("export")
59263 #pragma pop_macro("rand")
59264 #pragma pop_macro("sqrt")
59265 #pragma pop_macro("type_info")
59266 #pragma pop_macro("elc")
59267#endif
59268
59269//
59270#if defined(ELC_VOID_NAME)
59271 #define void the_void
59272#endif
59273//
59274#if defined(ELC_PUBLIC_ALL)
59275 #undef protected
59276 #undef private
59277#endif
59278//
59279#if defined(ELC_RESOLVE_GLOBAL_NAME_CONFLICTS)
59280 #define rand the_rand
59281#endif
59282
59283// #undef often_noexcept
59284#undef noexcept_as
59285#undef noexcept_as_auto
59286#undef constexpr_as
59287#undef constexpr_as_auto
59288
59289#undef using_method_from_base_t
59290#undef using_method_from_value
59291
59292#undef floop
59293#undef times
59294#undef debug_times
59295#undef enable_adl
59296
59297#undef re_declvalue
59298#undef re_decltype
59299
59300#undef declvalue
59301
59302#undef template_error
59303#undef template_error_of_type
59304#undef template_warning
59305
59306#undef type_info_of
59307#undef type_name_of
59308
59309#undef is_common_attribute
59310#undef is_special_attribute
59311
59312#undef has_attribute
59313#undef not_has_attribute
59314
59315#undef float_size_of
59316#undef bitnum_of
59317
59318#undef def_common_attribute_with_nothing
59319#undef def_special_attribute_with_nothing
59320
59321#undef common_attribute_t
59322#undef special_attribute_t
59323
59324#undef enable_if
59325#undef enabled_by_default
59326#undef disabled_by_default
59327#undef enable_if_not_ill_form
59328#undef enable_flag
59329
59330#undef was_an_ill_form
59331#undef was_an_ill_form_with_parameter
59332#undef was_not_an_ill_form
59333#undef was_not_an_ill_form_and_noexcept
59334#undef was_not_an_ill_form_with_parameter
59335
59336#undef recursive_λ
59337#undef get_recursive_λ_caller
59338#undef λ
59339#undef exλ
59340#undef λ_with_catch
59341#undef self_recursion
59342#undef λ_RLSRRS
59343#undef λ_inline
59344#undef λ_force_inline
59345
59346#undef MAGIC
59347
59348#undef nothing
59349
59350#undef elseif
59351#undef _big_than_
59352#undef _small_than_
59353
59354#if defined(_MSC_VER)
59355 #undef not
59356 #undef and
59357 #undef or
59358#endif
59359
59360#undef INTER_NAMESPACE
59361#undef BREAK_NAMESPACE
59362
59363#undef szie
59364#undef form
59365
59366#undef template_name
59367#undef type_name
59368
59369#undef not_in_debug
59370
59371#undef es
59372#undef ec
59373
59374#undef ELC_TEST_EVENTNAME
59375
59376#undef override_instance_struct
59377
59378#undef distinctive
59379
59380#undef force_inline
59381
59382#undef with_no_vtable
59383
59384#undef in_consteval
59385
59386#undef no_vtable_struct
59387#undef no_vtable_class
59388
59389//#undef get_elc_defs
59390
59391//file_end
59392
59393#line 30 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/_share/_undefs.hpp"
59394
59395//file_end
59396
59397 #line 48 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
59398}
59399namespace elc{
59400 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_export.hpp"
59401//_export.hpp
59402//at namespace elc
59403/*
59404未完成的elc解释器stream文件
59405由steve02081504与Alex0125设计、编写
59406转载时请在不对此文件做任何修改的同时注明出处
59407项目地址:https://github.com/ELC-lang/ELC
59408*/
59409/*
59410 ,??????????????????????????
59411 ????????????????????????????
59412 ?????????????????????????????+
59413 ?????+++++++++++++++++++++++++
59414 ?????+++++++++++++++++++++++++
59415 ??????++++++++++++++++++++++++
59416 ?????++
59417 ?????+++
59418 ??????+++IIIIIIIIIIIIIIIIII
59419 ?????+++++IIIIIIIIIIIIIIIIII
59420 ?????++++++++++++++++++++++++
59421 ??????+++++++++++++++++++++++:
59422 ?????++
59423 ?????+++
59424 ??????++
59425 ??????????????????????????????II
59426 ??????????????????????????????IIII
59427 ,?????????????????????????????IIIII+
59428 =???++++++++++++++++++++++++++III?
59429 ?++++++++++++++++++++++++++++I+
59430*/
59431#define export using defs::stream_n::
59432export in;
59433export out;
59434export err;
59435#undef export
59436
59437//file_end
59438
59439 #line 51 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/_files/stream/_body.hpp"
59440}
59441
59442//file_end
59443
59444 #line 39 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/stream"
59445#endif
59446
59447//file_end
59448
59449 #line 46 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
59450 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
59451//string
59452//at namespace ::
59453/*@
59454未完成的elc解释器include文件
59455由steve02081504与Alex0125设计、编写
59456转载时请在不对此文件做任何修改的同时注明出处
59457项目地址:https://github.com/ELC-lang/ELC
59458*/
59459/*
59460 ,??????????????????????????
59461 ????????????????????????????
59462 ?????????????????????????????+
59463 ?????+++++++++++++++++++++++++
59464 ?????+++++++++++++++++++++++++
59465 ??????++++++++++++++++++++++++
59466 ?????++
59467 ?????+++
59468 ??????+++IIIIIIIIIIIIIIIIII
59469 ?????+++++IIIIIIIIIIIIIIIIII
59470 ?????++++++++++++++++++++++++
59471 ??????+++++++++++++++++++++++:
59472 ?????++
59473 ?????+++
59474 ??????++
59475 ??????????????????????????????II
59476 ??????????????????????????????IIII
59477 ,?????????????????????????????IIIII+
59478 =???++++++++++++++++++++++++++III?
59479 ?++++++++++++++++++++++++++++I+
59480*/
59481#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
59482//pre_checks.hpp
59483/*
59484未完成的elc解释器_share文件
59485由steve02081504与Alex0125设计、编写
59486转载时请在不对此文件做任何修改的同时注明出处
59487项目地址:https://github.com/ELC-lang/ELC
59488*/
59489/*
59490 ,??????????????????????????
59491 ????????????????????????????
59492 ?????????????????????????????+
59493 ?????+++++++++++++++++++++++++
59494 ?????+++++++++++++++++++++++++
59495 ??????++++++++++++++++++++++++
59496 ?????++
59497 ?????+++
59498 ??????+++IIIIIIIIIIIIIIIIII
59499 ?????+++++IIIIIIIIIIIIIIIIII
59500 ?????++++++++++++++++++++++++
59501 ??????+++++++++++++++++++++++:
59502 ?????++
59503 ?????+++
59504 ??????++
59505 ??????????????????????????????II
59506 ??????????????????????????????IIII
59507 ,?????????????????????????????IIIII+
59508 =???++++++++++++++++++++++++++III?
59509 ?++++++++++++++++++++++++++++I+
59510*/
59511//__cplusplus needs 20+
59512#if !defined(__cplusplus)||__cplusplus<202002L
59513 //if msvc, check _MSVC_LANG
59514 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
59515 //ok
59516 #else
59517 #error "elc files needs c++20 or higher"
59518 #endif
59519#endif
59520
59521//check if the compiler is msvc
59522#if defined(_MSC_VER)
59523 //check if _CPPRTTI
59524 #if !defined(_CPPRTTI)
59525 #error "elc files needs rtti"
59526 #endif
59527 //check _MSC_VER at last 1932
59528 #if _MSC_VER<1932
59529 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
59530 #endif
59531#endif
59532
59533//file_end
59534
59535#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
59536#line 37 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/string"
59537
59538//file_end
59539
59540 #line 47 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
59541 //#include "test"
59542 #line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/void_name"
59543//void_name
59544//at namespace ::
59545/*@
59546未完成的elc解释器include文件
59547由steve02081504与Alex0125设计、编写
59548转载时请在不对此文件做任何修改的同时注明出处
59549项目地址:https://github.com/ELC-lang/ELC
59550*/
59551/*
59552 ,??????????????????????????
59553 ????????????????????????????
59554 ?????????????????????????????+
59555 ?????+++++++++++++++++++++++++
59556 ?????+++++++++++++++++++++++++
59557 ??????++++++++++++++++++++++++
59558 ?????++
59559 ?????+++
59560 ??????+++IIIIIIIIIIIIIIIIII
59561 ?????+++++IIIIIIIIIIIIIIIIII
59562 ?????++++++++++++++++++++++++
59563 ??????+++++++++++++++++++++++:
59564 ?????++
59565 ?????+++
59566 ??????++
59567 ??????????????????????????????II
59568 ??????????????????????????????IIII
59569 ,?????????????????????????????IIIII+
59570 =???++++++++++++++++++++++++++III?
59571 ?++++++++++++++++++++++++++++I+
59572*/
59573#line 1 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/../../../_share/pre_checks.hpp"
59574//pre_checks.hpp
59575/*
59576未完成的elc解释器_share文件
59577由steve02081504与Alex0125设计、编写
59578转载时请在不对此文件做任何修改的同时注明出处
59579项目地址:https://github.com/ELC-lang/ELC
59580*/
59581/*
59582 ,??????????????????????????
59583 ????????????????????????????
59584 ?????????????????????????????+
59585 ?????+++++++++++++++++++++++++
59586 ?????+++++++++++++++++++++++++
59587 ??????++++++++++++++++++++++++
59588 ?????++
59589 ?????+++
59590 ??????+++IIIIIIIIIIIIIIIIII
59591 ?????+++++IIIIIIIIIIIIIIIIII
59592 ?????++++++++++++++++++++++++
59593 ??????+++++++++++++++++++++++:
59594 ?????++
59595 ?????+++
59596 ??????++
59597 ??????????????????????????????II
59598 ??????????????????????????????IIII
59599 ,?????????????????????????????IIIII+
59600 =???++++++++++++++++++++++++++III?
59601 ?++++++++++++++++++++++++++++I+
59602*/
59603//__cplusplus needs 20+
59604#if !defined(__cplusplus)||__cplusplus<202002L
59605 //if msvc, check _MSVC_LANG
59606 #if defined(_MSVC_LANG) && _MSVC_LANG>=202002L
59607 //ok
59608 #else
59609 #error "elc files needs c++20 or higher"
59610 #endif
59611#endif
59612
59613//check if the compiler is msvc
59614#if defined(_MSC_VER)
59615 //check if _CPPRTTI
59616 #if !defined(_CPPRTTI)
59617 #error "elc files needs rtti"
59618 #endif
59619 //check _MSC_VER at last 1932
59620 #if _MSC_VER<1932
59621 #error "elc files needs at last msvc 19.32 or higher, keep moving!"
59622 #endif
59623#endif
59624
59625//file_end
59626
59627#line 31 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/void_name"
59628#if !defined(ELC_VOID_NAME)
59629 #define ELC_VOID_NAME
59630 typedef void the_void;
59631 #define void the_void
59632#endif
59633
59634//file_end
59635
59636 #line 49 "https://github.com/ELC-lang/ELC/tree/master/parts/header_file/files/elc/all"
59637 #define ELC_ALL
59638#endif
59639
59640//file_end
59641
else
#define noexcept_as_auto
Definition all_defs.cpp:525
#define void
#define _small_than_
Definition all_defs.cpp:654
#define in_consteval
Definition all_defs.cpp:717
#define was_not_an_ill_form(...)
Definition all_defs.cpp:611
#define λ_with_catch(...)
Definition all_defs.cpp:627
#define special_attribute_t
Definition all_defs.cpp:589
#define float_size_of(...)
Definition all_defs.cpp:576
#define get_recursive_λ_caller(name,...)
Definition all_defs.cpp:618
#define other
#define failed
#define was_not_an_ill_form_and_noexcept(...)
Definition all_defs.cpp:612
#define exλ
Definition all_defs.cpp:625
#define DYNAMIC_LIBRARY_SUFFIX
#define template_name
Definition all_defs.cpp:668
#define inheriting_ostream_operations_from_pointer(ptr)
#define floating_arec_t
if constexpr(noexcept_stream_class< stream_T >)
#define U_MASK(x)
#define type_info_of(...)
Definition all_defs.cpp:566
#define λ
Definition all_defs.cpp:623
#define INTER_NAMESPACE(NAMESPACENAME)
Definition all_defs.cpp:663
#define was_not_an_ill_form_with_parameter(...)
Definition all_defs.cpp:613
#define hash
#define GET_CATEGORY(props)
#define GET_PROPS(c)
#define defspecflag(name)
快捷定义特殊类型的constexpr
#define bitnum_of(...)
Definition all_defs.cpp:578
#define using_method_from_value(name, value_name,...)
Definition all_defs.cpp:536
#define pop_function_nodiscard
#define ec(ch)
Definition all_defs.cpp:681
#define inheriting_istream_operations_from_pointer(ptr)
#define elseif
Definition all_defs.cpp:650
#define enable_flag
Definition all_defs.cpp:607
#define template_error(reason)
Definition all_defs.cpp:559
#define expr
#define pop_msvc_warning()
Definition all_defs.cpp:478
#define es
Definition all_defs.cpp:680
#define declvalue(...)
Definition all_defs.cpp:556
#define CAT_MASK(props)
#define IS_THAT_CONTROL_SPACE(c)
#define TYPE_MAPPER(type)
#define push_and_disable_msvc_warning(...)
Definition all_defs.cpp:479
#define inheriting_istream_operations_from(expr)
#define def_note(name)
#define ELC_TEST_EVENTNAME(name)
Definition all_defs.cpp:686
#define has_attribute(...)
Definition all_defs.cpp:572
#define recursive_λ(...)
Definition all_defs.cpp:616
#define _m
#define type_name
Definition all_defs.cpp:670
#define floop
Definition all_defs.cpp:543
#define inheriting_base_stream_operations_from(expr)
#define is_common_attribute(name)
Definition all_defs.cpp:569
#define nothing
Definition all_defs.cpp:647
#define inheriting_base_stream_operations_from_pointer(ptr)
#define rot_base(opt, antiopt)
#define constexpr_as(...)
Definition all_defs.cpp:526
#define template_warning(reason)
Definition all_defs.cpp:563
#define inheriting_ostream_operations_from(expr)
#define constexpr_as_auto
Definition all_defs.cpp:527
void the_void
#define BREAK_NAMESPACE
Definition all_defs.cpp:665
#define noexcept_as(...)
Definition all_defs.cpp:524
#define no_vtable_class
Definition all_defs.cpp:720
#define override_instance_struct
Definition all_defs.cpp:689
#define def_special_attribute_with_nothing(name)
Definition all_defs.cpp:585
#define force_inline
Definition all_defs.cpp:708
#define times(...)
Definition all_defs.cpp:544
#define self_recursion(...)
Definition all_defs.cpp:629
#define _big_than_
Definition all_defs.cpp:652
#define no_vtable_struct
Definition all_defs.cpp:719
#define enable_if(...)
Definition all_defs.cpp:599
#define distinctive
Definition all_defs.cpp:700
#define common_attribute_t
Definition all_defs.cpp:588
#define enable_adl(name)
Definition all_defs.cpp:550
#define def_common_attribute_with_nothing(name)
Definition all_defs.cpp:581
constexpr rot_iterator operator++(int) noexcept
constexpr rot_iterator & operator--() noexcept
constexpr rot_iterator operator--(int) noexcept
constexpr rot_iterator & operator++() noexcept
constexpr rot_iterator(size_t offset) noexcept
constexpr size_t value() const noexcept
constexpr auto & operator|=(bool b) noexcept
arec_t(this_t *to, size_t index) noexcept
constexpr auto & operator&=(bool b) noexcept
constexpr auto & operator=(bool b) noexcept
constexpr auto & operator^=(bool b) noexcept
constexpr flag(flag_set_type a=not_set) noexcept
flag(flag &&a) noexcept
void set() noexcept
void operator=(flag &) &noexcept=delete
void unset() noexcept
void operator=(flag &&) &noexcept=delete
flag(flag &a) noexcept
value_t * handle_getter() const noexcept(is_handle_getter_noexcept())
constexpr same_base_t(const same_base_t< other_T, other_base_t > &a) noexcept(construct< base_t_rw >.nothrow< other_base_t >)
base_t_w next_getter() const noexcept(is_next_getter_noexcept())
static constexpr bool is_handle_getter_noexcept() noexcept
constexpr this_t & operator=(const this_t &) &noexcept=default
constexpr same_base_t(const this_t &a) noexcept(construct< base_t_rw >.nothrow< const base_t_rw >)
constexpr value_type operator*() noexcept(is_value_getter_noexcept())
~same_base_t() noexcept(destruct.nothrow< base_t_rw >)=default
static constexpr auto value_type_getter() noexcept
constexpr void swap_with(this_t &a) noexcept(noexcept((swap((::std::declval< base_t_rw & >()),(::std::declval< base_t_rw & >())))))
decltype(value_type_getter()) ::template type value_type
constexpr bool operator==(value_t *a) const noexcept(is_handle_getter_noexcept()&&noexcept(pointer_equal((::std::declval< value_t * >()),(::std::declval< value_t * >()))))
constexpr auto operator<=>(const same_base_t< other_value_t, other_base_t_w > &a) const noexcept(compare.nothrow< base_t_rw, other_base_t_w >)
constexpr same_base_t() noexcept=default
constexpr same_base_t(this_t &&a) noexcept(noexcept((construct< base_t_rw >.nothrow< base_t_rw && >)))
static constexpr bool is_value_getter_noexcept() noexcept
constexpr value_t * operator->() noexcept(is_handle_getter_noexcept())
base_t_w before_getter() const noexcept(is_before_getter_noexcept())
static constexpr bool is_before_getter_noexcept() noexcept
same_base_t< value_t, base_t_w > this_t
static constexpr bool is_next_getter_noexcept() noexcept
value_type value_getter() const noexcept(is_handle_getter_noexcept())
static constexpr bool is_able_to_get_handle() noexcept
const base_t_rw & get_base() const noexcept
constexpr void add(cons *a) noexcept
iterator_t< T, cons * > iterator
constexpr list_t() noexcept
constexpr iterator begin() noexcept
constexpr iterator head() noexcept
constexpr bool empty() const noexcept
constexpr iterator end() noexcept
constexpr fast_integer_iterator(integer_T &val) noexcept
constexpr void operator()(char c) noexcept
constexpr integer_iterator(integer_T &val) noexcept
constexpr mark_able(mark_type a=not_mark) noexcept
void mark() const noexcept
bool was_marked() const noexcept
void unmark() const noexcept
constexpr maybe_fail_reference(note::fail_t) noexcept
constexpr maybe_fail_reference(T &a) noexcept
constexpr maybe_fail_reference(const maybe_fail_reference &)=default
constexpr auto operator()(T &&v) const noexcept(nothrow< T >)
friend this_t operator+(const this_t &a, U &&b) noexcept(noexcept((a.copy()+=b)))
constexpr auto operator==(array_like_view_t< const T > a) const noexcept(equal.nothrow< array_like_view_t< T > >)
array_t(const this_t &a) noexcept(noexcept(((::std::declval< this_t >()).copy())))
array_t(note::size_t size, const T &elem) noexcept(get< T >.nothrow<>)
friend this_t operator+(U &&a, const this_t &b) noexcept(noexcept((this_t(a)+=b)))
constexpr iterator get_iterator_at(size_t a) noexcept
array_t(U &&a) noexcept(get< T >.as_array.nothrow< U >)
this_t && operator+(U &&b) &&noexcept(noexcept((*this+=b)))
friend this_t & operator+=(this_t &a, zero_t b) noexcept(get< T >.apply_end.nothrow< T >)
void insert(size_t index, size_t count, const T *data) noexcept(insert_nothrow)
void insert_with_forward_resize(size_t index, size_t count, const T *data, size_t new_size) noexcept(insert_with_forward_resize_nothrow)
constexpr reverse_iterator rend() noexcept
void push_back(T &&a) noexcept(get< T >.apply_end.nothrow< T >)
constexpr reverse_const_iterator rcend() const noexcept
reverse_iterator_t< T > reverse_iterator
void push_back(const T &a) noexcept(get< T >.apply_end.nothrow< const T & >)
friend this_t & operator+=(this_t &a, U &&b) noexcept(get< T >.apply_end.nothrow< U >)
reverse_const_iterator_t< T > reverse_const_iterator
array_t(T(&a)[N]) noexcept(get< T >.as_array.nothrow< T(&)[N]>)
const T * data() const noexcept
reverse_const_iterator rbegin() const noexcept
array_t(note::size_t size, Func &&func) noexcept(get< T >.nothrow< Func >)
void forward_resize(size_t size) noexcept(forward_resize_nothrow)
constexpr auto operator==(const this_t &a) const noexcept(equal.nothrow< array_like_view_t< T > >)
reverse_const_iterator rcbegin() const noexcept
void resize(size_t size) noexcept(resize_nothrow)
this_t & operator=(const this_t &a) &noexcept(noexcept(((::std::declval< this_t >()).copy())))
array_t(::std::initializer_list< T > &&list) noexcept(get< T >.as_array.nothrow<::std::initializer_list< T > >)
const_iterator end() const noexcept
const T & operator[](size_t pos) const noexcept
~array_t() noexcept(unget.nothrow< T >)
void swap_with(this_t &a) noexcept
array_t(note::size_t size, Func &&func) noexcept(get< T >.nothrow< Func >)
void insert(size_t index, size_t count, const T &value) noexcept(insert_nothrow)
constexpr auto operator<=>(const this_t &a) const noexcept(compare.nothrow< array_like_view_t< T > >)
void part_used_insert_with_resize(size_t index, size_t count, const T *data, size_t new_size, size_t used_size) noexcept(insert_nothrow)
const_iterator cbegin() const noexcept
const_iterator find(U &&a) const noexcept
size_t size_in_byte() const noexcept
constexpr auto operator<=>(array_like_view_t< const T > a) const noexcept(compare.nothrow< array_like_view_t< T > >)
reverse_iterator rbegin() noexcept
constexpr reverse_const_iterator rend() const noexcept
void remove(T a) noexcept(get< T >.remove.nothrow< T >)
T & operator[](size_t pos) noexcept
this_t & operator=(this_t &&a) &noexcept
void clear() noexcept(re_construct.nothrow< this_t >)
const_iterator cend() const noexcept
array_t(note::size_t size) noexcept(get< T >.nothrow<>)
constexpr iterator begin() noexcept
void insert(size_t index, size_t count) noexcept(insert_nothrow)
void part_used_insert_with_forward_resize(size_t index, size_t count, const T *data, size_t new_size, size_t used_size) noexcept(insert_with_forward_resize_nothrow)
constexpr const_iterator begin() const noexcept
void insert_with_resize(size_t index, size_t count, const T *data, size_t new_size) noexcept(insert_nothrow)
constexpr const_iterator get_iterator_at(size_t a) const noexcept
~hash_table_t() noexcept(destruct.nothrow< base_t_w >)=default
void add(const T &a) noexcept(hash_nothrow< const T & > &&bucket_t::add_nothrow)
bool remove(const T &a) noexcept(bucket_t::remove_nothrow)
hash_table_t(special_init_t, size_t bucket_size) noexcept
this_t & operator=(base_t_w &&a) &noexcept
maybe_fail_reference< T > find(U &&a) noexcept(find_nothrow< U >)
this_t & operator=(const base_t_w &a) &noexcept
bool in_table(const T &a) noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))
bool not_in_table(const T &a) noexcept(noexcept(((::std::declval< this_t >()).in_table(a))))
void clear() noexcept(re_construct.nothrow< this_t >)
void clear() noexcept(re_construct.nothrow< this_t >)
this_t & operator=(const this_t &a) noexcept
const T & operator[](const key_t &a) const noexcept
T & operator[](const key_t &a) noexcept(noexcept((_m.add({a, T()}))))
bool operator==(const this_t &a) const noexcept(shrink_nothow &&equal.nothrow< T >)
void shrink() const noexcept(shrink_nothow)
void swap(map_t< T, key_t, stack_t, _ > &a) noexcept
this_t & operator=(const this_t &a) &noexcept(noexcept(((::std::declval< this_t >()).copy())))
base_stack_t(const this_t &a) noexcept(noexcept(((::std::declval< this_t >()).copy())))
hash_t get_top_hash() noexcept(noexcept((hash((::std::declval< T & >())))))
void clear() noexcept(re_construct.nothrow< this_t >)
bool remove(const T_ &a) noexcept(remove_nothrow &&equal.nothrow< T_, T >)
bool not_in_stack(const T &a) const noexcept(noexcept(((::std::declval< this_t >()).in_stack(a))))
bool in_stack(const T &a) const noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))
~base_stack_t() noexcept(unget.nothrow< data_t >)
void add(const T &a) noexcept(add_nothrow)
struct elc::defs::container::stack_n::base_stack_t::data_t * _m
maybe_fail_reference< T > find(U &&a) noexcept(noexcept(((::std::declval< T & >())==a)))
this_t & operator=(this_t &&a) &noexcept
constexpr exception() noexcept=default
virtual void * _abstract_method_get_forward_resize_this(size_t size)=0
virtual size_t abstract_method_get_size_of_get_for_this() noexcept=0
virtual void * _abstract_method_get_resize_this(size_t size)=0
virtual size_t abstract_method_get_size_of_get_for_this() noexcept override
virtual void * _abstract_method_get_forward_resize_this(size_t size) noexcept(get_forward_resize.able< T >?get_forward_resize.nothrow< T >:1) override
virtual void abstract_method_unget_this() noexcept(noexcept((unget(get_handle(this))))) override
virtual void * _abstract_method_get_resize_this(size_t size) noexcept(get_resize.able< T >?get_resize.nothrow< T >:1) override
virtual void * _abstract_method_copy_get_this() noexcept(copy_get.able< T >?copy_get.nothrow< T >:1) override
void add_gc_method(type_info_t< T >) noexcept
void remove_gc_success_identifier(success_identifier_t a)
void operator()() const noexcept
void add_gc_method(gc_method_t a) noexcept
void remove_gc_method(type_info_t< T >) noexcept
void add_gc_success_identifier(success_identifier_t a) noexcept
bool success() const noexcept
void remove_gc_method(gc_method_t a)
root_of() noexcept(noexcept((roots_of< T >.add((::std::declval< this_t * >())))))
virtual void map_and_mark() noexcept=0
constexpr roots_t() noexcept=default
auto for_each(Args &&...rest) noexcept(noexcept((((::std::declval< decltype(_roots) >())). for_each((::std::declval< Args >())...))))
constexpr placement_construct_t operator[](T *p) const noexcept
T operator()(Args &&...rest) const noexcept(nothrow< Args... >)
constexpr ref_t() noexcept=default
constexpr void add_ref() const noexcept
constexpr void init_never_ref_num_zero() noexcept
constexpr bool cut_ref() const noexcept
link_num_t link_num() const noexcept
arec_t && operator=(const arec_t &&ch) &&noexcept
arec_t && operator=(char_T a) &&noexcept
const char_T * operator&() const &&noexcept
arec_t(string_t *to, size_t index) noexcept
arec_t(special_init_t, const arec_t &ref) noexcept
floating_arec_t_impl(special_init_t, const this_t &ref) noexcept
floating_arec_t_impl(string_t *to, float_t index) noexcept
this_t && operator=(floating_arec_result_type a) &&noexcept
判断类型是否为指针
constexpr size_t correct_size(size_t size, size_t align) noexcept
size_t get_overhead(const_pointer a) noexcept
constexpr pointer correct_pointer(pointer a, size_t align) noexcept
constexpr size_t overhead_get_offset_value(size_t align) noexcept
constexpr size_t correct_align(size_t align) noexcept
constexpr size_t overhead_get_align(size_t align) noexcept
void set_overhead(pointer a, size_t size) noexcept
constexpr pointer recorrect_pointer(pointer a, size_t align) noexcept
alloc相关基础函数
void free(byte *p, size_t align) noexcept
size_t get_size_of_alloc(const byte *p, size_t align) noexcept
constexpr bool use_debug_alloc_lib
struct elc::APIs::alloc::source_location_info_t operate_source_location
byte * aligned_alloc(size_t align, size_t size) noexcept
byte * realloc(byte *ptr, size_t nsize, size_t align) noexcept
终止报错相关基础函数
void Init_die_state(die_state &state) noexcept
void die() noexcept
终止整个程序并可能的触发断点或输出错误信息
void ConsoleLogEnd(const die_state &state) noexcept
void die_with(string_view err_msg) noexcept
同 die() ,但是有详细的错误信息
void ConsoleLog(const die_state &state, string_view_t< char > str) noexcept
function_name_t get_function_name(void *ptr) noexcept
void base_free_library(library_handle handle) noexcept
void * get_symbol(library_handle handle, string symbol_name) noexcept
library_handle load_library(string file_name) noexcept
void * base_get_symbol(library_handle handle, const char *symbol_name) noexcept
library_handle base_load_library(const char *file_name) noexcept
string base_get_load_error() noexcept
void free_library(library_handle handle) noexcept
string get_load_error() noexcept
string_t< char_t > to_char_t_str(string_view_t< char > a) noexcept
string_t< char > to_char_str(string_view_t< char_t > a) noexcept
bool is_eof(handle_type stream) noexcept
void basic_close_impl(handle_type handle) noexcept
size_t basic_write_for_terminal_impl(handle_type handle, const base_io_char_type *buffer, size_t size) noexcept
constexpr auto zero_base_handle
size_t basic_read_for_terminal_impl(handle_type handle, base_io_char_type *buffer, size_t size) noexcept
int_t basic_tell_impl(handle_type handle) noexcept
handle_type init_output_stream() noexcept
void basic_sync_impl(handle_type handle) noexcept
constexpr size_t code_convert_buf_size
bool is_terminal_stream(base_handle_type handle) noexcept
int_t basic_seek_impl(handle_type handle, int_t offset, stream_n::seek_type type) noexcept
auto before_terminal_read(handle_type stream) noexcept
void after_terminal_write(handle_type stream, auto something) noexcept
size_t basic_read_impl(handle_type handle, void *buffer, size_t size) noexcept
auto before_terminal_write(handle_type stream) noexcept
handle_type init_input_stream() noexcept
handle_type init_error_stream() noexcept
bool is_wait_input(handle_type stream) noexcept
void after_terminal_read(handle_type stream, auto something) noexcept
void basic_flush_impl(handle_type handle) noexcept
size_t basic_write_impl(handle_type handle, const void *buffer, size_t size) noexcept
constexpr auto U_NON_SPACING_MARK
Mn @stable ICU 2.0
constexpr auto U_OTHER_SYMBOL
So @stable ICU 2.0
constexpr auto U_SPACE_SEPARATOR
Zs @stable ICU 2.0
constexpr auto U_MODIFIER_LETTER
Lm @stable ICU 2.0
constexpr auto U_UPPERCASE_LETTER
Lu @stable ICU 2.0
constexpr auto U_START_PUNCTUATION
Ps @stable ICU 2.0
constexpr auto U_END_PUNCTUATION
Pe @stable ICU 2.0
constexpr auto U_OTHER_PUNCTUATION
Po @stable ICU 2.0
constexpr auto U_PARAGRAPH_SEPARATOR
Zp @stable ICU 2.0
constexpr auto U_COMBINING_SPACING_MARK
Mc @stable ICU 2.0
constexpr auto U_UNASSIGNED
Non-category for unassigned and non-character code points.
constexpr auto U_CONTROL_CHAR
Cc @stable ICU 2.0
constexpr auto U_MODIFIER_SYMBOL
Sk @stable ICU 2.0
constexpr auto U_PRIVATE_USE_CHAR
Co @stable ICU 2.0
constexpr auto U_DECIMAL_DIGIT_NUMBER
Nd @stable ICU 2.0
constexpr auto U_SURROGATE
Cs @stable ICU 2.0
constexpr auto U_INITIAL_PUNCTUATION
Pi @stable ICU 2.0
constexpr auto U_LINE_SEPARATOR
Zl @stable ICU 2.0
constexpr auto U_CURRENCY_SYMBOL
Sc @stable ICU 2.0
constexpr auto U_CONNECTOR_PUNCTUATION
Pc @stable ICU 2.0
constexpr auto U_GENERAL_OTHER_TYPES
Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNE...
constexpr auto U_FORMAT_CHAR
Cf @stable ICU 2.0
constexpr auto U_ENCLOSING_MARK
Me @stable ICU 2.0
constexpr auto U_TITLECASE_LETTER
Lt @stable ICU 2.0
constexpr auto U_MATH_SYMBOL
Sm @stable ICU 2.0
constexpr auto U_OTHER_LETTER
Lo @stable ICU 2.0
constexpr auto U_FINAL_PUNCTUATION
Pf @stable ICU 2.0
constexpr auto U_LOWERCASE_LETTER
Ll @stable ICU 2.0
constexpr auto U_OTHER_NUMBER
No @stable ICU 2.0
constexpr auto U_LETTER_NUMBER
Nl @stable ICU 2.0
constexpr auto U_DASH_PUNCTUATION
Pd @stable ICU 2.0
constexpr auto U_GC_LM_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_LO_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_LC_MASK
Mask constant for multiple UCharCategory bits (LC Cased Letters).
constexpr auto U_GC_S_MASK
Mask constant for multiple UCharCategory bits (S Symbols).
constexpr auto U_GC_NL_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_PE_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_M_MASK
Mask constant for multiple UCharCategory bits (M Marks).
constexpr auto U_GC_ND_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_Z_MASK
Mask constant for multiple UCharCategory bits (Z Separators).
constexpr auto U_GC_NO_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_LU_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_N_MASK
Mask constant for multiple UCharCategory bits (N Numbers).
constexpr auto U_GC_PD_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_CS_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_SM_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_SO_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_PI_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_ZS_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_MN_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_CO_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_ZP_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_ZL_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_LT_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_C_MASK
Mask constant for multiple UCharCategory bits (C Others).
constexpr auto U_GC_LL_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_SC_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_SK_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_PO_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_PS_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_ME_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_PC_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_CC_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_L_MASK
Mask constant for multiple UCharCategory bits (L Letters).
constexpr auto U_GC_P_MASK
Mask constant for multiple UCharCategory bits (P Punctuation).
constexpr auto U_GC_MC_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_PF_MASK
Mask constant for a UCharCategory.
constexpr auto U_GC_CF_MASK
Mask constant for a UCharCategory.
constexpr auto UTRIE_DATA_BLOCK_LENGTH
Number of entries in a data block.
constexpr auto UTRIE_DATA_MASK
Mask for getting the lower bits for the in-data-block offset.
constexpr auto UTRIE_INDEX_SHIFT
Shift size for shifting left the index array values.
constexpr auto UTRIE_INDEX_2_BMP_LENGTH
Count the lengths of both BMP pieces.
constexpr auto UTRIE_INDEX_2_OFFSET
The BMP part of the index-2 table is fixed and linear and starts at offset 0.
constexpr auto UTRIE_INDEX_2_MASK
Mask for getting the lower bits for the in-index-2-block offset.
constexpr auto UTRIE_INDEX_2_BLOCK_LENGTH
Number of entries in an index-2 block.
constexpr auto UTRIE_CP_PER_INDEX_1_ENTRY
Number of code points per index-1 table entry.
constexpr auto UTRIE_UTF8_2B_INDEX_2_OFFSET
The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
constexpr auto UTRIE_DATA_GRANULARITY
The alignment size of a data block.
constexpr auto UTRIE_DATA_START_OFFSET
The start of non-linear-ASCII data blocks, at offset 192=0xc0.
constexpr auto UTRIE_OMITTED_BMP_INDEX_1_LENGTH
Number of index-1 entries for the BMP.
constexpr auto UTRIE_LSCP_INDEX_2_OFFSET
The part of the index-2 table for U+D800..U+DBFF stores values for lead surrogate code units not code...
constexpr auto UTRIE_INDEX_1_OFFSET
The index-1 table, only used for supplementary code points, at offset 2112=0x840.
constexpr auto UTRIE_BAD_UTF8_DATA_OFFSET
The illegal-UTF-8 data block follows the ASCII block, at offset 128=0x80.
constexpr auto UTRIE_SHIFT_2
Shift size for getting the index-2 table offset.
constexpr auto UTRIE_SHIFT_1_2
Difference between the two shift sizes, for getting an index-1 offset from an index-2 offset.
constexpr auto UTRIE_SHIFT_1
Shift size for getting the index-1 table offset.
constexpr size_t get_decode_utf16_size(const char16_t *in) noexcept
constexpr size_t get_encode_utf16_size(char32_t in) noexcept
constexpr size_t decode_utf8(char32_t *out, const char8_t *in, size_t in_size_max) noexcept
constexpr size_t get_decode_utf8_size(const char8_t *in) noexcept
constexpr size_t encode_utf16(char16_t *out, char32_t in) noexcept
constexpr size_t get_encode_utf8_size(char32_t in) noexcept
constexpr size_t decode_utf16(char32_t *out, const char16_t *in, size_t in_size_max) noexcept
constexpr size_t encode_utf8(char8_t *out, char32_t in) noexcept
文字编码相关函数
constexpr bool isalnum(char_t c) noexcept
constexpr bool isdigit(char_t c) noexcept
constexpr auto auto_to_utf32(char32_t *out, const char32_t *in, size_t len) noexcept
constexpr auto get_utf8_to_utf32_size(const char8_t *in, size_t len) noexcept
string_view_t< char16_t > string_view_u16_t
constexpr auto utf32_to_utf16(char16_t *out, const char32_t *in, size_t len) noexcept
constexpr uint16_t props_index[23016]
constexpr size_t utf32_to_utf8_code_size
constexpr auto get_utf16_to_utf32_size(const char16_t *in, size_t len) noexcept
constexpr bool isupper(char_t c) noexcept
constexpr auto get_utf32_to_utf8_size(const char32_t *in, size_t len) noexcept
constexpr bool isprint(char_t c) noexcept
constexpr bool isalpha(char_t c) noexcept
constexpr size_t utf16_to_utf8_code_size
constexpr auto get_utf16_to_utf8_size(const char16_t *in, size_t len) noexcept
string_view_t< char8_t > string_view_u8_t
constexpr bool isspace(char_t c) noexcept
constexpr auto utf16_to_utf32(char32_t *out, const char16_t *in, size_t len) noexcept
constexpr auto utf32_to_utf8(char8_t *out, const char32_t *in, size_t len) noexcept
constexpr auto get_utf32_to_utf16_size(const char32_t *in, size_t len) noexcept
constexpr bool iscntrl(char_t c) noexcept
constexpr auto get_utf8_to_utf16_size(const char8_t *in, size_t len) noexcept
constexpr bool isblank(char_t c) noexcept
string_view_t< char32_t > string_view_u32_t
constexpr auto utf32_to_utf32(char32_t *out, const char32_t *in, size_t len) noexcept
constexpr auto utf8_to_utf16(char16_t *out, const char8_t *in, size_t len) noexcept
constexpr auto utf8_to_utf32(char32_t *out, const char8_t *in, size_t len) noexcept
constexpr bool isgraph(char_t c) noexcept
constexpr auto utf16_to_utf8(char8_t *out, const char16_t *in, size_t len) noexcept
constexpr bool istitle(char_t c) noexcept
constexpr size_t utf32_to_utf16_code_size
constexpr bool isxdigit(char_t c) noexcept
constexpr size_t to_u32_code_size
constexpr bool islower(char_t c) noexcept
constexpr bool isdefined(char_t c) noexcept
constexpr bool ispunct(char_t c) noexcept
constexpr bool isbase(char_t c) noexcept
constexpr auto utf32_to_auto(char32_t *out, const char32_t *in, size_t len) noexcept
constexpr bool isISOControl(char_t c) noexcept
void begin_of_array_like() noexcept=delete
void end_of_array_like() noexcept=delete
void size_of_array_like() noexcept=delete
constexpr bool strict_is_array_like_for
constexpr auto rotl_nomod(const T v, const auto R) noexcept
位操作:循环左移(无mod) 不使用std版本而是自己写的原因:std版本右操作数只能是int而不能是size_t或别的,标准会傻逼
constexpr size_t countl_one(const T v) noexcept
countl_one
constexpr bool all_bit_is_one(const T v) noexcept
is_all_bit_one
constexpr auto rotr_nomod(const T v, const auto r) noexcept
位操作:循环右移(无mod) 不使用std版本而是自己写的原因:std版本右操作数只能是int而不能是size_t或别的,标准会傻逼
constexpr size_t get_bitnum(const T v) noexcept
获取位数
constexpr auto npos
constexpr auto rotl(const T v, const auto R) noexcept
位操作:循环左移 不使用std版本而是自己写的原因:std版本右操作数只能是int而不能是size_t或别的,标准会傻逼
constexpr auto rotr(const T v, const auto R) noexcept
位操作:循环右移 不使用std版本而是自己写的原因:std版本右操作数只能是int而不能是size_t或别的,标准会傻逼
constexpr bool all_bit_is_zero(const T v) noexcept
is_all_bit_zero
constexpr size_t countr_one(const T v) noexcept
countr_one
constexpr size_t countr_zero(const T v) noexcept
countr_zero
constexpr T npos_of
用以指定不存在的位置
constexpr size_t countl_zero(const T v) noexcept
countl_zero
constexpr auto empty_constexpr_str_of
空字串常量且str或begin会指向一个0终止字符串(而不是nullptr),便于安全初始化
constexpr_str_t< char_t > constexpr_str
function_type_getter< T >::type get_function_type
constexpr auto function_type_getter_conditional_helper() noexcept
void the_pointer_hash() noexcept=delete
constexpr hash_value_t pointer_hash(T *a) noexcept
auto operator<=>(const reverse_base_t< base_t, value_t > &a, const reverse_base_t< base_t, value_t > &b) noexcept(compare.nothrow< base_t >)
constexpr uint8_t hexval(char c) noexcept
conditional< is_big_type< integer_T >, fast_integer_iterator< integer_T, base >, integer_iterator< integer_T, base > > integer_iterator_t
constexpr void char_checker() noexcept
constexpr void base_checker() noexcept
constexpr struct elc::defs::base::magic_number::π_with_ε_t π_with_ε
to_unsigned_t< float_type_of< remove_cvref< T > > > π_type
constexpr auto get_reverse_result(auto k, auto δx, auto y) noexcept
constexpr auto get_k(T1 y1, T2 y2, result_T δx) noexcept
constexpr auto get_result(auto y1, auto k, auto δx) noexcept
constexpr T sqrt(const T &v) noexcept
auto lehmer_gcd(T x, T y) noexcept
constexpr size_T get_next_gold_size_to_resize_for_hash(size_T size) noexcept
已知当前hash table的size,求下一个合适的桶大小
constexpr size_t integer_log(const T &a, const auto &b) noexcept
constexpr T exp(const T &v) noexcept
constexpr auto divmod(const T1 &a, const T2 &b)
constexpr T get_prime_num_less_or_eq_than(T a) noexcept
求小于或等于某数的素数
constexpr T safe_arithmetic_cast(U x) noexcept
constexpr auto ceil_div(const T &a, const U &b) noexcept
constexpr auto log(const T &a) noexcept
auto gcd(T x, T y) noexcept
constexpr T sqrt_to_new_ε(T num, const U &v, const to_unsigned_t< T > &ε, to_unsigned_t< T > &ε_saver) noexcept
constexpr T quick_invsqrt(const T &v) noexcept
typename arithmetic_type_info_prover< remove_cvref< T > >::unsigned_type to_unsigned_t
constexpr T invsqrt_iteration(const T &num, const U &v) noexcept
auto euclidean_gcd(T x, T y) noexcept
constexpr auto mod(const T1 &a, const T2 &b)
constexpr auto reverse_sign_if(bool x, const T &y) noexcept
constexpr bool is_prime_num(T a) noexcept
auto binary_gcd(T x, T y) noexcept
constexpr T cos(T num, const to_unsigned_t< T > &ε) noexcept
constexpr auto abs(const T &v) noexcept
constexpr auto trunc(const T &v) noexcept
constexpr T arccsc(T num, const to_unsigned_t< T > &ε) noexcept
constexpr T sin(T num, const to_unsigned_t< T > &ε) noexcept
constexpr bool is_close(const T &a, const T &b) noexcept
constexpr auto reciprocal(const T &x) noexcept
constexpr auto ceil(const T &v) noexcept
constexpr auto reverse_sign(const T &x) noexcept
constexpr T arcsec(T num, const to_unsigned_t< T > &ε) noexcept
constexpr auto copy_as_negative(Arg_t x, bool negative=1) noexcept
constexpr to_unsigned_t< T > arccot(T num, const to_unsigned_t< T > &ε) noexcept
constexpr void set_rounding(int mode)
typename arithmetic_type_info_prover< remove_cvref< T > >::float_type float_type_of
constexpr T invsqrt(const T &v) noexcept
constexpr T sec(T num, const to_unsigned_t< T > &ε) noexcept
constexpr bool is_even(const T &x) noexcept
constexpr int get_rounding()
constexpr auto floor(const T &v) noexcept
auto base_gcd(T x, T y) noexcept
constexpr T cot(T num, const to_unsigned_t< T > &ε) noexcept
constexpr bool isNaN(const T &v) noexcept
constexpr bool is_odd(const T &x) noexcept
constexpr bool is_prime_num_no_pre_check(T a) noexcept
constexpr T sqrt_iteration(const T &num, const U &v) noexcept
constexpr to_unsigned_t< T > arccos(T num, const to_unsigned_t< T > &ε) noexcept
constexpr T arcsin(T num, const to_unsigned_t< T > &ε) noexcept
constexpr auto factorial(unsigned n, unsigned start=1u) noexcept
constexpr T arctan(T num, const to_unsigned_t< T > &ε) noexcept
typename arithmetic_type_info_prover< remove_cvref< T > >::integer_type integer_type_of
constexpr T get_prime_num_big_or_eq_than(T a) noexcept
求大于或等于某数的素数
constexpr auto pow(const T &a, const U &b=2) noexcept
constexpr T tan(T num, const to_unsigned_t< T > &ε) noexcept
constexpr uintmax_t to_uintmax_t(T x) noexcept
constexpr size_t to_size_t(T x) noexcept
constexpr struct elc::defs::base::math::get_prime_factorization_t get_prime_factorization
typename arithmetic_type_info_prover< remove_cvref< T > >::signed_type to_signed_t
constexpr T quick_sqrt(const T &v) noexcept
constexpr bool is_negative(const T &x) noexcept
constexpr T csc(T num, const to_unsigned_t< T > &ε) noexcept
constexpr size_T get_next_gold_size_to_resize_for_array(size_T size) noexcept
已知当前array的size,求下一个合适的提前分配大小
constexpr T invsqrt_to_new_ε(T num, const U &v, const to_unsigned_t< T > &ε, to_unsigned_t< T > &ε_saver) noexcept
constexpr auto sub(const T1 &a, const T2 &b) noexcept
constexpr auto get_prime_num_big_than(T a) noexcept
求大于某数的素数
constexpr bool isInf(const T &v) noexcept
constexpr struct elc::defs::base::note_n::fail_t fail
constexpr size_t size(::size_t v)
size_type_t<::size_t > size_t
constexpr auto get_null_ptr() noexcept
constexpr struct elc::defs::base::null_ptr_n::null_ptr_t null_ptr
void the_get_null_ptr() noexcept=delete
constexpr size_t in_range_but_reverse_size_t(const remove_cvref< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
constexpr size_t find_last_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
constexpr T * base_find_last_not_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
find_last_not_of的朴素实现 若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * base_find_first_not_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
find_first_not_of的朴素实现 若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_first_of_bitmark(const bitmark_for_finds< T > &mark, array_like_view_t< T > range)
find_first_of的bitmark实现 若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * base_find_first_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
find_first_of的朴素实现 若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_last_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr size_t in_range_size_t(const remove_cvref< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
constexpr size_t find_last_not_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到不匹配的数据项,返回其距离开头的步数,若未找到,返回npos
constexpr T * in_range_but_reverse(const remove_cvref< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_last_not_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_first_not_of_bitmark(const bitmark_for_finds< T > &mark, array_like_view_t< T > range)
find_first_not_of的bitmark实现 若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_last_of_bitmark(const bitmark_for_finds< T > &mark, array_like_view_t< T > range)
find_last_of的bitmark实现 若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr bool in_range(T pattern, const range_t< T >range) noexcept(noexcept((bool((::std::declval< T >())>=(::std::declval< const T >()) &&(::std::declval< T >())<=(::std::declval< const T >())))))
判断一个值是否在某个范围内
constexpr T * find_first_not_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * base_find_last_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
find_last_of的朴素实现 若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_last_not_of_bitmark(const bitmark_for_finds< T > &mark, array_like_view_t< T > range)
find_last_not_of的bitmark实现 若成功找到不匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr T * find_first_of(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其开头,若未找到,返回nullptr
constexpr size_t find_first_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到匹配的数据项,返回其距离开头的步数,若未找到,返回npos
constexpr size_t find_first_not_of_size_t(const array_like_view_t< T > &pattern, array_like_view_t< T > range)
若成功找到不匹配的数据项,返回其距离开头的步数,若未找到,返回npos
void sort(iter_t begin, iter_t end, compare_t compare=compare_t())
iter_t partition(iter_t begin, iter_t end, compare_t compare=compare_t())
void build_max_heap(iter_t begin, iter_t end, compare_t compare=compare_t())
void introsort_loop(iter_t begin, iter_t end, size_t depth_limit, compare_t compare=compare_t())
void insertion_sort(iter_t begin, iter_t end, compare_t compare=compare_t())
void quicksort(iter_t begin, iter_t end, compare_t compare=compare_t())
void heapify(iter_t begin, iter_t end, iter_t i, compare_t compare=compare_t())
constexpr size_t size_threshold
void introsort(iter_t begin, iter_t end, compare_t compare=compare_t())
void heapsort(iter_t begin, iter_t end, compare_t compare=compare_t())
string_view_t< char_t > string_view
constexpr struct elc::defs::base::compare_t compare
constexpr struct elc::defs::base::equal_t equal
constexpr bool is_all_byte_zero(T &&a) noexcept
static void destroy(T *a) noexcept
Definition all_defs.cpp:993
auto & assign(T &&a, U &&b) noexcept(noexcept((a=b)))
Definition all_defs.cpp:975
constexpr U & launder_union_cast(T &&t) noexcept
constexpr T & launder_data_cast(byte *p) noexcept
constexpr T * launder_remove_const_by_ptr(const T *a) noexcept
auto template_warning_helper(U &&a) noexcept
Definition all_defs.cpp:790
::std::remove_cvref_t< T > remove_cvref
Definition all_defs.cpp:835
constexpr struct elc::defs::base::zero_t zero
constexpr T down_cast(U a) noexcept
向下转型至
constexpr logical_bool neither
constexpr struct elc::defs::base::just_an_part_t just_an_part
constexpr struct elc::defs::base::min_t min
constexpr struct elc::defs::base::special_init_t special_init
constexpr auto is_eq(T &&a, T &&b) noexcept(noexcept((&a==&b)))
constexpr T * launder_data_ptr_cast(byte *p) noexcept
void the_destroy() noexcept=delete
constexpr ptrdiff_t get_off_set(note::from_t< const_pointer >a, note::to_t< const_pointer >b) noexcept
获取两个指针的偏移
constexpr bool is_base_of
Definition all_defs.cpp:843
constexpr T & remove_const_by_ref(const T &a) noexcept
constexpr bool template_error_helper
Definition all_defs.cpp:784
constexpr auto unapply_off_set(T *b, ptrdiff_t c) noexcept
反向应用偏移
constexpr struct elc::defs::base::end_by_zero_t end_by_zero
constexpr const T add_const_by_value(T a) noexcept
::std::remove_reference_t< T > remove_ref
Definition all_defs.cpp:839
constexpr type_info_t< T > type_info
constexpr logical_bool either
constexpr U & union_cast(T &&t) noexcept
constexpr auto pointer_to_bool(T *a) noexcept
指针转bool的重载接口,允许类对此进行自定义 elc内部的指针转bool应当视情况使用默认配置或此重载接口
constexpr T * remove_const_by_ptr(const T *a) noexcept
constexpr byte * cast_to_data(T *p) noexcept
constexpr auto pointer_equal(T *a, T *b) noexcept
指针比较的重载接口,允许类对此进行自定义 elc内部的指针比较应当视情况使用默认配置或此重载接口
decltype(nullptr) nullptr_t
constexpr struct elc::defs::base::pre_alloc_t pre_alloc
constexpr T * data_ptr_cast(byte *p) noexcept
constexpr struct elc::defs::base::never_ref_num_zero_t never_ref_num_zero
constexpr void swap(T1 &a, T2 &b)
size_t the_number_of(type_info_t< T >) noexcept
::std::remove_cv_t< T > remove_cv
Definition all_defs.cpp:837
constexpr struct elc::defs::base::max_t max
::std::conditional_t< B, T, F > conditional
Definition all_defs.cpp:841
decltype(null_ptr) null_ptr_t
constexpr const T & add_const_by_ref(T &a) noexcept
constexpr size_t max_size_of
constexpr struct elc::defs::base::do_nothing_t do_nothing
constexpr auto number_of_possible_values_per
constexpr const T add_const(T a) noexcept
对值追加const
constexpr size_t max_align_of
constexpr const T * add_const_by_ptr(T *a) noexcept
constexpr T * launder_remove_const(const T *a) noexcept
对指针移除const
auto & attribute_cast(T &t) noexcept
constexpr auto apply_off_set(T *a, ptrdiff_t c) noexcept
应用偏移
constexpr byte * launder_cast_to_data(T *p) noexcept
constexpr bool operator==(const type_info_t< T > &, const type_info_t< T > &)
T * get_handle(attribute< T, attribute_name > *a) noexcept
constexpr T & data_cast(byte *p) noexcept
constexpr bool full_equal_in_byte(const T &a, const T &b) noexcept
auto attribute_ptr_cast(T *ptr) noexcept
constexpr logical_bool unknown
constexpr struct elc::defs::base::discard_t discard
void the_pointer_equal() noexcept=delete
constexpr invoke_t< T > invoke
constexpr T & remove_const(const T &a) noexcept
对引用移除const
void the_pointer_to_bool() noexcept=delete
constexpr auto is_not_eq(T &&a, T &&b) noexcept(noexcept((!is_eq(a, b))))
const void * const_pointer
未知类型指针,不可写
void * pointer
未知类型指针
typename float_info< T >::exponent_unsigned_type exponent_unsigned_type
typename float_info< T >::exponent_signed_type exponent_type
constexpr data_type< T > get_float_data(T v) noexcept
typename float_info< T >::data_type data_type
decltype(get_float_info< T >()) float_info
static constexpr auto get_float_info() noexcept
constexpr T get_float_from_data(data_type< T > data) noexcept
typename float_info< T >::precision_type precision_type
constexpr auto get_precision_and_exponent(T v) noexcept
constexpr bool wchar_t_same_as_char_t
constexpr bool wchar_t_same_as_char16_t
decltype(get_precision_base< T >()) float_precision_base_t
constexpr bool is_rounding_bit(bit_type v) noexcept
decltype(λ{ if constexpr(size==sizeof(uint8_t)) return(uint8_t) 0 unsigned_specific_size_t
constexpr auto base_get_exponent(T v) noexcept
decltype(λ{ if constexpr(size==sizeof(int8_t)) return(int8_t) 0 signed_specific_size_t
else if constexpr(size==sizeof(uint16_t)) return(uint16_t) 0
constexpr bool add_carry(T a, T b, T &c) noexcept
constexpr T make_float(float_precision_base_t< T > base_num, float_exponent_t< T > exponent) noexcept
decltype(λ{ if constexpr(size<=sizeof(uint_fast8_t)) return(uint_fast8_t) 0 unsigned_specific_size_fast_t
::std::uintmax_t basic_uintmax_t
constexpr float_infos::exponent_type< T > get_native_exponent(T v) noexcept
::std::intmax_t basic_intmax_t
constexpr bool sub_borrow(T a, T b, T &c) noexcept
signed_specific_size_fast_t< sizeof(float_infos::exponent_type< T >)+1 > float_exponent_t
constexpr float_exponent_t< T > get_exponent(T v) noexcept
constexpr auto get_native_precision(T v) noexcept
constexpr auto get_precision_base(T=T{}) noexcept
basic_uintmax_t uintmax_index_t
decltype(λ{ if constexpr(size<=sizeof(int_fast8_t)) return(int_fast8_t) 0 signed_specific_size_fast_t
constexpr size_t BIT_POSSIBILITY
每个bit(不是字节)的可能性 为什么c艹委员会不定义这个?
constexpr class elc::defs::basic_environment::to_arithmetic_t to_arithmetic
constexpr float_precision_base_t< T > get_precision(T v) noexcept
constexpr bool is_elc_expansion_base_type_helper() noexcept
constexpr float_precision_base_t< T > get_base_num(T v) noexcept
constexpr auto threshold_precision_bit
array_t(T, U...) -> array_t< T >
default_func_data_t< Ret_t(Args_t...)> default_func_data
base_function_t(T) -> base_function_t< get_function_type< T >, promise_nothrow_at_destruct >
static constexpr bool is_function_t
bool was_an(const_ptr p) noexcept
map_t< ptr, T > long_term_binary_node_storager
value eval(ptr p)
const T & const_use_by_ref_as(const_ptr p) noexcept
comn_ptr_t< const node_like > const_ptr
constexpr bool as_value_nothrow_helper() noexcept
value cdr_of(ptr p)
decltype(auto) as_value(T &&a) noexcept(as_value_nothrow_helper< T >())
ptr make_binary_node_from(T a) noexcept
weak_ptr_t< const node_like > const_weak_ptr
T use_as(const_ptr p) noexcept
comn_ptr_t< node_like > ptr
ptr make_long_term_binary_node_from(T a) noexcept
value car_of(ptr p)
weak_ptr_t< node_like > weak_ptr
decltype(auto) as_ptr(T &&a) noexcept(as_ptr_nothrow_helper< T >())
ptr make_list() noexcept
elc::defs::core::nil_t nil
T & use_by_ref_as(ptr p) noexcept
elc::defs::core::t_t t
maybe_fail_reference< T > maybe_fail_use_by_ref_as(ptr p) noexcept
library_handle_t get_library_handle_form_symbol(function_t< Func_t > symbol) noexcept
comn_ptr_t< library_info_t > library_handle_t
library_handle_t load_lib(string lib_name) noexcept
string get_symbol_name_form_symbol(function_t< Func_t > symbol) noexcept
constexpr auto ending_of_expr_beyond_expectations
constexpr auto core_runtime_internal_helper_leak
constexpr auto empty_gc_method
thread_local ptrdiff_t off_set
void * get_ptr_after_off_set(void *a) noexcept
void is_base_ptr(void *a) noexcept
void is_instance_ptr(void *a) noexcept
void * alloc_method(type_info_t< T >) noexcept
size_t get_size_of_alloc_method(const T *arg) noexcept
size_t base_get_size_of_alloc(const byte *arg, size_t align) noexcept
byte * base_aligned_alloc(size_t align, size_t size) noexcept
byte * base_realloc(byte *ptr, size_t nsize, size_t align) noexcept
void base_free(byte *p, size_t align) noexcept
void * realloc_method(T *ptr, size_t new_size) noexcept
constexpr alloc_t< T > alloc
用于对特定类型进行alloc的类实例
constexpr struct elc::defs::memory::alloc_n::get_size_of_alloc_t get_size_of_alloc
void the_alloc_method() noexcept=delete
void the_free_method() noexcept=delete
constexpr struct elc::defs::memory::alloc_n::free_t free
void the_realloc_method() noexcept=delete
constexpr struct elc::defs::memory::alloc_n::realloc_t realloc
void the_get_size_of_alloc_method() noexcept=delete
void gc_method_of() noexcept
bool gc_success_identifier_of() noexcept
void gc_for_alloc() noexcept
当alloc失败时调用此函数
auto forward_alloc_size_grow_with_insert_uninitialized_data(T *&arg, size_t to_size, size_t insert_pos, size_t insert_size) noexcept(move.trivial< T > or move.nothrow< T >)
constexpr struct elc::defs::memory::get_n::copy_get_t copy_get
auto part_used_block_alloc_size_grow_with_insert_uninitialized_data(T *&arg, size_t to_size, size_t insert_pos, size_t insert_size, size_t used_size) noexcept(move.trivial< T > or move.nothrow< T >)
constexpr struct elc::defs::memory::get_n::get_resize_t get_resize
constexpr struct elc::defs::memory::get_n::unget_t unget
void forward_alloc_size_cut(T *&arg, size_t to_size) noexcept(move.trivial< T > or move.nothrow< T >)
auto part_used_block_forward_alloc_size_grow_with_insert_uninitialized_data(T *&arg, size_t to_size, size_t insert_pos, size_t insert_size, size_t used_size) noexcept(move.trivial< T > or move.nothrow< T >)
void alloc_size_cut(T *&arg, size_t to_size) noexcept
void alloc_size_grow(T *&arg, size_t to_size) noexcept(move.trivial< T > or move.nothrow< T >)
constexpr struct elc::defs::memory::get_n::get_size_of_get_t get_size_of_get
constexpr get_t< T > get
void forward_alloc_size_grow(T *&arg, size_t to_size) noexcept(move.trivial< T > or move.nothrow< T >)
void alloc_size_grow_with_insert_uninitialized_data(T *&arg, size_t insert_pos, size_t insert_size) noexcept(move.trivial< T > or move.nothrow< T >)
requires ::std::is_trivially_copyable_v< T > T * super_speed_trivial_copy_from_one(T *to, const T &value, size_t size) noexcept
constexpr struct elc::defs::memory::lifetime_n::move_construct_t move_construct
constexpr struct elc::defs::memory::lifetime_n::copy_assign_t copy_assign
constexpr struct elc::defs::memory::lifetime_n::destruct_t destruct
constexpr struct elc::defs::memory::lifetime_n::copy_construct_t copy_construct
constexpr construct_t< T > construct
constexpr struct elc::defs::memory::lifetime_n::move_t move
constexpr struct elc::defs::memory::lifetime_n::copy_t copy
void map_all(func_t &&a) noexcept(noexcept(((::std::declval< func_t >())((::std::declval< T * >())))))
void map_all_helper(func_t &&a)
void destroy_and_free(T *a) noexcept
void the_destroy_and_free() noexcept=delete
link_num_t get_ref_num(const T *a) noexcept
void waiting_for_destroy(T *a) noexcept
constexpr bool was_weak_ref_able
void map_and_mark_for_gc() noexcept=delete
void the_waiting_for_destroy() noexcept=delete
link_num_t get_weak_ref_num(const T *a) noexcept
constexpr bool was_ref_able
virtual size_t read(data_type *data, size_t size) noexcept(noexcept((stream_T::read(nullptr, 0)))) override
constexpr struct elc::defs::stream_n::flush_t flush
virtual void unread(const data_type *data, size_t size) noexcept override
virtual bool is_end() noexcept(noexcept((stream_T::is_end()))) override
stream_T::data_type data_type
decltype(auto) operator<<(text_ostream_T &&stream, const char_T ch) noexcept(noexcept_text_ostream_class< text_ostream_T >)
decltype(auto) operator>>(text_istream_T &stream, char_T &ch) noexcept(noexcept_text_istream_class< text_istream_T >)
decltype(auto) base_array_output(text_ostream_T &&stream, const T *array, size_t size) noexcept(noexcept_text_ostream_class< text_ostream_T >)
virtual bool base_waitting_for_data_impl_for_wrapper() noexcept(noexcept((stream_T::waitting_for_data())))
unreadable_wrap< stream_T > this_t
virtual void * _abstract_method_copy_get_this() noexcept(noexcept((instance_struct< this_t >::_abstract_method_copy_get_this()))) override
constexpr struct elc::defs::stream_n::endline_t endline
virtual bool waitting_for_data() noexcept(noexcept((stream_T::waitting_for_data()))) override
virtual size_t base_read_impl_for_wrapper(data_type *data, size_t size) noexcept(noexcept((stream_T::read(nullptr, 0))))
auto getline(text_istream_T &is) noexcept(noexcept_text_istream_class< text_istream_T >)
virtual void * _abstract_method_get_resize_this(size_t size) noexcept(noexcept((instance_struct< this_t >::instance_struct< this_t >::_abstract_method_get_resize_this(size)))) override
virtual void * _abstract_method_get_forward_resize_this(size_t size) noexcept(noexcept((instance_struct< this_t >::_abstract_method_get_forward_resize_this(size)))) override
null_string_data_t< char_T > null_string_data
string_t< char_t > string
value arec_as_value(string_t< char_T > &str, const value index)
bool file_exists(const string &name) noexcept
string get_system_drive() noexcept
string get_elc_runtime_lib_path() noexcept
string get_program_data_path() noexcept
constexpr auto package_symbol_loader_file_name
string elc_runtime_lib_path
string package_symbol_loader_path
char_t * string_ptr_t
Definition all_defs.cpp:353
int64_t int_t
Definition all_defs.cpp:357
const char_t * const_string_ptr_t
Definition all_defs.cpp:355
long double float_size_t
Definition all_defs.cpp:363
char32_t char_t
Definition all_defs.cpp:351
double float_t
Definition all_defs.cpp:361
uint64_t uint_t
Definition all_defs.cpp:359
static void aligned_free(void *ptr, size_t align) noexcept
static size_t aligned_blocksize(const void *ptr, size_t align) noexcept
static void * aligned_alloc(size_t align, size_t size) noexcept
static void * aligned_realloc(void *ptr, size_t size, size_t align) noexcept
static size_t aligned_blocksize(const void *ptr, size_t align) noexcept
static void * aligned_alloc(size_t align, size_t size) noexcept
static void * aligned_realloc(void *ptr, size_t size, size_t align) noexcept
static void aligned_free(void *ptr, size_t align) noexcept
constexpr source_location_guard(size_t lookup=0) noexcept
constexpr const char * file() noexcept
constexpr uint_least32_t line() noexcept
constexpr handle_type & operator=(const handle_type &)=default
constexpr handle_type(handle_type &&)=default
constexpr handle_type(const handle_type &)=default
bool is_terminal() const noexcept
constexpr handle_type(base_handle_type handle) noexcept
constexpr handle_type() noexcept
constexpr handle_type & operator=(handle_type &&)=default
constexpr code_convert_result(bool success, string_view_t< in_char_t > processed_input, string_view_t< out_char_t > processed_output) noexcept
constexpr bool success() const noexcept
constexpr string_view_t< in_char_t > processed_input() const noexcept
string_view_t< in_char_t > _processed_input
string_view_t< out_char_t > _processed_output
constexpr string_view_t< out_char_t > processed_output() const noexcept
static constexpr size_t get_length_of(T *ptr) noexcept
constexpr reverse_iterator(const reverse_iterator &) noexcept=default
constexpr reverse_iterator(reverse_iterator &&) noexcept=default
constexpr bool operator<=>(const reverse_iterator &a) const noexcept
constexpr reverse_iterator operator+(ptrdiff_t diff) const noexcept
constexpr reverse_iterator operator-(ptrdiff_t diff) const noexcept
constexpr bool operator==(const reverse_iterator &a) const noexcept
constexpr size_t size() const noexcept
constexpr reverse_iterator rend() noexcept
constexpr const_iterator begin() const noexcept
constexpr const_iterator data() const noexcept
constexpr array_like_view_t(T *a, note::size_t b) noexcept
constexpr T & operator[](size_t pos) noexcept
constexpr auto operator==(this_t a) const noexcept(equal.nothrow< T >)
constexpr array_like_view_t(T *a, size_t b) noexcept
constexpr const T & back() const noexcept
constexpr this_t subview(size_t pos) noexcept
constexpr const T & operator[](size_t pos) const noexcept
constexpr array_like_view_t(const this_t &) noexcept=default
constexpr auto operator<=>(this_t a) const noexcept(compare.nothrow< T >)
constexpr this_t subview(size_t pos, size_t end_pos) noexcept
constexpr const T & front() const noexcept
constexpr bool empty() const noexcept
constexpr reverse_iterator rbegin() noexcept
void swap_with(this_t &b) noexcept(noexcept((swap(_begin, b._begin), swap(_size, b._size))))
constexpr const_iterator cbegin() const noexcept
constexpr array_like_view_t(U &&a) noexcept(noexcept((begin_of_array_like< T >(a), size_of_array_like< T >(a))))
constexpr const_iterator end() const noexcept
constexpr const_iterator cend() const noexcept
friend const U * get_handle(const attribute< U, another_attribute_name > *) noexcept
friend U * get_handle(attribute< U, another_attribute_name > *) noexcept
constexpr const T * get_handle() const noexcept
constexpr T * get_handle() noexcept
自动重整类型名并在析构时释放重整结果,对于gcc和clang的傻逼实现
constexpr base_type_info_t(const base_type_info_t &) noexcept=default
constexpr base_type_info_t(const ::std::type_info &a) noexcept
bool operator==(const base_type_info_t &a) const noexcept
size_t get_hash() const noexcept
bool operator==(const ::std::type_info &a) const noexcept
type_name_t get_name() const noexcept
constexpr const_iterator end() const noexcept
constexpr auto & operator=(T n) noexcept
constexpr auto operator^(const this_t &b) const noexcept
constexpr bitset(T n) noexcept
constexpr auto & operator^=(const this_t &b) noexcept
constexpr const_iterator cend() const noexcept
constexpr auto & operator&=(const this_t &b) noexcept
byteset< data_size > base_t
constexpr auto & operator|=(const this_t &b) noexcept
const_iterator_t< bool, const iterator_base_t > const_iterator
constexpr auto operator==(const this_t &b) const noexcept
constexpr auto operator&(const this_t &b) const noexcept
constexpr const_iterator cbegin() const noexcept
constexpr const_iterator begin() const noexcept
constexpr auto & operator>>=(size_t n) noexcept
constexpr iterator end() noexcept
iterator_t< bool, iterator_base_t > iterator
constexpr arec_t operator[](size_t index) noexcept
constexpr auto & operator<<=(size_t n) noexcept
byte _data[data_size]
constexpr iterator begin() noexcept
constexpr const arec_t operator[](size_t index) const noexcept
constexpr auto operator~() const noexcept
constexpr auto operator|(const this_t &b) const noexcept
constexpr auto operator>>(size_t n) const noexcept
constexpr auto operator<<(size_t n) const noexcept
bitset< bit_num > this_t
constexpr const byte * end() const noexcept
constexpr const byte * begin() const noexcept
constexpr byteset() noexcept
constexpr byte * end() noexcept
constexpr byteset(T &&t) noexcept
constexpr byte * begin() noexcept
constexpr auto operator()(T *a, size_t size1, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr auto reverse(strong_ordering odr) const noexcept
constexpr auto operator()(T(&a)[N1], U(&b)[N2]) const noexcept(nothrow< T, U >)
constexpr auto reverse(partial_ordering odr) const noexcept
constexpr auto operator()(T *a, size_t size1, U *b, size_t size2) const noexcept(nothrow< T, U >)
constexpr auto reverse(weak_ordering odr) const noexcept
decltype(base_call((::std::declval< T >()),(::std::declval< U >()))) type
constexpr auto lexicographical(T *a, size_t size1, just_an_part_t, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr auto operator()(T *a, U *b, size_t size) const noexcept(nothrow< T, U >)
constexpr auto operator()(T *a, size_t size1, just_an_part_t, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr auto lexicographical(T *a, size_t size1, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr auto operator()(T &&a, U &&b) const noexcept(nothrow< T, U >)
constexpr auto lexicographical(T(&a)[N1], U(&b)[N2]) const noexcept(nothrow< T, U >)
constexpr auto lexicographical(T *a, size_t size1, U *b, size_t size2) const noexcept(nothrow< T, U >)
static constexpr bool able
constexpr auto operator()(T *a, end_by_zero_t, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr auto operator()(T *a, end_by_zero_t, U *b, size_t size2) const noexcept(nothrow< T, U >)
static constexpr bool nothrow
constexpr auto lexicographical(T *a, end_by_zero_t, U *b, size_t size2) const noexcept(nothrow< T, U >)
constexpr auto lexicographical(T *a, end_by_zero_t, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr cons_t()=default
constexpr constexpr_str_t_literal_helper(const char_T(&str)[N]) noexcept
告知其他elc库接口这是编译时常量字符串,并提供编译时计算好的内容,包括但不限于hash、bmh头、bitmark等,用于加速库操作
range_n::bitmark_for_finds< const char_T > bitmark_for_finds
range_n::reverse_match_pattern< const char_T > reverse_match_pattern
range_n::bitmark_for_quick_unindex< const char_T > bitmark_for_unindex
consteval constexpr_str_t(const constexpr_str_t &str)=default
constexpr constexpr_str_t(const_string_ptr_t str)
range_n::match_pattern< const char_T > match_pattern
constexpr constexpr_str_t(const_string_ptr_t str, size_t size)
constexpr hash_t hash() const noexcept
constexpr_str_t的退化类型,表明这是常量字符串,但没有可用的额外信息
constexpr const_string_ptr_t str() const noexcept
constexpr constexpr_str_view_t substr(const char_T *begin) const noexcept
constexpr const_string_ptr_t data() const noexcept
constexpr_str_view_t(const_string_ptr_t str) noexcept=delete
constexpr constexpr_str_view_t substr(size_t pos, size_t len) const noexcept
constexpr constexpr_str_view_t substr(const char_T *begin, size_t len) const noexcept
constexpr constexpr_str_view_t substr(size_t pos, const char_T *end) const noexcept
constexpr constexpr_str_view_t substr(size_t pos) const noexcept
constexpr constexpr_str_view_t substr(const char_T *begin, const char_T *end) const noexcept
constexpr data_view(const T *p) noexcept
constexpr data_view(T *p) noexcept
static base_t copy_demangle(base_t demangled_name) noexcept
复制重整结果
static base_t demangle(const char *original_name) noexcept
重整器包装
demangle_name_t(const demangle_name_t &other) noexcept
复制构造函数
~demangle_name_t() noexcept
析构函数
string_view_t< char > base_t
demangle_name_t(const char *original_name) noexcept
构造函数
demangle_name_t(demangle_name_t &&other) noexcept
移动构造函数(swap)
constexpr void operator()(T &&) const noexcept
Definition all_defs.cpp:985
constexpr void operator=(T &&) const noexcept
Definition all_defs.cpp:983
void operator()(Args &&...) noexcept
constexpr bool operator==(T &) noexcept
constexpr bool operator==(const do_nothing_t &) noexcept
constexpr bool operator()(T *a, end_by_zero_t, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr bool operator()(T *a, U *b, size_t size) const noexcept(nothrow< T, U >)
constexpr bool operator()(T *a, size_t size1, just_an_part_t, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
constexpr bool operator()(T *a, size_t size1, U *b, end_by_zero_t) const noexcept(nothrow< T, U >)
static constexpr bool able
constexpr bool operator()(T *a, end_by_zero_t, U *b, size_t size2) const noexcept(nothrow< T, U >)
constexpr bool operator()(T *a, size_t size1, U *b, size_t size2) const noexcept(nothrow< T, U >)
static constexpr bool nothrow
constexpr bool operator()(T(&a)[N1], U(&b)[N2]) const noexcept(nothrow< T, U >)
constexpr auto operator()(T &&a, U &&b) const noexcept(nothrow< T, U >)
Ret_t operator()(Args_t...args) const noexcept(nothrow||invoke< const T >.with_return_type< Ret_t >.nothrow< Args_t... >)
decltype(function_type_getter_conditional_helper< T >()) ::template type type
constexpr hash_base_t get_hash_in_base_type(const T &a) const noexcept(nothrow< T >)
constexpr hash_value_t repeat_times(hash_value_t value, size_t size) const noexcept
constexpr hash_value_t repeat_times(T &&value, size_t size) const noexcept
constexpr hash_value_t with_calculated_before(hash_value_t before, size_t before_size, const array_like_view_t< T > &a) const noexcept
constexpr hash_value_t with_calculated_before(hash_value_t before, size_t before_size, const T *a, size_t size) const noexcept
hash_value_t merge_array_hash_results(hash_value_t before, size_t before_size, hash_value_t after, size_t after_size) const noexcept
constexpr hash_base_t operator%(auto &&a) const noexcept
constexpr bool operator==(const hash_value_t &a) const noexcept
unstable_hash_value_t(const hash_value_t &a) noexcept
decltype(auto) _as(Args &&...rest) const noexcept(nothrow< Args... >)
decltype(auto) _as(Args &&...rest) const noexcept(nothrow< Args... >)
base_iterator_t< value_t, base_t_w > this_t
constexpr this_t operator+(ptrdiff_t num) const noexcept(noexcept((this_t(--(::std::declval< this_t & >())),++(::std::declval< this_t & >()))))
constexpr this_t operator-(ptrdiff_t num) const noexcept(noexcept(((::std::declval< this_t & >())+0)))
constexpr this_t operator++(int) &noexcept(noexcept((this_t(++(::std::declval< this_t & >())))))
constexpr this_t & operator--() &noexcept(is_before_getter_noexcept())
constexpr this_t & operator++() &noexcept(is_next_getter_noexcept())
same_base_t< value_t, base_t_w > base_t
constexpr this_t & operator=(const base_t_rw &a) &noexcept(copy_assign.nothrow< base_t_rw >)
constexpr this_t & operator=(base_t_rw &&a) &noexcept(move_assign.nothrow< base_t_rw >)
constexpr this_t operator--(int) &noexcept(noexcept((this_t(--(::std::declval< this_t & >())))))
constexpr this_t & operator=(this_t &&a) &noexcept
auto get_next() noexcept(is_get_next_noexcept())
constexpr auto operator==(const this_t &a) const noexcept
reverse_base_t< base_t_w, value_t > this_t
decltype(auto) get_value() noexcept(is_get_value_noexcept())
static constexpr bool is_get_value_noexcept() noexcept
static constexpr bool is_get_next_noexcept() noexcept
auto get_before() noexcept(is_get_before_noexcept())
static constexpr bool is_get_before_noexcept() noexcept
constexpr reverse_base_t(this_t &&a) noexcept(construct< base_t_rw >.nothrow< base_t_rw && >)
auto get_handle() noexcept(is_get_handle_noexcept())
static constexpr bool is_able_to_get_handle() noexcept
static constexpr bool is_get_handle_noexcept() noexcept
constexpr auto operator<=>(const this_t &a) const noexcept
constexpr reverse_base_t(build_base_t_T &&a) noexcept(construct< base_t_rw >.nothrow< build_base_t_T >)
static constexpr bool is_able_to_get_value() noexcept
constexpr reverse_base_t(const this_t &a) noexcept(construct< base_t_rw >.nothrow< const base_t_rw & >)
constexpr this_t & operator=(const this_t &a) &noexcept
constexpr logical_bool(special_init_t, bool is_true, bool is_false, bool is_unknown=0) noexcept
constexpr logical_bool(const logical_bool &) noexcept=default
constexpr logical_bool operator!() const noexcept
constexpr logical_bool & operator=(const logical_bool &) &noexcept=default
friend logical_bool operator&&(logical_bool a, logical_bool b) noexcept
friend logical_bool operator||(logical_bool a, logical_bool b) noexcept
friend logical_bool operator==(logical_bool a, logical_bool b) noexcept
constexpr logical_bool(bool a) noexcept
constexpr T operator()(ufloat_t new_ε) noexcept
auto operator()(T &&ε) const noexcept
static π_with_ε_impl_t< T > for_type
算术类型帮助类型 任何后续定义的新算术类型都可以重载这些类型来实现数学库的泛型支持
static constexpr auto negative_Inf() noexcept
static constexpr auto signaling_NaN() noexcept
decltype(λ{ if constexpr(is_float_type) return T() float_type
decltype(λ{ if constexpr(type_info< T >==type_info< bool >) return T() signed_type
decltype(λ{ if constexpr(is_integer_type) return T() integer_type
static constexpr auto quiet_NaN() noexcept
decltype(λ{ if constexpr(type_info< T >==type_info< bool >) return T() unsigned_type
constexpr auto operator()(T m) const noexcept
constexpr const number_T * begin() const noexcept
constexpr const number_T * end() const noexcept
prime_factorization_table_t< number_T, number > this_t
friend auto begin_of_array_like(const this_t &table) noexcept
friend auto end_of_array_like(this_t &table) noexcept
friend auto size_of_array_like(const this_t &) noexcept
constexpr size_t size() const noexcept
friend auto begin_of_array_like(this_t &table) noexcept
friend auto end_of_array_like(const this_t &table) noexcept
constexpr number_T operator[](size_t index) const noexcept
constexpr const number_T * end() const noexcept
constexpr number_T operator[](size_t index) const noexcept
unique_prime_factorization_table_t< number_T, number > this_t
constexpr const number_T * begin() const noexcept
friend auto begin_of_array_like(const this_t &table) noexcept
friend auto end_of_array_like(this_t &table) noexcept
friend auto size_of_array_like(const this_t &) noexcept
friend auto begin_of_array_like(this_t &table) noexcept
friend auto end_of_array_like(const this_t &table) noexcept
constexpr auto operator()(Args &&...rest) const noexcept
constexpr auto operator()(::std::initializer_list< T >l) const noexcept
decltype(type_helper< Args... >()) type
constexpr auto operator()(const type_info_t< T > &) const noexcept
constexpr auto operator()(::std::initializer_list< T >l) const noexcept
static constexpr for_type_t< T > for_type
constexpr auto operator()(Args &&...rest) const noexcept
constexpr auto operator()(::std::initializer_list< T >l) const noexcept
constexpr auto operator()(Args &&...rest) const noexcept
constexpr auto operator()(::std::initializer_list< T >l) const noexcept
decltype(type_helper< Args... >()) type
constexpr auto operator()(Args &&...rest) const noexcept
constexpr auto operator()(const type_info_t< T > &) const noexcept
引用计数从不为0的构造
constexpr non_copy_assign_able() noexcept=default
constexpr non_copy_construct_able & operator=(non_copy_construct_able &&) &noexcept=default
constexpr non_copy_construct_able(non_copy_construct_able &&)=default
constexpr non_copy_construct_able & operator=(const non_copy_construct_able &) &noexcept=default
constexpr non_copy_construct_able(const non_copy_construct_able &)=delete
禁止默认合成的复制
禁止默认合成的赋值
constexpr non_move_assign_able() noexcept=default
constexpr non_move_construct_able & operator=(const non_move_construct_able &) &noexcept=default
constexpr non_move_construct_able(const non_move_construct_able &)=default
constexpr non_move_construct_able & operator=(non_move_construct_able &&) &noexcept=default
constexpr non_move_construct_able(non_move_construct_able &&)=delete
禁止默认合成的移动
constexprauto base_get() const noexcept
bitmark提供了一种快速进行四种泛搜索的实现,前提是构建中的pattern中的每一项的usigned表示都在一个字节(表长)内。 若bitmark构建失败,程序应当使用正在进行的泛搜索的朴素实现版本...
constexpr bool operator[](T &index) const noexcept
constexpr bool mark(const array_like_view_t< T > &pattern) noexcept
bitmark提供了一种快速进行反索引的实现,前提是构建中的pattern中的每一项的usigned表示都在一个字节(表长)内。 若bitmark构建失败,程序应当使用正在进行的反索引的朴素实现版本。
constexpr size_t operator[](T &index) const noexcept
constexpr bool mark(const array_like_view_t< T > &pattern) noexcept
constexpr void bitmark_data_initer(size_t init_to) noexcept
sunday算法表头,用以实施头起始的快速子串匹配算法 大部分情况下应当编译时预构建或对运行时生成的实例进行缓存
constexpr T * match(const array_like_view_t< T > &range) const noexcept
constexpr match_pattern(const array_like_view_t< T > &pattern) noexcept
constexpr void build_table(const array_like_view_t< T > &pattern) noexcept
static constexpr index_type get_index_of(T &ch) noexcept
用以表示某类型的数值范围,仅可表示闭区间
constexpr range_t(note::from_t< const T >begin, note::to_t< const T >end)
constexpr auto end() noexcept
constexpr auto begin() noexcept
constexpr range_t(note::to_t< const T >end, note::from_t< const T >begin)
constexpr range_t(const T begin, note::size_t size)
constexpr size_t size() noexcept
constexpr auto begin() const noexcept
constexpr range_t(const T begin, note::size_type_t< const T >size)
constexpr auto end() const noexcept
constexpr range_t(const T begin, const T end)
反向Sunday算法表头,用以实施尾起始的快速子串匹配算法 大部分情况下应当编译时预构建或对运行时生成的实例进行缓存
constexpr void build_table(const array_like_view_t< T > &pattern) noexcept
constexpr reverse_match_pattern(const array_like_view_t< T > &pattern) noexcept
constexpr T * match(const array_like_view_t< T > &range) const noexcept
static constexpr index_type get_index_of(T &ch) noexcept
array_like_view_t的特化类型,表明这是字符串
constexpr string_view_t substr(const char_T *begin) const noexcept
constexpr const char_T * str() const noexcept
constexpr string_view_t(const_string_ptr_t str) noexcept
constexpr size_t find_last_not_of(const constexpr_str_t< char_T > &str) const
constexpr size_t find_first_not_of(string_view_t str) const
constexpr size_t reverse_find(string_view_t str) const
constexpr size_t find_last_not_of(string_view_t str) const
constexpr size_t find_last_of(const constexpr_str_t< char_T > &str) const
array_like_view_t< const char_T > base_t
constexpr size_t find_first_of(string_view_t str) const
constexpr string_view_t substr(const char_T *begin, size_t len) const noexcept
constexpr size_t reverse_find(const char_T ch) const
constexpr bool starts_with(string_view_t str) const noexcept
constexpr size_t find_first_not_of(const constexpr_str_t< char_T > &str) const
constexpr size_t find_last_of(const char_T ch) const
constexpr size_t find_last_of(string_view_t str) const
constexpr string_view_t substr(const char_T *begin, const char_T *end) const noexcept
constexpr bool starts_with(const char_T ch) const noexcept
constexpr size_t reverse_find(const constexpr_str_t< char_T > &str) const
constexpr size_t find(string_view_t str) const
constexpr string_view_t substr(size_t pos) const noexcept
constexpr size_t find_first_not_of(const char_T ch) const
constexpr string_view_t substr(size_t pos, size_t len) const noexcept
constexpr string_view_t substr(size_t pos, const char_T *end) const noexcept
constexpr bool starts_with(const char_T *str) const noexcept
constexpr size_t find_first_of(const constexpr_str_t< char_T > &str) const
constexpr size_t find(const constexpr_str_t< char_T > &str) const
constexpr size_t find_first_of(const char_T ch) const
constexpr size_t find_last_not_of(const char_T ch) const
constexpr size_t find(const char_T ch) const
constexpr const char_T * data() const noexcept
constexpr bool operator==(auto) noexcept
constexpr iterator_t & operator++() noexcept
constexpr this_t & operator*() noexcept
times_provider_t< T > this_t
constexpr times_provider_t(const T &v) noexcept
constexpr iterator_t begin()
static constexpr bool not_has_has_attribute_helper()
constexpr bool operator==(const ::std::type_info &a) const noexcept
constexpr type_info_t() noexcept
constexpr type_info_t(const type_info_t &) noexcept=default
static constexpr bool has_attribute_helper()
virtual base_type_info_t get_type_info() const noexcept=0
this_t & operator=(T &&a) noexcept(get_data_nothrow< T > &&promise_nothrow_at_destruct)
virtual Ret_t call(Args_t...) noexcept(noexcept((Ret_t()))) override final
virtual base_type_info_t get_type_info() const noexcept override final
virtual const void * get_data_begin() const noexcept override final
virtual bool equal_with(const void *) const noexcept override final
function_data_wrapper_t< T, Ret_t(Args_t...)> data_t
virtual bool equal_with(const void *a) const noexcept(equal.able< T >?equal.nothrow< T >:true) override final
virtual func_ptr_t get_func_ptr() const noexcept override final
virtual base_type_info_t get_type_info() const noexcept override final
virtual Ret_t call(Args_t...args) noexcept(invoke< T >.with_return_type< Ret_t >.nothrow< Args_t... >) override final
virtual const void * get_data_begin() const noexcept override final
bool operator==(const data_t &a) const noexcept(noexcept((a._value==*_m)))
auto_stack_t(base_t &&a) noexcept(noexcept((base_t(a))))
this_t & operator=(this_t &&a) &noexcept
auto_stack_t(const base_t &a) noexcept(noexcept((base_t(a))))
maybe_fail_reference< T > find(U &&a) noexcept(noexcept(((::std::declval< T & >())==a)))
bool in_stack(const T &a) const noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))
bool not_in_stack(const T &a) const noexcept(noexcept(((::std::declval< this_t >()).in_stack(a))))
virtual void clear() noexcept override
base_binary_function_node(function_t< void(ptr)> func) noexcept
virtual base_type_info_t get_type_info() const noexcept override
base_binary_function_node(function_t< value(ptr)> func) noexcept
virtual value be_call(ptr arg_list) override
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
base_binary_function_node(function_t< void()> func) noexcept
virtual value arec(const value index) override
virtual base_type_info_t get_type_info() const noexcept override
virtual constexpr size_t eq_level() const noexcept override
virtual constexpr size_t equal_level() const noexcept override
virtual constexpr ~base_constexpr_t() noexcept override=default
virtual void clear() noexcept override final
virtual void be_replace_as(ptr) noexcept override
virtual base_type_info_t get_type_info() const noexcept override final
virtual base_type_info_t get_additional_type_info() const noexcept=0
virtual void throw_self_ptr() override
virtual value arec(const value index) noexcept(arec_nothrow_helper) override
binary_node_t(const T &a) noexcept
virtual logical_bool was_eq_with(const_ptr a) const noexcept override
virtual void throw_self_ptr() const override
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
virtual base_type_info_t get_additional_type_info() const noexcept override
virtual void clear() noexcept(clear_nothrow_helper) override
virtual value be_eval() override
virtual base_type_info_t get_type_info() const noexcept override
map_t< value, const_weak_ptr > _m
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
virtual void clear() noexcept override
virtual base_type_info_t get_type_info() const noexcept override
virtual value arec(const value index) override
cons(ptr car, ptr cdr)
virtual value arec(const value index) override
virtual base_type_info_t get_type_info() const noexcept override
virtual void clear() noexcept override
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
virtual value be_eval() override
virtual base_type_info_t get_type_info() const noexcept override
virtual base_type_info_t get_type_info() const noexcept override
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
const_ptr operator&() const noexcept
value operator()(Args &&...rest)
virtual base_type_info_t get_type_info() const noexcept=0
virtual constexpr size_t eq_level() const noexcept
virtual constexpr size_t equal_level() const noexcept
virtual void waiting_for_destroy() noexcept
virtual void be_replace_as(ptr a) noexcept
node_like() noexcept=default
virtual ~node_like()=default
virtual value arec(const value)=0
logical_bool eq_with(const_ptr a) const noexcept
logical_bool operator==(const this_t &a) const noexcept
value operator[](auto &&index)
logical_bool equal_with(const_ptr a) const noexcept
virtual void clear() noexcept=0
virtual void be_replace_as(ptr) noexcept override
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
virtual base_type_info_t get_type_info() const noexcept override
virtual ~base_data_t() noexcept=default
virtual base_type_info_t get_type_info() const noexcept override final
constexpr_data_t(const constexpr_data_t &) noexcept=default
virtual ~constexpr_data_t() noexcept override final=default
virtual ptr get_value() noexcept override final
virtual base_data_t * copy() const noexcept override final
virtual ~null_data_t() noexcept override final=default
virtual base_type_info_t get_type_info() const noexcept override final
virtual ptr get_value() noexcept override final
virtual base_data_t * copy() const noexcept override final
virtual base_type_info_t get_type_info() const noexcept override final
variable_data_t(const variable_data_t &) noexcept=default
virtual ptr get_value() noexcept override final
virtual ~variable_data_t() noexcept override final=default
virtual base_data_t * copy() const noexcept override final
value(this_t &&a) noexcept=default
value(const this_t &a) noexcept=default
value(node_like *a) noexcept
auto operator!=(auto &&a) const
this_t & operator>>(this_t a) noexcept
auto operator[](T &&index)
const_ptr operator&() const
constexpr value(special_init_t) noexcept
~value() noexcept=default
void re_ref_to(this_t a) noexcept
auto operator==(auto &&a) const noexcept
value(base_data_t *a) noexcept
void ref_to(this_t a) noexcept
value(ptr a) noexcept
this_t & operator=(auto &&a)
void un_ref() noexcept
virtual constexpr size_t eq_level() const noexcept override
virtual base_type_info_t get_type_info() const noexcept override
virtual constexpr size_t equal_level() const noexcept override
virtual logical_bool was_equal_with(const_ptr a) const noexcept override
constexpr library_info_t(special_init_t) noexcept
void * get_symbol(string symbol_name) noexcept
symbol_t & get_symbol_as(string symbol_name) noexcept
library_info_t(string lib_name) noexcept
symbol_t(library_handle_t lib, string symbol_name, Ret_t(*self)(Args_t...) noexcept(nothrow)) noexcept
用于对特定类型进行alloc的类
static T * base_call(size_t size) noexcept
constexpr alloc_array_t operator[](size_t a) const noexcept
T * operator()(size_t size) const noexcept
对于特定类型的内存分配结果,获取分配大小并复制一份同样大小的内存
static T * base_call(const T *arg) noexcept(nothrow< T >)
T * operator()(const T *arg) const noexcept(nothrow< T >)
用于对特定类型进行free
static void base_call(T *p) noexcept
void operator()(T *p) const noexcept
用于自特定类型的内存分配结果获取分配大小 对于null_ptr,返回0 对于单个对象的分配,返回1
static size_t base_call(const T *arg) noexcept(nothrow< T >)
size_t operator()(const T *arg) const noexcept(nothrow< T >)
用于对特定类型进行realloc
constexpr realloc_array_t operator[](size_t a) const noexcept
static void base_call(T *&ptr, size_t nsize) noexcept
void operator()(T *&ptr, size_t nsize) const noexcept
mark_able_for_gc(const mark_able_for_gc &) noexcept
static T * base_call(const T *arg) noexcept(nothrow< T >)
T * operator()(const T *arg) const noexcept(nothrow< T >)
static void base_call(T *&arg, size_t insert_pos, size_t insert_size, const T *insert_data, size_t to_size, size_t used_size) noexcept(nothrow< T >)
constexpr used_size_index_result_t operator[](size_t used_size) const noexcept
static constexpr struct elc::defs::memory::get_n::get_forward_resize_t::insert_resize_t::with_used_size_t with_used_size
static void base_call(T *&arg, const size_t to_size) noexcept(nothrow< T >)
static constexpr struct elc::defs::memory::get_n::get_forward_resize_t::insert_resize_t insert_with_resize
void operator()(T *&arg, size_t to_size) const noexcept(nothrow< T >)
T * operator()(T *&&arg, size_t to_size) const noexcept(nothrow< T >)
static void base_call(T *&arg, size_t insert_pos, size_t insert_size, const T *insert_data, size_t to_size, size_t used_size) noexcept(nothrow< T >)
constexpr used_size_index_result_t operator[](size_t used_size) const noexcept
static constexpr struct elc::defs::memory::get_n::get_resize_t::insert_resize_t::with_used_size_t with_used_size
static constexpr struct elc::defs::memory::get_n::get_resize_t::insert_resize_t insert_with_resize
static void base_call(T *&arg, const size_t to_size) noexcept(nothrow< T >)
T * operator()(T *&&arg, size_t to_size) const noexcept(nothrow< T >)
void operator()(T *&arg, size_t to_size) const noexcept(nothrow< T >)
static constexpr struct elc::defs::memory::get_n::get_resize_t::insert_t insert
static size_t base_call(const T *arg) noexcept(nothrow< T >)
size_t operator()(const T *arg) const noexcept(nothrow< T >)
T * operator()(note::to_t< T *& > to, const T &a) const noexcept(nothrow< void >)
T * operator()(note::to_t< T *& > to, array_like_view_t< const T >a) const noexcept(nothrow< void >)
T * operator()(note::to_t< T *& > to, T &&a) const noexcept(nothrow< void >)
T * operator()(Args &&...rest) const noexcept(nothrow< Args... >)
T * operator()(array_like_view_t< const T >a) const noexcept(nothrow< void >)
bool operator()(array_like_view_t< const T >a, note::from_t< T * >from) const noexcept(nothrow< void >)
T * operator()(Args &&...rest) const noexcept(nothrow< Args... >)
constexpr array_get_t operator[](size_t size) const noexcept
void operator()(T *a) const noexcept(nothrow< T >)
static constexpr bool nothrow
void operator()(T *a, decltype(destruct)::not_t) const noexcept(nothrow< T >)
T * operator()(const T &v) const noexcept(nothrow< const T & >)
T * operator()(Args &&...rest) const noexcept(nothrow< Args... >)
void base_call(Args &&...rest) const noexcept(nothrow< Args... >)
constexpr array_construct_t operator[](size_t size) const noexcept
void base_call(Args &&...rest) const noexcept(nothrow< Args... >)
T * operator()(Args &&...rest) const noexcept(nothrow< Args... >)
T * operator()(const T &v) const noexcept(nothrow< const T & >)
T * operator()(T *to, const T *from) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< const T * >from) const noexcept(nothrow< T >)
T * operator()(const T &from, note::to_t< T * >to) const noexcept(nothrow< T >)
T * operator()(note::from_t< const T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, const T &from) const noexcept(nothrow< T >)
T * operator()(const T *from, T *to) const noexcept(nothrow< T >)
static T * base_call(T *to, const T &from, size_t size) noexcept(nothrow< T >)
static T * base_call(T *to, const T *from, size_t size) noexcept(nothrow< T >)
static T & base_call(T &a, const T &b) noexcept(nothrow< T >)
T & operator()(T &a, const T &b) const noexcept(nothrow< T >)
constexpr array_copy_assign_t operator[](size_t a) const noexcept
T * operator()(T *to, const T *from) const noexcept(nothrow< T >)
T * operator()(T *to, const T &from) const noexcept(nothrow< T >)
T * operator()(note::from_t< const T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< const T * >from) const noexcept(nothrow< T >)
T * operator()(T *to, const T *from) const noexcept(nothrow< T >)
T * operator()(note::from_t< const T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
static T * base_call(T *to, const T *from) noexcept(nothrow< T >)
T * operator()(T *to, const T &from) const noexcept(nothrow< T >)
static T * base_call(T *to, const T &from, size_t size) noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< const T * >from) const noexcept(nothrow< T >)
static T * base_call(T *to, const T &from) noexcept(nothrow< T >)
T * operator()(T *to, const T *from, size_t size) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< const T * >from, size_t size) const noexcept(nothrow< T >)
static T * base_call(T *to, const T *from, size_t size) noexcept(nothrow< T >)
constexpr array_copy_construct_t operator[](size_t a) const noexcept
T * operator()(note::from_t< const T * >from, note::to_t< T * >to, size_t size) const noexcept(nothrow< T >)
void operator()(T *begin) const noexcept(nothrow< T >)
static void base_call(T *to) noexcept(nothrow< T >)
constexpr array_destruct_t operator[](size_t size) const noexcept
constexpr not_t operator!() const noexcept
static void base_call(T *begin, size_t size) noexcept(nothrow< T >)
void operator()(T *begin) const noexcept(nothrow< T >)
T * operator()(T *to, T *from) const noexcept(nothrow< T >)
T * operator()(note::from_t< T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< T * >from) const noexcept(nothrow< T >)
T * operator()(note::from_t< T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< T * >from) const noexcept(nothrow< T >)
constexpr array_may_overlap_move_assign_t operator[](size_t a) const noexcept
static T * base_call(T *to, T *from, size_t size) noexcept(nothrow< T >)
static T & base_call(T &a, T &&b) noexcept(nothrow< T >)
static T * base_call(T *to, T *from, size_t size) noexcept(nothrow< T >)
constexpr array_move_assign_t operator[](size_t a) const noexcept
T & operator()(T &a, T &b) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< T * >from) const noexcept(nothrow< T >)
T * operator()(T *to, T *from) const noexcept(nothrow< T >)
T * operator()(note::from_t< T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
constexpr array_move_construct_t operator[](size_t a) const noexcept
T * operator()(note::to_t< T * >to, note::from_t< T * >from) const noexcept(nothrow< T >)
static T * base_call(T *to, T *from, size_t size) noexcept(nothrow< T >)
T * operator()(note::from_t< T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
static T * base_call(T *to, T *from) noexcept(nothrow< T >)
T * operator()(T *to, T *from) const noexcept(nothrow< T >)
T * operator()(note::to_t< T * >to, note::from_t< T * >from) const noexcept(nothrow< T >)
T * operator()(note::from_t< T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
T * operator()(T *to, T *from) const noexcept(nothrow< T >)
T * operator()(note::from_t< T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
static T * base_call(T *to, T *from, size_t size) noexcept(nothrow< T >)
static T * base_call(T *to, T *from) noexcept(nothrow< T >)
constexpr const T && operator()(const T &a) const noexcept
T * operator()(note::to_t< T * >to, note::from_t< T * >from) const noexcept(nothrow< T >)
T * operator()(T *to, T *from) const noexcept(nothrow< T >)
constexpr remove_ref< T > && operator()(T &&a) const noexcept
constexpr array_move_t operator[](size_t a) const noexcept
T * operator()(Args &&...rest) const noexcept(nothrow< T, Args... >)
constexpr array_re_construct_t< T > operator[](size_t size) const noexcept
T * operator()(Args &&...rest) const noexcept(nothrow< T, Args... >)
T * operator()(T *to) const noexcept(nothrow< T >)
constexpr placement_re_construct_t< T > operator[](T *p) const noexcept
constexpr void be_replace_as(T *new_p) noexcept
constexpr void be_replace_as(nullptr_t) noexcept
constexpr bool replaced() const noexcept
constexpr T * get_ptr() const noexcept
T & operator*() const noexcept(get_nothrow)
base_ptr_t & operator=(const same_ptr &a) &noexcept(reset_nothrow &&get_nothrow)
base_ptr_t & operator=(const base_ptr_t &a) &noexcept(reset_nothrow &&get_nothrow)
base_ptr_t & operator=(null_ptr_t) &noexcept(reset_nothrow)
T * operator->() const noexcept(get_nothrow)
ptr_t< T, ref_type, do_replace_check > base_t
decltype(auto) operator()(Args &&... rest) noexcept(invoke< T >.nothrow< Args... >)
base_ptr_t(base_ptr_t &a) noexcept
base_ptr_t & operator=(nullptr_t) &noexcept(reset_nothrow)
auto operator!() const noexcept(get_nothrow)
base_ptr_t< T, ref_type, do_replace_check > this_t
base_ptr_t & operator=(same_ref &&a) &noexcept
base_ptr_t(base_ptr_t &&a) noexcept
base_ptr_t & operator=(base_ptr_t &&a) &noexcept
base_ptr_t & operator=(T *a) &noexcept(reset_nothrow)
void do_replace(T *p) noexcept(replace_check_nothrow &&reset_nothrow)
auto operator==(nullptr_t) const noexcept(noexcept((operator==(null_ptr))))
auto operator==(const ptr_t< T, ref_type_, do_replace_check_ > &b) const noexcept(noexcept((pointer_equal((::std::declval< const this_t & >()).get(), b.get()))))
bool unique() const noexcept
constexpr ptr_t(nullptr_t=nullptr) noexcept
constexpr conditional< do_replace_check &&type_info< T >. template has_attribute_helper< replace_able >(), unstable_hash_t, hash_t > hash() const noexcept(noexcept((elc::defs::hash(get()))))
ptr_t(const same_ref &a) noexcept
constexpr ptr_t(null_ptr_t) noexcept
same_ref_p_t< T, ref_type > same_ref
ptr_t(const same_ptr &a) noexcept
void reset(T *a) const noexcept(reset_nothrow)
void replace_check() const noexcept(replace_check_nothrow)
ptr_t(T *a, special_init_t) noexcept
auto operator==(null_ptr_t) const noexcept(noexcept((operator==((T *) null_ptr))))
ptr_t(const ptr_t &a) noexcept
~ptr_t() noexcept(cut_nothrow)
void do_replace(const ptr_t< T, ref_type_, do_replace_check_ > &p) noexcept(replace_check_nothrow &&reset_nothrow)
void reset(nullptr_t=nullptr) const noexcept(reset_nothrow)
auto operator==(const T *a) const noexcept(noexcept((pointer_equal(add_const((::std::declval< const this_t & >()).get()), a))))
ptr_t< T, ref_type, do_replace_check > this_t
constexpr ptr_t(T *a) noexcept
same_ref_p_t< T, ref_type > base_t
T * get() const noexcept(get_nothrow)
ptr_t(const ptr_t< remove_cv< T >, ref_type, do_replace_check > &a) noexcept
virtual T & get() noexcept override
virtual void map_and_mark() noexcept override
same_ptr_p_t(const same_ptr_p_t &) noexcept=default
static void cut_ref(T *a) noexcept(cut_nothrow)
void swap_with(same_ref_p_t &a) noexcept
same_ref_p_t(const same_ptr_p_t< T > &a) noexcept
void cut_ref() const noexcept(noexcept((cut_ref(nullptr))))
static void add_ref(T *a) noexcept
void inter_namespace(const value namespace_name)
value get_symbol_type_map(ptr thenamespace)
ptr get_symbol_namespace(const value index)
value get_symbol(const value index)
bool has_symbol(const value index)
value get_symbol_type(const value index)
function_t< ptr(string lib_name, size_t lib_ver, string symbol_name) noexcept > load_interface
virtual int_t seek(seek_type dir, int_t off) noexcept override
friend handle_t get_handle_from(base_frefstream &stream) noexcept
virtual bool seek_to(int_t pos) noexcept override
virtual size_t read(char_T *buf, size_t size) noexcept override
virtual void write(const char_T *buf, size_t size) noexcept override
virtual size_t base_read_impl_for_wrapper(base_io_char_type *buf, size_t size) noexcept override
virtual void write(const base_io_char_type *buf, size_t size) noexcept override
virtual bool seek_to(int_t)=0
virtual int_t seek(seek_type, int_t)=0
code_cvted_text_orefstream(noexcept_text_ostream_t< char_T > &base) noexcept
virtual ~file_irefstream_impl() noexcept override=default
virtual ~file_orefstream_impl() noexcept override=default
virtual ~in_impl_t() noexcept override=default
void tie_with(noexcept_text_ostream_t< char_t > *stream) noexcept
virtual bool waitting_for_data() noexcept override
virtual void unread(const char_t *buf, size_t size) noexcept override
noexcept_text_ostream_t< char_t > * tie_with() noexcept
virtual size_t read(char_t *buf, size_t size) noexcept override
not_unreadable_code_cvted_text_irefstream(noexcept_text_istream_t< char_T > &base) noexcept
requires ::std::is_trivially_copyable_v< T > void unread(const T *v, size_t size=1)
virtual void unread(const byte *buf, size_t size)=0
requires ::std::is_trivially_copyable_v< T > size_t read(T *v, size_t size=1)
virtual size_t read(byte *buf, size_t size)=0
requires ::std::is_trivially_copyable_v< T > void write(const T *v, size_t size=1)
virtual void write(const byte *buf, size_t size)=0
virtual void flush() noexcept override
virtual void sync() noexcept override
virtual void seek_to(void *p) noexcept override
virtual void close() noexcept override
size_t bufsize() const noexcept
virtual void write(const byte *buf, size_t size) noexcept override
virtual void * seek(seek_type st, int_t offsize) noexcept override
virtual size_t read(byte *buf, size_t size) noexcept override
requires ::std::is_trivially_copyable_v< T > void unread(const T *v, size_t size=1) noexcept
virtual void unread(const byte *buf, size_t size) noexcept override=0
virtual void write(const byte *buf, size_t size) noexcept override=0
requires ::std::is_trivially_copyable_v< T > void write(const T *v, size_t size=1) noexcept
requires ::std::is_trivially_copyable_v< T > size_t read(T *v, size_t size=1) noexcept
virtual size_t read(byte *buf, size_t size) noexcept override=0
virtual bool waitting_for_data() noexcept override=0
virtual size_t read(char_T *buf, size_t size) noexcept override=0
virtual int_t seek(seek_type, int_t) noexcept override=0
virtual void sync() noexcept override=0
virtual int_t tell() noexcept override
virtual bool seek_to(int_t) noexcept override=0
virtual char_T peek() noexcept override
virtual char_T get() noexcept override
virtual void unread(const char_T *buf, size_t size) noexcept override=0
virtual void write(const char_T *buf, size_t size) noexcept override=0
virtual void unread(const byte *, size_t) noexcept override
virtual size_t read(byte *, size_t) noexcept override
virtual bool is_end() noexcept override
virtual void close() noexcept override
virtual bool waitting_for_data() noexcept override
virtual void flush() noexcept override
virtual void write(const byte *, size_t) noexcept override
virtual void sync() noexcept override
virtual int_t seek(seek_type, int_t) noexcept override
virtual bool seek_to(int_t) noexcept override
virtual int_t tell() noexcept override
virtual bool is_end() noexcept override
virtual bool seek_to(int_t) noexcept override
virtual bool waitting_for_data() noexcept override
virtual int_t tell() noexcept override
virtual size_t read(char_T *, size_t) noexcept override
virtual void sync() noexcept override
virtual void write(const char_T *, size_t) noexcept override
virtual void flush() noexcept override
virtual int_t seek(seek_type, int_t) noexcept override
virtual void unread(const char_T *, size_t) noexcept override
virtual void close() noexcept override
virtual void sync() noexcept override
virtual void flush() noexcept override
virtual ~std_istream_wrap() noexcept override=default
virtual size_t read(char_T *buf, size_t size) noexcept override
virtual void seek_to(int_t pos) noexcept override
virtual void close() noexcept override
virtual int_t tell() noexcept override
std_istream_wrap(stream_t &stream) noexcept
::std::basic_istream< char_T, traits > stream_t
virtual ~std_ostream_wrap() noexcept override=default
virtual int_t tell() noexcept override
std_ostream_wrap(stream_t &stream) noexcept
virtual void seek_to(int_t pos) noexcept override
virtual void sync() noexcept override
virtual void write(const char_T *buf, size_t size) noexcept override
virtual void close() noexcept override
virtual void flush() noexcept override
::std::basic_ostream< char_T, traits > stream_t
virtual void unread(const char_T *buf, size_t size)=0
virtual size_t read(char_T *buf, size_t size)=0
virtual void write(const char_T *buf, size_t size)=0
virtual compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >)=0
static void be_replace(this_t *a, ptr_t b) noexcept(ptr_reset_nothrow)
compare_type compare_with(ptr_t with) noexcept(compare.nothrow< char_T >)
static void be_replace(ptr_t &a, ptr_t b) noexcept(ptr_reset_nothrow)
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >)=0
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow)=0
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual float_size_t get_base_memory_cost() noexcept=0
hash_t get_hash(ptr_t &p) noexcept(hash_nothrow)
bool equal_with(ptr_t with) noexcept(equal.nothrow< char_T >)
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow)
bool equal_with(const_string_ptr_t with) noexcept(equal.nothrow< char_T >)
compare_type compare_with(ptr_t with, size_t pos, size_t size) noexcept(compare.nothrow< char_T >)
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow)=0
virtual ~base_string_data_t() noexcept(destruct_nothrow)=default
virtual void do_output(text_ostream_t< char_T > &os)
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept=0
compare_type default_compare_method(ptr_t with) noexcept(compare.nothrow< char_T >)
compare_type compare_with(const_string_ptr_t with) noexcept(compare.nothrow< char_T >)
bool equal_with(ptr_t with, size_t pos, size_t size) noexcept(equal.nothrow< char_T >)
hash_t get_others_hash_with_calculated_before(hash_t before, size_t before_size, ptr_t &p, size_t pos, size_t size) noexcept(hash_nothrow)
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &p, size_t pos, size_t size) noexcept(hash_nothrow)
virtual hash_t get_hash_detail(ptr_t &p) noexcept(hash_nothrow)
static void equivalent_optimization(auto &&a, auto &&b) noexcept(ptr_reset_nothrow)
virtual const char_T * get_data(ptr_t &p) noexcept(get_data_nothrow)
compare_type compare_with(string_view_t with) noexcept(compare.nothrow< char_T >)
virtual const range_n::reverse_match_pattern< const char_T > & get_reverse_match_pattern_from_self(ptr_t &self) noexcept(copy_assign_nothrow &&move_construct_nothrow)
virtual const range_n::match_pattern< const char_T > & get_match_pattern_from_self(ptr_t &self) noexcept(copy_assign_nothrow &&move_construct_nothrow)
compare_type compare_with_same_size(ptr_t with) noexcept(compare.nothrow< char_T >)
bool default_equal_method(ptr_t with) noexcept(equal.nothrow< char_T >)
bool equal_with_same_size(ptr_t with) noexcept(equal.nothrow< char_T >)
bool equal_with(string_view_t with) noexcept(equal.nothrow< char_T >)
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
comn_string_data_t(ptr_t str, size_t pos, size_t size) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual bool same_struct(ptr_t) noexcept override final
virtual string_ptr_t get_c_str(ptr_t &) noexcept override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
comn_string_data_t(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow)
comn_string_data_t(array_t< char_T > base) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual const range_n::reverse_match_pattern< const char_T > & get_reverse_match_pattern_from_self(ptr_t &self) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
comn_string_data_t(string_view_t str) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual const range_n::match_pattern< const char_T > & get_match_pattern_from_self(ptr_t &self) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual size_t get_size() noexcept override final
virtual float_size_t get_base_memory_cost() noexcept override final
comn_string_data_t(size_t size, char_T ch) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual ~comn_string_data_t() noexcept(destruct_nothrow) override final
virtual string_ptr_t get_unique_c_str(ptr_t &p) noexcept(get_data_nothrow) override final
comn_string_data_t(ptr_t str) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual const range_n::match_pattern< const char_T > & get_match_pattern_from_self(ptr_t &self) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual const_string_ptr_t get_const_c_str(ptr_t &p) noexcept(get_data_nothrow) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual const char_T * get_data(ptr_t &) noexcept(get_data_nothrow) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual size_t get_size() noexcept override final
constexpr_string_data_t(const constexpr_str_t< char_T > &str) noexcept
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual const range_n::reverse_match_pattern< const char_T > & get_reverse_match_pattern_from_self(ptr_t &self) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual ~constexpr_string_data_t() noexcept(destruct_nothrow) override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual ptr_t apply_str_to_end(ptr_t str) noexcept(apply_data_nothrow) override final
end_apply_string_data_t(ptr_t str, size_t count) noexcept
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual ptr_t do_insert(size_t pos, string_view_t str) noexcept(copy_construct_nothrow) override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
end_apply_string_data_t(ptr_t str, size_t count, char_T ch) noexcept
end_apply_string_data_t(ptr_t str, pre_alloc_t, size_t end_count) noexcept(construct_nothrow)
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
virtual ptr_t pre_alloc_after_end(size_t size) noexcept override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
end_apply_string_data_t(ptr_t str, string_view_t end) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual size_t get_size() noexcept override final
virtual string_ptr_t get_c_str(ptr_t &p) noexcept(get_data_nothrow) override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
virtual size_t get_size() noexcept override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual ptr_t apply_str_to_end(ptr_t str) noexcept(apply_data_nothrow) override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t do_erase(size_t pos, size_t size) noexcept override final
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
erased_string_data_t(ptr_t str, size_t erase_pos, size_t erase_size) noexcept
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
head_apply_string_data_t(ptr_t str, pre_alloc_t, size_t head_size) noexcept(construct_nothrow)
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual size_t get_size() noexcept override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
head_apply_string_data_t(ptr_t str, string_view_t head) noexcept(construct_nothrow &&copy_assign_nothrow)
virtual bool same_struct(ptr_t with) noexcept override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
void shrink() noexcept(_m.forward_resize_nothrow)
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual string_ptr_t get_c_str(ptr_t &p) noexcept(get_data_nothrow) override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual ptr_t do_insert(size_t pos, string_view_t str) noexcept(copy_construct_nothrow) override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual ptr_t apply_str_to_end(ptr_t str) noexcept(apply_data_nothrow) override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t pre_alloc_before_begin(size_t size) noexcept override final
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual ptr_t do_insert(size_t pos, string_view_t str) noexcept(copy_construct_nothrow) override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
virtual size_t get_size() noexcept override final
inserted_string_data_t(ptr_t to, ptr_t insert_data, size_t insert_pos) noexcept
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual ptr_t apply_str_to_end(ptr_t str) noexcept(apply_data_nothrow) override final
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t index) noexcept override final
virtual ptr_t do_erase(size_t pos, size_t size) noexcept override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual hash_t get_hash_detail(ptr_t &p) noexcept override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept override final
virtual size_t get_size() noexcept override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &p, size_t pos, size_t size) noexcept override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept override final
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual ptr_t do_erase(size_t pos, size_t size) noexcept override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual ptr_t apply_str_to_end(ptr_t str) noexcept override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept override final
virtual ptr_t do_insert(size_t pos, string_view_t str) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual ptr_t do_insert(size_t pos, ptr_t str) noexcept override final
virtual ptr_t do_remove_back(size_t size) noexcept override final
virtual char_T arec(size_t index) noexcept override final
virtual string_ptr_t get_c_str(ptr_t &) noexcept override final
virtual bool same_struct_equal(ptr_t with) noexcept override final
virtual ptr_t do_remove_front(size_t size) noexcept override final
virtual bool same_struct(ptr_t) noexcept override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
same_value_compress_string_data_t(size_t size, char_T value, ptr_t static_data_p) noexcept
substr_string_data_t(ptr_t str, size_t sub_begin, size_t sub_size) noexcept
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
virtual const char_T * get_data(ptr_t &) noexcept(get_data_nothrow) override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
virtual size_t get_size() noexcept override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual const_string_ptr_t get_const_c_str(ptr_t &p) noexcept(get_data_nothrow) override final
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual ptr_t apply_str_to_end(ptr_t str) noexcept(apply_data_nothrow) override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
virtual ptr_t apply_str_to_end(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual char_T arec(size_t index) noexcept(copy_construct_nothrow &&move_construct_nothrow) override final
virtual ptr_t do_pop_back(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
sum_string_data_t(ptr_t before, ptr_t after) noexcept
virtual ptr_t apply_str_to_end(ptr_t str) noexcept(apply_data_nothrow) override final
virtual hash_t get_others_hash_with_calculated_before_detail(hash_t before, size_t before_size, ptr_t &, size_t pos, size_t size) noexcept(hash_nothrow) override final
virtual bool same_struct(ptr_t with) noexcept override final
virtual ptr_t do_pop_front(size_t size, ptr_t &self) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual ptr_t apply_str_to_begin(string_view_t str) noexcept(copy_construct_nothrow &&apply_data_nothrow) override final
virtual void be_replace_as(ptr_t a) noexcept(clear_nothrow) override final
virtual ptr_t do_remove_back(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual hash_t get_hash_detail(ptr_t &) noexcept(hash_nothrow) override final
virtual bool same_struct_equal(ptr_t with) noexcept(equal.nothrow< char_T >) override final
virtual ptr_t apply_str_to_begin(ptr_t str) noexcept(apply_data_nothrow) override final
virtual base_t::compare_type same_struct_compare(ptr_t with) noexcept(compare.nothrow< char_T >) override final
virtual range_t< const char_T * > get_the_largest_complete_data_block_begin_form(size_t begin) noexcept override final
virtual ptr_t do_remove_front(size_t size) noexcept(construct_nothrow &&copy_assign_nothrow) override final
virtual float_size_t get_base_memory_cost() noexcept override final
virtual void arec_set(size_t index, char_T a, ptr_t &p) noexcept(copy_assign_nothrow &&move_construct_nothrow) override final
virtual size_t get_size() noexcept override final
virtual void copy_part_data_to(char_T *to, size_t pos, size_t size) noexcept(copy_assign_nothrow) override final
virtual ptr_t get_substr_data(size_t begin, size_t size) noexcept override final
void push_front(string_view_t str) &noexcept
size_t find(const string_t &str, size_t begin=0) const noexcept(find_nothrow)
void arec_set(size_t index, char_T a) noexcept
string_t & operator=(string_t &&str) &noexcept
void insert(size_t pos, const_string_ptr_t str) &noexcept
size_t find_last_not_of(const_string_ptr_t str) const noexcept(find_nothrow)
float_size_t memory_cost() const noexcept
auto operator[](float_t index) noexcept
string_t arec(size_t index, constexpr_str_t &delimiter_str) const
size_t find_first_of(const string_t &str) const noexcept(find_nothrow)
string_t(string_view_t str) noexcept
size_t size() const noexcept
string_t & operator=(const string_t &str) &noexcept
base_t_w::const_string_ptr_t const_string_ptr_t
size_t reverse_find(const char_T ch) const noexcept(find_nothrow)
constexpr bool starts_with(constexpr_str_t &str) const noexcept
this_t replace(char_T ch, const string_t &str) const noexcept
string_t(const_string_ptr_t str) noexcept
this_t replace(char_T ch, char_T ch2) const noexcept
void push_back(const arec_t &&ch, size_t count) &noexcept
string_t operator+(const string_t &str) const noexcept
string_t & operator+=(string_view_t str) &noexcept
size_t find_last_of(const string_t &str) const noexcept(find_nothrow)
size_t find_last_of(const arec_t &&ch) const noexcept(find_nothrow)
constexpr auto operator<=>(string_view_t a) const noexcept(compare.nothrow< char_T >)
this_t pad_right(size_t size, char_T ch) const noexcept
reverse_iterator_t< char_T, iterator_base_t > reverse_iterator
const char_T * data() const noexcept
void push_front(char_T ch, size_t count) &noexcept
constexpr bool ends_with(constexpr_str_t &str) const noexcept
char_T * writeable_data() noexcept
const_iterator cbegin() const noexcept
this_t replace(size_t pos, size_t size, const string_t &str) const noexcept
size_t find_first_not_of(char_T ch) const noexcept(find_nothrow)
void push_front(const arec_t &&ch, size_t count) &noexcept
void push_front(const arec_t &&ch) &noexcept
size_t find_last_not_of(const arec_t &&ch) const noexcept(find_nothrow)
void resize(size_t nsize) noexcept
const arec_t front() const noexcept
void push_back(const_string_ptr_t str) &noexcept
size_t find_last_of(constexpr_str_t &str) const noexcept(find_nothrow)
this_t & append(size_t size, char_T ch) noexcept
constexpr string_t() noexcept
size_t find_first_of(const arec_t &&ch) const noexcept(find_nothrow)
size_t length() const noexcept
constexpr bool contains(const_string_ptr_t str) const noexcept
size_t find_first_of(constexpr_str_t &str) const noexcept(find_nothrow)
constexpr auto operator==(constexpr_str_t &a) const noexcept(equal.nothrow< char_T >)
size_t find(string_view_t str, size_t begin=0) const noexcept(find_nothrow)
iterator get_iterator_at(ptrdiff_t index) noexcept
friend string_t operator+(char_T ch, const string_t &str) noexcept
reverse_const_iterator rcbegin() const noexcept
size_t reverse_find(const string_t &str) const noexcept(find_nothrow)
base_t_w::string_view_t string_view_t
size_t find(constexpr_str_t &str, size_t begin=0) const noexcept(find_nothrow)
const_iterator_t< char_T, const iterator_base_t > const_iterator
size_t find_last_not_of(const string_t &str) const noexcept(find_nothrow)
size_t find(const char_T ch, size_t begin) const noexcept(find_nothrow)
size_t reverse_find(constexpr_str_t &str) const noexcept(find_nothrow)
bool empty() const noexcept
const auto operator[](T index) const noexcept
const arec_t operator[](size_t index) const noexcept
constexpr string_t & operator=(constexpr_str_t &str) &noexcept
size_t find_first_of(char_T ch) const noexcept(find_nothrow)
friend auto & getline(text_istream_T &is, string_t &str) noexcept(noexcept_text_istream_class< text_istream_T >)
void push_back(char_T ch, size_t count) &noexcept
string_t & operator+=(const string_t &str) &noexcept
reverse_const_iterator rbegin() const noexcept
void push_back(char_T ch) &noexcept
constexpr bool contains(char_T ch) const noexcept
constexpr bool starts_with(char_T ch) const noexcept
string_t(size_t size) noexcept
constexpr auto operator<=>(const string_t &a) const noexcept(compare.nothrow< char_T >)
constexpr bool ends_with(const string_t &str) const noexcept
void insert(size_t pos, const string_t &str) &noexcept
auto operator[](T index) noexcept
void pre_alloc_before_begin(size_t size) noexcept
string_t(char_T ch, size_t size) noexcept
void push_front(const string_t &str) &noexcept
auto view() const &noexcept
size_t reverse_find(string_view_t str) const noexcept(find_nothrow)
const_iterator end() const noexcept
reverse_const_iterator get_reverse_iterator_at(ptrdiff_t index) const noexcept
size_t find_first_not_of(const string_t &str) const noexcept(find_nothrow)
size_t find_first_not_of(string_view_t str) const noexcept(find_nothrow)
constexpr bool starts_with(const string_t &str) const noexcept
string_t(string_t &&str) noexcept
string_t(array_t< char_t > base) noexcept
string_t && operator+(U &&b) &&noexcept(noexcept((*this+=b)))
void push_back(const string_t &str) &noexcept
iterator_t< char_T, iterator_base_t > iterator
constexpr bool ends_with(const_string_ptr_t str) const noexcept
constexpr auto operator<=>(constexpr_str_t &a) const noexcept(compare.nothrow< char_T >)
this_t pad_left(char_T ch, size_t size) const noexcept
size_t find_first_not_of(constexpr_str_t &str) const noexcept(find_nothrow)
reverse_const_iterator rend() const noexcept
arec_t operator[](size_t index) noexcept
constexpr bool contains(string_view_t str) const noexcept
string_t pop_front(size_t size) noexcept
const arec_t back() const noexcept
void insert(size_t pos, string_view_t str) &noexcept
base_t_w::string_ptr_t string_ptr_t
void push_back(string_t &&str) &noexcept
iterator begin() noexcept
size_t find_last_of(string_view_t str) const noexcept(find_nothrow)
string_t(size_t size, char_T ch) noexcept
this_t replace(const string_t &str1, const string_t &str2) const noexcept
size_t find_first_not_of(const arec_t &&ch) const noexcept(find_nothrow)
string_t & operator+=(const_string_ptr_t str) &noexcept
base_string_data_t< char_T > base_t_w
this_t pad_right(char_T ch, size_t size) const noexcept
string_t arec(size_t index, char_T delimiter) const
constexpr auto operator<=>(const_string_ptr_t a) const noexcept(compare.nothrow< char_T >)
void erase(size_t pos, size_t size=1) &noexcept
void push_front(string_t &&str) &noexcept
reverse_iterator rbegin() noexcept
void resize(size_t nsize, char_T ch) noexcept
string_t operator+(const arec_t &&ch) const noexcept
constexpr bool contains(constexpr_str_t &str) const noexcept
string_t arec(size_t index, const string_t &delimiter_str) const
size_t find_last_of(const_string_ptr_t str) const noexcept(find_nothrow)
string_ptr_t writeable_c_str() noexcept
size_t find_first_of(string_view_t str) const noexcept(find_nothrow)
size_t find_last_not_of(char_T ch) const noexcept(find_nothrow)
string_t & operator+=(const arec_t &&ch) &noexcept
char_T arec(size_t index) noexcept
size_t find_first_not_of(const_string_ptr_t str) const noexcept(find_nothrow)
friend string_t operator+(const_string_ptr_t str1, const string_t &str2) noexcept
string_t substr(size_t begin, size_t size=npos) const noexcept
const constexpr_str_t< char_T > constexpr_str_t
void swap_with(this_t &a) noexcept
string_t pop_back(size_t size) noexcept
void insert(size_t pos, char_T ch) &noexcept
void pre_alloc_after_end(size_t size) noexcept
reverse_const_iterator rcend() const noexcept
constexpr auto operator==(const_string_ptr_t a) const noexcept(equal.nothrow< char_T >)
string_t arec(size_t index, string_view_t delimiter_str) const
string_t operator+(const_string_ptr_t str) const noexcept
size_t find_last_not_of(string_view_t str) const noexcept(find_nothrow)
string_t & operator+=(char_T ch) &noexcept
size_t find_first_of(const_string_ptr_t str) const noexcept(find_nothrow)
size_t find_last_not_of(constexpr_str_t &str) const noexcept(find_nothrow)
constexpr auto operator==(string_view_t a) const noexcept(equal.nothrow< char_T >)
constexpr bool contains(const string_t &str) const noexcept
constexpr bool ends_with(char_T ch, size_t count) const noexcept
this_t pad_left(size_t size, char_T ch) const noexcept
void push_back(const arec_t &&ch) &noexcept
string_t(const_iterator begin, const_iterator end) noexcept
size_t find(const char_T ch) const noexcept(find_nothrow)
const_iterator get_iterator_at(ptrdiff_t index) const noexcept
void push_back(string_view_t str) &noexcept
constexpr bool starts_with(const_string_ptr_t str) const noexcept
void push_front(const_string_ptr_t str) &noexcept
constexpr bool ends_with(char_T ch) const noexcept
string_t & operator+=(string_t &&str) &noexcept
constexpr bool ends_with(string_view_t str) const noexcept
const auto operator[](float_t index) const noexcept
constexpr bool starts_with(string_view_t str) const noexcept
constexpr string_t & operator=(char_T ch) &noexcept
const_string_ptr_t c_str() const noexcept
const_iterator begin() const noexcept
string_t operator+(string_view_t str) const noexcept
void push_front(char_T ch) &noexcept
string_t(const string_t &str) noexcept
size_t find_last_of(char_T ch) const noexcept(find_nothrow)
void remove_front(size_t size=1) noexcept
auto to_string_view_t() const &noexcept
const_iterator cend() const noexcept
reverse_iterator rend() noexcept
friend string_t operator+(string_view_t str1, const string_t &str2) noexcept
constexpr string_t(char_T ch) noexcept
reverse_iterator get_reverse_iterator_at(ptrdiff_t index) noexcept
void remove_back(size_t size=1) noexcept
constexpr auto operator==(const string_t &a) const noexcept(equal.nothrow< char_T >)
constexpr string_t(constexpr_str_t &str) noexcept
reverse_const_iterator_t< char_T, const iterator_base_t > reverse_const_iterator