master
ブランチ master
ShaderPlayground / deps / sol2 / forward.hpp
35.9 KB、1321行 生 Blame 履歴
1// The MIT License (MIT)
2
3// Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
4
5// Permission is hereby granted, free of charge, to any person obtaining a copy of
6// this software and associated documentation files (the "Software"), to deal in
7// the Software without restriction, including without limitation the rights to
8// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9// the Software, and to permit persons to whom the Software is furnished to do so,
10// subject to the following conditions:
11
12// The above copyright notice and this permission notice shall be included in all
13// copies or substantial portions of the Software.
14
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22// This file was generated with a script.
23// Generated 2022-06-25 08:14:19.328625 UTC
24// This header was generated with sol v3.3.0 (revision eba86625)
25// https://github.com/ThePhD/sol2
26
27#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
28#define SOL_SINGLE_INCLUDE_FORWARD_HPP
29
30// beginning of sol/forward.hpp
31
32#ifndef SOL_FORWARD_HPP
33#define SOL_FORWARD_HPP
34
35// beginning of sol/version.hpp
36
37#include <sol/config.hpp>
38
39#define SOL_VERSION_MAJOR 3
40#define SOL_VERSION_MINOR 2
41#define SOL_VERSION_PATCH 3
42#define SOL_VERSION_STRING "3.2.3"
43#define SOL_VERSION ((SOL_VERSION_MAJOR * 100000) + (SOL_VERSION_MINOR * 100) + (SOL_VERSION_PATCH))
44
45#define SOL_TOKEN_TO_STRING_POST_EXPANSION_I_(_TOKEN) #_TOKEN
46#define SOL_TOKEN_TO_STRING_I_(_TOKEN) SOL_TOKEN_TO_STRING_POST_EXPANSION_I_(_TOKEN)
47
48#define SOL_CONCAT_TOKENS_POST_EXPANSION_I_(_LEFT, _RIGHT) _LEFT##_RIGHT
49#define SOL_CONCAT_TOKENS_I_(_LEFT, _RIGHT) SOL_CONCAT_TOKENS_POST_EXPANSION_I_(_LEFT, _RIGHT)
50
51#define SOL_RAW_IS_ON(OP_SYMBOL) ((3 OP_SYMBOL 3) != 0)
52#define SOL_RAW_IS_OFF(OP_SYMBOL) ((3 OP_SYMBOL 3) == 0)
53#define SOL_RAW_IS_DEFAULT_ON(OP_SYMBOL) ((3 OP_SYMBOL 3) > 3)
54#define SOL_RAW_IS_DEFAULT_OFF(OP_SYMBOL) ((3 OP_SYMBOL 3 OP_SYMBOL 3) < 0)
55
56#define SOL_IS_ON(OP_SYMBOL) SOL_RAW_IS_ON(OP_SYMBOL ## _I_)
57#define SOL_IS_OFF(OP_SYMBOL) SOL_RAW_IS_OFF(OP_SYMBOL ## _I_)
58#define SOL_IS_DEFAULT_ON(OP_SYMBOL) SOL_RAW_IS_DEFAULT_ON(OP_SYMBOL ## _I_)
59#define SOL_IS_DEFAULT_OFF(OP_SYMBOL) SOL_RAW_IS_DEFAULT_OFF(OP_SYMBOL ## _I_)
60
61#define SOL_ON |
62#define SOL_OFF ^
63#define SOL_DEFAULT_ON +
64#define SOL_DEFAULT_OFF -
65
66#if defined(SOL_BUILD_CXX_MODE)
67 #if (SOL_BUILD_CXX_MODE != 0)
68 #define SOL_BUILD_CXX_MODE_I_ SOL_ON
69 #else
70 #define SOL_BUILD_CXX_MODE_I_ SOL_OFF
71 #endif
72#elif defined(__cplusplus)
73 #define SOL_BUILD_CXX_MODE_I_ SOL_DEFAULT_ON
74#else
75 #define SOL_BUILD_CXX_MODE_I_ SOL_DEFAULT_OFF
76#endif
77
78#if defined(SOL_BUILD_C_MODE)
79 #if (SOL_BUILD_C_MODE != 0)
80 #define SOL_BUILD_C_MODE_I_ SOL_ON
81 #else
82 #define SOL_BUILD_C_MODE_I_ SOL_OFF
83 #endif
84#elif defined(__STDC__)
85 #define SOL_BUILD_C_MODE_I_ SOL_DEFAULT_ON
86#else
87 #define SOL_BUILD_C_MODE_I_ SOL_DEFAULT_OFF
88#endif
89
90#if SOL_IS_ON(SOL_BUILD_C_MODE)
91 #include <stddef.h>
92 #include <stdint.h>
93 #include <limits.h>
94#else
95 #include <cstddef>
96 #include <cstdint>
97 #include <climits>
98#endif
99
100#if defined(SOL_COMPILER_VCXX)
101 #if defined(SOL_COMPILER_VCXX != 0)
102 #define SOL_COMPILER_VCXX_I_ SOL_ON
103 #else
104 #define SOL_COMPILER_VCXX_I_ SOL_OFF
105 #endif
106#elif defined(_MSC_VER)
107 #define SOL_COMPILER_VCXX_I_ SOL_DEFAULT_ON
108#else
109 #define SOL_COMPILER_VCXX_I_ SOL_DEFAULT_OFF
110#endif
111
112#if defined(SOL_COMPILER_GCC)
113 #if defined(SOL_COMPILER_GCC != 0)
114 #define SOL_COMPILER_GCC_I_ SOL_ON
115 #else
116 #define SOL_COMPILER_GCC_I_ SOL_OFF
117 #endif
118#elif defined(__GNUC__)
119 #define SOL_COMPILER_GCC_I_ SOL_DEFAULT_ON
120#else
121 #define SOL_COMPILER_GCC_I_ SOL_DEFAULT_OFF
122#endif
123
124#if defined(SOL_COMPILER_CLANG)
125 #if defined(SOL_COMPILER_CLANG != 0)
126 #define SOL_COMPILER_CLANG_I_ SOL_ON
127 #else
128 #define SOL_COMPILER_CLANG_I_ SOL_OFF
129 #endif
130#elif defined(__clang__)
131 #define SOL_COMPILER_CLANG_I_ SOL_DEFAULT_ON
132#else
133 #define SOL_COMPILER_CLANG_I_ SOL_DEFAULT_OFF
134#endif
135
136#if defined(SOL_COMPILER_EDG)
137 #if defined(SOL_COMPILER_EDG != 0)
138 #define SOL_COMPILER_EDG_I_ SOL_ON
139 #else
140 #define SOL_COMPILER_EDG_I_ SOL_OFF
141 #endif
142#else
143 #define SOL_COMPILER_EDG_I_ SOL_DEFAULT_OFF
144#endif
145
146#if defined(SOL_COMPILER_MINGW)
147 #if (SOL_COMPILER_MINGW != 0)
148 #define SOL_COMPILER_MINGW_I_ SOL_ON
149 #else
150 #define SOL_COMPILER_MINGW_I_ SOL_OFF
151 #endif
152#elif defined(__MINGW32__)
153 #define SOL_COMPILER_MINGW_I_ SOL_DEFAULT_ON
154#else
155 #define SOL_COMPILER_MINGW_I_ SOL_DEFAULT_OFF
156#endif
157
158#if SIZE_MAX <= 0xFFFFULL
159 #define SOL_PLATFORM_X16_I_ SOL_ON
160 #define SOL_PLATFORM_X86_I_ SOL_OFF
161 #define SOL_PLATFORM_X64_I_ SOL_OFF
162#elif SIZE_MAX <= 0xFFFFFFFFULL
163 #define SOL_PLATFORM_X16_I_ SOL_OFF
164 #define SOL_PLATFORM_X86_I_ SOL_ON
165 #define SOL_PLATFORM_X64_I_ SOL_OFF
166#else
167 #define SOL_PLATFORM_X16_I_ SOL_OFF
168 #define SOL_PLATFORM_X86_I_ SOL_OFF
169 #define SOL_PLATFORM_X64_I_ SOL_ON
170#endif
171
172#define SOL_PLATFORM_ARM32_I_ SOL_OFF
173#define SOL_PLATFORM_ARM64_I_ SOL_OFF
174
175#if defined(SOL_PLATFORM_WINDOWS)
176 #if (SOL_PLATFORM_WINDOWS != 0)
177 #define SOL_PLATFORM_WINDOWS_I_ SOL_ON
178 #else
179 #define SOL_PLATFORM_WINDOWS_I_ SOL_OFF
180 #endif
181#elif defined(_WIN32)
182 #define SOL_PLATFORM_WINDOWS_I_ SOL_DEFAULT_ON
183#else
184 #define SOL_PLATFORM_WINDOWS_I_ SOL_DEFAULT_OFF
185#endif
186
187#if defined(SOL_PLATFORM_CYGWIN)
188 #if (SOL_PLATFORM_CYGWIN != 0)
189 #define SOL_PLATFORM_CYGWIN_I_ SOL_ON
190 #else
191 #define SOL_PLATFORM_CYGWIN_I_ SOL_ON
192 #endif
193#elif defined(__CYGWIN__)
194 #define SOL_PLATFORM_CYGWIN_I_ SOL_DEFAULT_ON
195#else
196 #define SOL_PLATFORM_CYGWIN_I_ SOL_DEFAULT_OFF
197#endif
198
199#if defined(SOL_PLATFORM_APPLE)
200 #if (SOL_PLATFORM_APPLE != 0)
201 #define SOL_PLATFORM_APPLE_I_ SOL_ON
202 #else
203 #define SOL_PLATFORM_APPLE_I_ SOL_OFF
204 #endif
205#elif defined(__APPLE__)
206 #define SOL_PLATFORM_APPLE_I_ SOL_DEFAULT_ON
207#else
208 #define SOL_PLATFORM_APPLE_I_ SOL_DEFAULT_OFF
209#endif
210
211#if defined(SOL_PLATFORM_UNIX)
212 #if (SOL_PLATFORM_UNIX != 0)
213 #define SOL_PLATFORM_UNIXLIKE_I_ SOL_ON
214 #else
215 #define SOL_PLATFORM_UNIXLIKE_I_ SOL_OFF
216 #endif
217#elif defined(__unix__)
218 #define SOL_PLATFORM_UNIXLIKE_I_ SOL_DEFAUKT_ON
219#else
220 #define SOL_PLATFORM_UNIXLIKE_I_ SOL_DEFAULT_OFF
221#endif
222
223#if defined(SOL_PLATFORM_LINUX)
224 #if (SOL_PLATFORM_LINUX != 0)
225 #define SOL_PLATFORM_LINUXLIKE_I_ SOL_ON
226 #else
227 #define SOL_PLATFORM_LINUXLIKE_I_ SOL_OFF
228 #endif
229#elif defined(__LINUX__)
230 #define SOL_PLATFORM_LINUXLIKE_I_ SOL_DEFAUKT_ON
231#else
232 #define SOL_PLATFORM_LINUXLIKE_I_ SOL_DEFAULT_OFF
233#endif
234
235#define SOL_PLATFORM_APPLE_IPHONE_I_ SOL_OFF
236#define SOL_PLATFORM_BSDLIKE_I_ SOL_OFF
237
238#if defined(SOL_IN_DEBUG_DETECTED)
239 #if SOL_IN_DEBUG_DETECTED != 0
240 #define SOL_DEBUG_BUILD_I_ SOL_ON
241 #else
242 #define SOL_DEBUG_BUILD_I_ SOL_OFF
243 #endif
244#elif !defined(NDEBUG)
245 #if SOL_IS_ON(SOL_COMPILER_VCXX) && defined(_DEBUG)
246 #define SOL_DEBUG_BUILD_I_ SOL_ON
247 #elif (SOL_IS_ON(SOL_COMPILER_CLANG) || SOL_IS_ON(SOL_COMPILER_GCC)) && !defined(__OPTIMIZE__)
248 #define SOL_DEBUG_BUILD_I_ SOL_ON
249 #else
250 #define SOL_DEBUG_BUILD_I_ SOL_OFF
251 #endif
252#else
253 #define SOL_DEBUG_BUILD_I_ SOL_DEFAULT_OFF
254#endif // We are in a debug mode of some sort
255
256#if defined(SOL_NO_EXCEPTIONS)
257 #if (SOL_NO_EXCEPTIONS != 0)
258 #define SOL_EXCEPTIONS_I_ SOL_OFF
259 #else
260 #define SOL_EXCEPTIONS_I_ SOL_ON
261 #endif
262#elif SOL_IS_ON(SOL_COMPILER_VCXX)
263 #if !defined(_CPPUNWIND)
264 #define SOL_EXCEPTIONS_I_ SOL_OFF
265 #else
266 #define SOL_EXCEPTIONS_I_ SOL_ON
267 #endif
268#elif SOL_IS_ON(SOL_COMPILER_CLANG) || SOL_IS_ON(SOL_COMPILER_GCC)
269 #if !defined(__EXCEPTIONS)
270 #define SOL_EXCEPTIONS_I_ SOL_OFF
271 #else
272 #define SOL_EXCEPTIONS_I_ SOL_ON
273 #endif
274#else
275 #define SOL_EXCEPTIONS_I_ SOL_DEFAULT_ON
276#endif
277
278#if defined(SOL_NO_RTTI)
279 #if (SOL_NO_RTTI != 0)
280 #define SOL_RTTI_I_ SOL_OFF
281 #else
282 #define SOL_RTTI_I_ SOL_ON
283 #endif
284#elif SOL_IS_ON(SOL_COMPILER_VCXX)
285 #if !defined(_CPPRTTI)
286 #define SOL_RTTI_I_ SOL_OFF
287 #else
288 #define SOL_RTTI_I_ SOL_ON
289 #endif
290#elif SOL_IS_ON(SOL_COMPILER_CLANG) || SOL_IS_ON(SOL_COMPILER_GCC)
291 #if !defined(__GXX_RTTI)
292 #define SOL_RTTI_I_ SOL_OFF
293 #else
294 #define SOL_RTTI_I_ SOL_ON
295 #endif
296#else
297 #define SOL_RTTI_I_ SOL_DEFAULT_ON
298#endif
299
300#if defined(SOL_NO_THREAD_LOCAL)
301 #if SOL_NO_THREAD_LOCAL != 0
302 #define SOL_USE_THREAD_LOCAL_I_ SOL_OFF
303 #else
304 #define SOL_USE_THREAD_LOCAL_I_ SOL_ON
305 #endif
306#else
307 #define SOL_USE_THREAD_LOCAL_I_ SOL_DEFAULT_ON
308#endif // thread_local keyword is bjorked on some platforms
309
310#if defined(SOL_ALL_SAFETIES_ON)
311 #if SOL_ALL_SAFETIES_ON != 0
312 #define SOL_ALL_SAFETIES_ON_I_ SOL_ON
313 #else
314 #define SOL_ALL_SAFETIES_ON_I_ SOL_OFF
315 #endif
316#else
317 #define SOL_ALL_SAFETIES_ON_I_ SOL_DEFAULT_OFF
318#endif
319
320#if defined(SOL_SAFE_GETTER)
321 #if SOL_SAFE_GETTER != 0
322 #define SOL_SAFE_GETTER_I_ SOL_ON
323 #else
324 #define SOL_SAFE_GETTER_I_ SOL_OFF
325 #endif
326#else
327 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
328 #define SOL_SAFE_GETTER_I_ SOL_ON
329 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
330 #define SOL_SAFE_GETTER_I_ SOL_DEFAULT_ON
331 #else
332 #define SOL_SAFE_GETTER_I_ SOL_DEFAULT_OFF
333 #endif
334#endif
335
336#if defined(SOL_SAFE_USERTYPE)
337 #if SOL_SAFE_USERTYPE != 0
338 #define SOL_SAFE_USERTYPE_I_ SOL_ON
339 #else
340 #define SOL_SAFE_USERTYPE_I_ SOL_OFF
341 #endif
342#else
343 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
344 #define SOL_SAFE_USERTYPE_I_ SOL_ON
345 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
346 #define SOL_SAFE_USERTYPE_I_ SOL_DEFAULT_ON
347 #else
348 #define SOL_SAFE_USERTYPE_I_ SOL_DEFAULT_OFF
349 #endif
350#endif
351
352#if defined(SOL_SAFE_REFERENCES)
353 #if SOL_SAFE_REFERENCES != 0
354 #define SOL_SAFE_REFERENCES_I_ SOL_ON
355 #else
356 #define SOL_SAFE_REFERENCES_I_ SOL_OFF
357 #endif
358#else
359 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
360 #define SOL_SAFE_REFERENCES_I_ SOL_ON
361 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
362 #define SOL_SAFE_REFERENCES_I_ SOL_DEFAULT_ON
363 #else
364 #define SOL_SAFE_REFERENCES_I_ SOL_DEFAULT_OFF
365 #endif
366#endif
367
368#if defined(SOL_SAFE_FUNCTIONS)
369 #if SOL_SAFE_FUNCTIONS != 0
370 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
371 #else
372 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_OFF
373 #endif
374#elif defined (SOL_SAFE_FUNCTION_OBJECTS)
375 #if SOL_SAFE_FUNCTION_OBJECTS != 0
376 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
377 #else
378 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_OFF
379 #endif
380#else
381 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
382 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
383 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
384 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_DEFAULT_ON
385 #else
386 #define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_DEFAULT_OFF
387 #endif
388#endif
389
390#if defined(SOL_SAFE_FUNCTION_CALLS)
391 #if SOL_SAFE_FUNCTION_CALLS != 0
392 #define SOL_SAFE_FUNCTION_CALLS_I_ SOL_ON
393 #else
394 #define SOL_SAFE_FUNCTION_CALLS_I_ SOL_OFF
395 #endif
396#else
397 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
398 #define SOL_SAFE_FUNCTION_CALLS_I_ SOL_ON
399 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
400 #define SOL_SAFE_FUNCTION_CALLS_I_ SOL_DEFAULT_ON
401 #else
402 #define SOL_SAFE_FUNCTION_CALLS_I_ SOL_DEFAULT_OFF
403 #endif
404#endif
405
406#if defined(SOL_SAFE_PROXIES)
407 #if SOL_SAFE_PROXIES != 0
408 #define SOL_SAFE_PROXIES_I_ SOL_ON
409 #else
410 #define SOL_SAFE_PROXIES_I_ SOL_OFF
411 #endif
412#else
413 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
414 #define SOL_SAFE_PROXIES_I_ SOL_ON
415 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
416 #define SOL_SAFE_PROXIES_I_ SOL_DEFAULT_ON
417 #else
418 #define SOL_SAFE_PROXIES_I_ SOL_DEFAULT_OFF
419 #endif
420#endif
421
422#if defined(SOL_SAFE_NUMERICS)
423 #if SOL_SAFE_NUMERICS != 0
424 #define SOL_SAFE_NUMERICS_I_ SOL_ON
425 #else
426 #define SOL_SAFE_NUMERICS_I_ SOL_OFF
427 #endif
428#else
429 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
430 #define SOL_SAFE_NUMERICS_I_ SOL_ON
431 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
432 #define SOL_SAFE_NUMERICS_I_ SOL_DEFAULT_ON
433 #else
434 #define SOL_SAFE_NUMERICS_I_ SOL_DEFAULT_OFF
435 #endif
436#endif
437
438#if defined(SOL_ALL_INTEGER_VALUES_FIT)
439 #if (SOL_ALL_INTEGER_VALUES_FIT != 0)
440 #define SOL_ALL_INTEGER_VALUES_FIT_I_ SOL_ON
441 #else
442 #define SOL_ALL_INTEGER_VALUES_FIT_I_ SOL_OFF
443 #endif
444#elif !SOL_IS_DEFAULT_OFF(SOL_SAFE_NUMERICS) && SOL_IS_OFF(SOL_SAFE_NUMERICS)
445 // if numerics is intentionally turned off, flip this on
446 #define SOL_ALL_INTEGER_VALUES_FIT_I_ SOL_DEFAULT_ON
447#else
448 // default to off
449 #define SOL_ALL_INTEGER_VALUES_FIT_I_ SOL_DEFAULT_OFF
450#endif
451
452#if defined(SOL_SAFE_STACK_CHECK)
453 #if SOL_SAFE_STACK_CHECK != 0
454 #define SOL_SAFE_STACK_CHECK_I_ SOL_ON
455 #else
456 #define SOL_SAFE_STACK_CHECK_I_ SOL_OFF
457 #endif
458#else
459 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
460 #define SOL_SAFE_STACK_CHECK_I_ SOL_ON
461 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
462 #define SOL_SAFE_STACK_CHECK_I_ SOL_DEFAULT_ON
463 #else
464 #define SOL_SAFE_STACK_CHECK_I_ SOL_DEFAULT_OFF
465 #endif
466#endif
467
468#if defined(SOL_NO_CHECK_NUMBER_PRECISION)
469 #if SOL_NO_CHECK_NUMBER_PRECISION != 0
470 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
471 #else
472 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
473 #endif
474#elif defined(SOL_NO_CHECKING_NUMBER_PRECISION)
475 #if SOL_NO_CHECKING_NUMBER_PRECISION != 0
476 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
477 #else
478 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
479 #endif
480#else
481 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
482 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
483 #elif SOL_IS_ON(SOL_SAFE_NUMERICS)
484 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
485 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
486 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_DEFAULT_ON
487 #else
488 #define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_DEFAULT_OFF
489 #endif
490#endif
491
492#if defined(SOL_STRINGS_ARE_NUMBERS)
493 #if (SOL_STRINGS_ARE_NUMBERS != 0)
494 #define SOL_STRINGS_ARE_NUMBERS_I_ SOL_ON
495 #else
496 #define SOL_STRINGS_ARE_NUMBERS_I_ SOL_OFF
497 #endif
498#else
499 #define SOL_STRINGS_ARE_NUMBERS_I_ SOL_DEFAULT_OFF
500#endif
501
502#if defined(SOL_ENABLE_INTEROP)
503 #if SOL_ENABLE_INTEROP != 0
504 #define SOL_USE_INTEROP_I_ SOL_ON
505 #else
506 #define SOL_USE_INTEROP_I_ SOL_OFF
507 #endif
508#elif defined(SOL_USE_INTEROP)
509 #if SOL_USE_INTEROP != 0
510 #define SOL_USE_INTEROP_I_ SOL_ON
511 #else
512 #define SOL_USE_INTEROP_I_ SOL_OFF
513 #endif
514#else
515 #define SOL_USE_INTEROP_I_ SOL_DEFAULT_OFF
516#endif
517
518#if defined(SOL_NO_NIL)
519 #if (SOL_NO_NIL != 0)
520 #define SOL_NIL_I_ SOL_OFF
521 #else
522 #define SOL_NIL_I_ SOL_ON
523 #endif
524#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) || defined(__OBJC__) || defined(nil)
525 #define SOL_NIL_I_ SOL_DEFAULT_OFF
526#else
527 #define SOL_NIL_I_ SOL_DEFAULT_ON
528#endif
529
530#if defined(SOL_USERTYPE_TYPE_BINDING_INFO)
531 #if (SOL_USERTYPE_TYPE_BINDING_INFO != 0)
532 #define SOL_USERTYPE_TYPE_BINDING_INFO_I_ SOL_ON
533 #else
534 #define SOL_USERTYPE_TYPE_BINDING_INFO_I_ SOL_OFF
535 #endif
536#else
537 #define SOL_USERTYPE_TYPE_BINDING_INFO_I_ SOL_DEFAULT_ON
538#endif // We should generate a my_type.__type table with lots of class information for usertypes
539
540#if defined(SOL_AUTOMAGICAL_TYPES_BY_DEFAULT)
541 #if (SOL_AUTOMAGICAL_TYPES_BY_DEFAULT != 0)
542 #define SOL_DEFAULT_AUTOMAGICAL_USERTYPES_I_ SOL_ON
543 #else
544 #define SOL_DEFAULT_AUTOMAGICAL_USERTYPES_I_ SOL_OFF
545 #endif
546#elif defined(SOL_DEFAULT_AUTOMAGICAL_USERTYPES)
547 #if (SOL_DEFAULT_AUTOMAGICAL_USERTYPES != 0)
548 #define SOL_DEFAULT_AUTOMAGICAL_USERTYPES_I_ SOL_ON
549 #else
550 #define SOL_DEFAULT_AUTOMAGICAL_USERTYPES_I_ SOL_OFF
551 #endif
552#else
553 #define SOL_DEFAULT_AUTOMAGICAL_USERTYPES_I_ SOL_DEFAULT_ON
554#endif // make is_automagical on/off by default
555
556#if defined(SOL_STD_VARIANT)
557 #if (SOL_STD_VARIANT != 0)
558 #define SOL_STD_VARIANT_I_ SOL_ON
559 #else
560 #define SOL_STD_VARIANT_I_ SOL_OFF
561 #endif
562#else
563 #if SOL_IS_ON(SOL_COMPILER_CLANG) && SOL_IS_ON(SOL_PLATFORM_APPLE)
564 #if defined(__has_include)
565 #if __has_include(<variant>)
566 #define SOL_STD_VARIANT_I_ SOL_DEFAULT_ON
567 #else
568 #define SOL_STD_VARIANT_I_ SOL_DEFAULT_OFF
569 #endif
570 #else
571 #define SOL_STD_VARIANT_I_ SOL_DEFAULT_OFF
572 #endif
573 #else
574 #define SOL_STD_VARIANT_I_ SOL_DEFAULT_ON
575 #endif
576#endif // make is_automagical on/off by default
577
578#if defined(SOL_NOEXCEPT_FUNCTION_TYPE)
579 #if (SOL_NOEXCEPT_FUNCTION_TYPE != 0)
580 #define SOL_USE_NOEXCEPT_FUNCTION_TYPE_I_ SOL_ON
581 #else
582 #define SOL_USE_NOEXCEPT_FUNCTION_TYPE_I_ SOL_OFF
583 #endif
584#else
585 #if defined(__cpp_noexcept_function_type)
586 #define SOL_USE_NOEXCEPT_FUNCTION_TYPE_I_ SOL_ON
587 #elif SOL_IS_ON(SOL_COMPILER_VCXX) && (defined(_MSVC_LANG) && (_MSVC_LANG < 201403L))
588 // There is a bug in the VC++ compiler??
589 // on /std:c++latest under x86 conditions (VS 15.5.2),
590 // compiler errors are tossed for noexcept markings being on function types
591 // that are identical in every other way to their non-noexcept marked types function types...
592 // VS 2019: There is absolutely a bug.
593 #define SOL_USE_NOEXCEPT_FUNCTION_TYPE_I_ SOL_OFF
594 #else
595 #define SOL_USE_NOEXCEPT_FUNCTION_TYPE_I_ SOL_DEFAULT_ON
596 #endif
597#endif // noexcept is part of a function's type
598
599#if defined(SOL_STACK_STRING_OPTIMIZATION_SIZE) && SOL_STACK_STRING_OPTIMIZATION_SIZE > 0
600 #define SOL_OPTIMIZATION_STRING_CONVERSION_STACK_SIZE_I_ SOL_STACK_STRING_OPTIMIZATION_SIZE
601#else
602 #define SOL_OPTIMIZATION_STRING_CONVERSION_STACK_SIZE_I_ 1024
603#endif
604
605#if defined(SOL_ID_SIZE) && SOL_ID_SIZE > 0
606 #define SOL_ID_SIZE_I_ SOL_ID_SIZE
607#else
608 #define SOL_ID_SIZE_I_ 512
609#endif
610
611#if defined(LUA_IDSIZE) && LUA_IDSIZE > 0
612 #define SOL_FILE_ID_SIZE_I_ LUA_IDSIZE
613#elif defined(SOL_ID_SIZE) && SOL_ID_SIZE > 0
614 #define SOL_FILE_ID_SIZE_I_ SOL_FILE_ID_SIZE
615#else
616 #define SOL_FILE_ID_SIZE_I_ 2048
617#endif
618
619#if defined(SOL_PRINT_ERRORS)
620 #if (SOL_PRINT_ERRORS != 0)
621 #define SOL_PRINT_ERRORS_I_ SOL_ON
622 #else
623 #define SOL_PRINT_ERRORS_I_ SOL_OFF
624 #endif
625#else
626 #if SOL_IS_ON(SOL_ALL_SAFETIES_ON)
627 #define SOL_PRINT_ERRORS_I_ SOL_ON
628 #elif SOL_IS_ON(SOL_DEBUG_BUILD)
629 #define SOL_PRINT_ERRORS_I_ SOL_DEFAULT_ON
630 #else
631 #define SOL_PRINT_ERRORS_I_ SOL_OFF
632 #endif
633#endif
634
635#if defined(SOL_DEFAULT_PASS_ON_ERROR)
636 #if (SOL_DEFAULT_PASS_ON_ERROR != 0)
637 #define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_ON
638 #else
639 #define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_OFF
640 #endif
641#else
642 #define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_DEFAULT_OFF
643#endif
644
645#if defined(SOL_USING_CXX_LUA)
646 #if (SOL_USING_CXX_LUA != 0)
647 #define SOL_USE_CXX_LUA_I_ SOL_ON
648 #else
649 #define SOL_USE_CXX_LUA_I_ SOL_OFF
650 #endif
651#elif defined(SOL_USE_CXX_LUA)
652 #if (SOL_USE_CXX_LUA != 0)
653 #define SOL_USE_CXX_LUA_I_ SOL_ON
654 #else
655 #define SOL_USE_CXX_LUA_I_ SOL_OFF
656 #endif
657#else
658 #define SOL_USE_CXX_LUA_I_ SOL_DEFAULT_OFF
659#endif
660
661#if defined(SOL_USING_CXX_LUAJIT)
662 #if (SOL_USING_CXX_LUA != 0)
663 #define SOL_USE_CXX_LUAJIT_I_ SOL_ON
664 #else
665 #define SOL_USE_CXX_LUAJIT_I_ SOL_OFF
666 #endif
667#elif defined(SOL_USE_CXX_LUAJIT)
668 #if (SOL_USE_CXX_LUA != 0)
669 #define SOL_USE_CXX_LUAJIT_I_ SOL_ON
670 #else
671 #define SOL_USE_CXX_LUAJIT_I_ SOL_OFF
672 #endif
673#else
674 #define SOL_USE_CXX_LUAJIT_I_ SOL_DEFAULT_OFF
675#endif
676
677#if defined(SOL_NO_LUA_HPP)
678 #if (SOL_NO_LUA_HPP != 0)
679 #define SOL_USE_LUA_HPP_I_ SOL_OFF
680 #else
681 #define SOL_USE_LUA_HPP_I_ SOL_ON
682 #endif
683#elif defined(SOL_USING_CXX_LUA)
684 #define SOL_USE_LUA_HPP_I_ SOL_OFF
685#elif defined(__has_include)
686 #if __has_include(<lua.hpp>)
687 #define SOL_USE_LUA_HPP_I_ SOL_ON
688 #else
689 #define SOL_USE_LUA_HPP_I_ SOL_OFF
690 #endif
691#else
692 #define SOL_USE_LUA_HPP_I_ SOL_DEFAULT_ON
693#endif
694
695#if defined(SOL_CONTAINERS_START)
696 #define SOL_CONTAINER_START_INDEX_I_ SOL_CONTAINERS_START
697#elif defined(SOL_CONTAINERS_START_INDEX)
698 #define SOL_CONTAINER_START_INDEX_I_ SOL_CONTAINERS_START_INDEX
699#elif defined(SOL_CONTAINER_START_INDEX)
700 #define SOL_CONTAINER_START_INDEX_I_ SOL_CONTAINER_START_INDEX
701#else
702 #define SOL_CONTAINER_START_INDEX_I_ 1
703#endif
704
705#if defined (SOL_NO_MEMORY_ALIGNMENT)
706 #if (SOL_NO_MEMORY_ALIGNMENT != 0)
707 #define SOL_ALIGN_MEMORY_I_ SOL_OFF
708 #else
709 #define SOL_ALIGN_MEMORY_I_ SOL_ON
710 #endif
711#else
712 #define SOL_ALIGN_MEMORY_I_ SOL_DEFAULT_ON
713#endif
714
715#if defined(SOL_USE_BOOST)
716 #if (SOL_USE_BOOST != 0)
717 #define SOL_USE_BOOST_I_ SOL_ON
718 #else
719 #define SOL_USE_BOOST_I_ SOL_OFF
720 #endif
721#else
722 #define SOL_USE_BOOST_I_ SOL_DEFAULT_OFF
723#endif
724
725#if defined(SOL_USE_UNSAFE_BASE_LOOKUP)
726 #if (SOL_USE_UNSAFE_BASE_LOOKUP != 0)
727 #define SOL_USE_UNSAFE_BASE_LOOKUP_I_ SOL_ON
728 #else
729 #define SOL_USE_UNSAFE_BASE_LOOKUP_I_ SOL_OFF
730 #endif
731#else
732 #define SOL_USE_UNSAFE_BASE_LOOKUP_I_ SOL_DEFAULT_OFF
733#endif
734
735#if defined(SOL_INSIDE_UNREAL)
736 #if (SOL_INSIDE_UNREAL != 0)
737 #define SOL_INSIDE_UNREAL_ENGINE_I_ SOL_ON
738 #else
739 #define SOL_INSIDE_UNREAL_ENGINE_I_ SOL_OFF
740 #endif
741#else
742 #if defined(UE_BUILD_DEBUG) || defined(UE_BUILD_DEVELOPMENT) || defined(UE_BUILD_TEST) || defined(UE_BUILD_SHIPPING) || defined(UE_SERVER)
743 #define SOL_INSIDE_UNREAL_ENGINE_I_ SOL_DEFAULT_ON
744 #else
745 #define SOL_INSIDE_UNREAL_ENGINE_I_ SOL_DEFAULT_OFF
746 #endif
747#endif
748
749#if defined(SOL_NO_COMPAT)
750 #if (SOL_NO_COMPAT != 0)
751 #define SOL_USE_COMPATIBILITY_LAYER_I_ SOL_OFF
752 #else
753 #define SOL_USE_COMPATIBILITY_LAYER_I_ SOL_ON
754 #endif
755#else
756 #define SOL_USE_COMPATIBILITY_LAYER_I_ SOL_DEFAULT_ON
757#endif
758
759#if defined(SOL_GET_FUNCTION_POINTER_UNSAFE)
760 #if (SOL_GET_FUNCTION_POINTER_UNSAFE != 0)
761 #define SOL_GET_FUNCTION_POINTER_UNSAFE_I_ SOL_ON
762 #else
763 #define SOL_GET_FUNCTION_POINTER_UNSAFE_I_ SOL_OFF
764 #endif
765#else
766 #define SOL_GET_FUNCTION_POINTER_UNSAFE_I_ SOL_DEFAULT_OFF
767#endif
768
769#if defined(SOL_FUNCTION_CALL_VALUE_SEMANTICS)
770 #if (SOL_FUNCTION_CALL_VALUE_SEMANTICS != 0)
771 #define SOL_FUNCTION_CALL_VALUE_SEMANTICS_I_ SOL_ON
772 #else
773 #define SOL_FUNCTION_CALL_VALUE_SEMANTICS_I_ SOL_OFF
774 #endif
775#else
776 #define SOL_FUNCTION_CALL_VALUE_SEMANTICS_I_ SOL_DEFAULT_OFF
777#endif
778
779#if defined(SOL_MINGW_CCTYPE_IS_POISONED)
780 #if (SOL_MINGW_CCTYPE_IS_POISONED != 0)
781 #define SOL_MINGW_CCTYPE_IS_POISONED_I_ SOL_ON
782 #else
783 #define SOL_MINGW_CCTYPE_IS_POISONED_I_ SOL_OFF
784 #endif
785#elif SOL_IS_ON(SOL_COMPILER_MINGW) && defined(__GNUC__) && (__GNUC__ < 6)
786 // MinGW is off its rocker in some places...
787 #define SOL_MINGW_CCTYPE_IS_POISONED_I_ SOL_DEFAULT_ON
788#else
789 #define SOL_MINGW_CCTYPE_IS_POISONED_I_ SOL_DEFAULT_OFF
790#endif
791
792#if defined(SOL_CHAR8_T)
793 #if (SOL_CHAR8_T != 0)
794 #define SOL_CHAR8_T_I_ SOL_ON
795 #else
796 #define SOL_CHAR8_T_I_ SOL_OFF
797 #endif
798#else
799 #if defined(__cpp_char8_t)
800 #define SOL_CHAR8_T_I_ SOL_DEFAULT_ON
801 #else
802 #define SOL_CHAR8_T_I_ SOL_DEFAULT_OFF
803 #endif
804#endif
805
806#if SOL_IS_ON(SOL_USE_BOOST)
807 #include <boost/version.hpp>
808
809 #if BOOST_VERSION >= 107500 // Since Boost 1.75.0 boost::none is constexpr
810 #define SOL_BOOST_NONE_CONSTEXPR_I_ constexpr
811 #else
812 #define SOL_BOOST_NONE_CONSTEXPR_I_ const
813 #endif // BOOST_VERSION
814#else
815 // assume boost isn't using a garbage version
816 #define SOL_BOOST_NONE_CONSTEXPR_I_ constexpr
817#endif
818
819#if defined(SOL2_CI)
820 #if (SOL2_CI != 0)
821 #define SOL2_CI_I_ SOL_ON
822 #else
823 #define SOL2_CI_I_ SOL_OFF
824 #endif
825#else
826 #define SOL2_CI_I_ SOL_DEFAULT_OFF
827#endif
828
829#if defined(SOL_C_ASSERT)
830 #define SOL_USER_C_ASSERT_I_ SOL_ON
831#else
832 #define SOL_USER_C_ASSERT_I_ SOL_DEFAULT_OFF
833#endif
834
835#if defined(SOL_M_ASSERT)
836 #define SOL_USER_M_ASSERT_I_ SOL_ON
837#else
838 #define SOL_USER_M_ASSERT_I_ SOL_DEFAULT_OFF
839#endif
840
841// beginning of sol/prologue.hpp
842
843#if defined(SOL_PROLOGUE_I_)
844 #error "[sol2] Library Prologue was already included in translation unit and not properly ended with an epilogue."
845#endif
846
847#define SOL_PROLOGUE_I_ 1
848
849#if SOL_IS_ON(SOL_BUILD_CXX_MODE)
850 #define _FWD(...) static_cast<decltype( __VA_ARGS__ )&&>( __VA_ARGS__ )
851
852 #if SOL_IS_ON(SOL_COMPILER_GCC) || SOL_IS_ON(SOL_COMPILER_CLANG)
853 #define _MOVE(...) static_cast<__typeof( __VA_ARGS__ )&&>( __VA_ARGS__ )
854 #else
855 #include <type_traits>
856
857 #define _MOVE(...) static_cast<::std::remove_reference_t<( __VA_ARGS__ )>&&>( __VA_OPT__(,) )
858 #endif
859#endif
860
861// end of sol/prologue.hpp
862
863// beginning of sol/epilogue.hpp
864
865#if !defined(SOL_PROLOGUE_I_)
866 #error "[sol2] Library Prologue is missing from this translation unit."
867#else
868 #undef SOL_PROLOGUE_I_
869#endif
870
871#if SOL_IS_ON(SOL_BUILD_CXX_MODE)
872 #undef _FWD
873 #undef _MOVE
874#endif
875
876// end of sol/epilogue.hpp
877
878// beginning of sol/detail/build_version.hpp
879
880#if defined(SOL_DLL)
881 #if (SOL_DLL != 0)
882 #define SOL_DLL_I_ SOL_ON
883 #else
884 #define SOL_DLL_I_ SOL_OFF
885 #endif
886#elif SOL_IS_ON(SOL_COMPILER_VCXX) && (defined(DLL_) || defined(_DLL))
887 #define SOL_DLL_I_ SOL_DEFAULT_ON
888#else
889 #define SOL_DLL_I_ SOL_DEFAULT_OFF
890#endif // DLL definition
891
892#if defined(SOL_HEADER_ONLY)
893 #if (SOL_HEADER_ONLY != 0)
894 #define SOL_HEADER_ONLY_I_ SOL_ON
895 #else
896 #define SOL_HEADER_ONLY_I_ SOL_OFF
897 #endif
898#else
899 #define SOL_HEADER_ONLY_I_ SOL_DEFAULT_OFF
900#endif // Header only library
901
902#if defined(SOL_BUILD)
903 #if (SOL_BUILD != 0)
904 #define SOL_BUILD_I_ SOL_ON
905 #else
906 #define SOL_BUILD_I_ SOL_OFF
907 #endif
908#elif SOL_IS_ON(SOL_HEADER_ONLY)
909 #define SOL_BUILD_I_ SOL_DEFAULT_OFF
910#else
911 #define SOL_BUILD_I_ SOL_DEFAULT_ON
912#endif
913
914#if defined(SOL_UNITY_BUILD)
915 #if (SOL_UNITY_BUILD != 0)
916 #define SOL_UNITY_BUILD_I_ SOL_ON
917 #else
918 #define SOL_UNITY_BUILD_I_ SOL_OFF
919 #endif
920#else
921 #define SOL_UNITY_BUILD_I_ SOL_DEFAULT_OFF
922#endif // Header only library
923
924#if defined(SOL_C_FUNCTION_LINKAGE)
925 #define SOL_C_FUNCTION_LINKAGE_I_ SOL_C_FUNCTION_LINKAGE
926#else
927 #if SOL_IS_ON(SOL_BUILD_CXX_MODE)
928 // C++
929 #define SOL_C_FUNCTION_LINKAGE_I_ extern "C"
930 #else
931 // normal
932 #define SOL_C_FUNCTION_LINKAGE_I_
933 #endif // C++ or not
934#endif // Linkage specification for C functions
935
936#if defined(SOL_API_LINKAGE)
937 #define SOL_API_LINKAGE_I_ SOL_API_LINKAGE
938#else
939 #if SOL_IS_ON(SOL_DLL)
940 #if SOL_IS_ON(SOL_COMPILER_VCXX) || SOL_IS_ON(SOL_PLATFORM_WINDOWS) || SOL_IS_ON(SOL_PLATFORM_CYGWIN)
941 // MSVC Compiler; or, Windows, or Cygwin platforms
942 #if SOL_IS_ON(SOL_BUILD)
943 // Building the library
944 #if SOL_IS_ON(SOL_COMPILER_GCC)
945 // Using GCC
946 #define SOL_API_LINKAGE_I_ __attribute__((dllexport))
947 #else
948 // Using Clang, MSVC, etc...
949 #define SOL_API_LINKAGE_I_ __declspec(dllexport)
950 #endif
951 #else
952 #if SOL_IS_ON(SOL_COMPILER_GCC)
953 #define SOL_API_LINKAGE_I_ __attribute__((dllimport))
954 #else
955 #define SOL_API_LINKAGE_I_ __declspec(dllimport)
956 #endif
957 #endif
958 #else
959 // extern if building normally on non-MSVC
960 #define SOL_API_LINKAGE_I_ extern
961 #endif
962 #elif SOL_IS_ON(SOL_UNITY_BUILD)
963 // Built-in library, like how stb typical works
964 #if SOL_IS_ON(SOL_HEADER_ONLY)
965 // Header only, so functions are defined "inline"
966 #define SOL_API_LINKAGE_I_ inline
967 #else
968 // Not header only, so seperately compiled files
969 #define SOL_API_LINKAGE_I_ extern
970 #endif
971 #else
972 // Normal static library
973 #if SOL_IS_ON(SOL_BUILD_CXX_MODE)
974 #define SOL_API_LINKAGE_I_
975 #else
976 #define SOL_API_LINKAGE_I_ extern
977 #endif
978 #endif // DLL or not
979#endif // Build definitions
980
981#if defined(SOL_PUBLIC_FUNC_DECL)
982 #define SOL_PUBLIC_FUNC_DECL_I_ SOL_PUBLIC_FUNC_DECL
983#else
984 #define SOL_PUBLIC_FUNC_DECL_I_ SOL_API_LINKAGE_I_
985#endif
986
987#if defined(SOL_INTERNAL_FUNC_DECL_)
988 #define SOL_INTERNAL_FUNC_DECL_I_ SOL_INTERNAL_FUNC_DECL_
989#else
990 #define SOL_INTERNAL_FUNC_DECL_I_ SOL_API_LINKAGE_I_
991#endif
992
993#if defined(SOL_PUBLIC_FUNC_DEF)
994 #define SOL_PUBLIC_FUNC_DEF_I_ SOL_PUBLIC_FUNC_DEF
995#else
996 #define SOL_PUBLIC_FUNC_DEF_I_ SOL_API_LINKAGE_I_
997#endif
998
999#if defined(SOL_INTERNAL_FUNC_DEF)
1000 #define SOL_INTERNAL_FUNC_DEF_I_ SOL_INTERNAL_FUNC_DEF
1001#else
1002 #define SOL_INTERNAL_FUNC_DEF_I_ SOL_API_LINKAGE_I_
1003#endif
1004
1005#if defined(SOL_FUNC_DECL)
1006 #define SOL_FUNC_DECL_I_ SOL_FUNC_DECL
1007#elif SOL_IS_ON(SOL_HEADER_ONLY)
1008 #define SOL_FUNC_DECL_I_
1009#elif SOL_IS_ON(SOL_DLL)
1010 #if SOL_IS_ON(SOL_COMPILER_VCXX)
1011 #if SOL_IS_ON(SOL_BUILD)
1012 #define SOL_FUNC_DECL_I_ extern __declspec(dllexport)
1013 #else
1014 #define SOL_FUNC_DECL_I_ extern __declspec(dllimport)
1015 #endif
1016 #elif SOL_IS_ON(SOL_COMPILER_GCC) || SOL_IS_ON(SOL_COMPILER_CLANG)
1017 #define SOL_FUNC_DECL_I_ extern __attribute__((visibility("default")))
1018 #else
1019 #define SOL_FUNC_DECL_I_ extern
1020 #endif
1021#endif
1022
1023#if defined(SOL_FUNC_DEFN)
1024 #define SOL_FUNC_DEFN_I_ SOL_FUNC_DEFN
1025#elif SOL_IS_ON(SOL_HEADER_ONLY)
1026 #define SOL_FUNC_DEFN_I_ inline
1027#elif SOL_IS_ON(SOL_DLL)
1028 #if SOL_IS_ON(SOL_COMPILER_VCXX)
1029 #if SOL_IS_ON(SOL_BUILD)
1030 #define SOL_FUNC_DEFN_I_ __declspec(dllexport)
1031 #else
1032 #define SOL_FUNC_DEFN_I_ __declspec(dllimport)
1033 #endif
1034 #elif SOL_IS_ON(SOL_COMPILER_GCC) || SOL_IS_ON(SOL_COMPILER_CLANG)
1035 #define SOL_FUNC_DEFN_I_ __attribute__((visibility("default")))
1036 #else
1037 #define SOL_FUNC_DEFN_I_
1038 #endif
1039#endif
1040
1041#if defined(SOL_HIDDEN_FUNC_DECL)
1042 #define SOL_HIDDEN_FUNC_DECL_I_ SOL_HIDDEN_FUNC_DECL
1043#elif SOL_IS_ON(SOL_HEADER_ONLY)
1044 #define SOL_HIDDEN_FUNC_DECL_I_
1045#elif SOL_IS_ON(SOL_DLL)
1046 #if SOL_IS_ON(SOL_COMPILER_VCXX)
1047 #if SOL_IS_ON(SOL_BUILD)
1048 #define SOL_HIDDEN_FUNC_DECL_I_ extern __declspec(dllexport)
1049 #else
1050 #define SOL_HIDDEN_FUNC_DECL_I_ extern __declspec(dllimport)
1051 #endif
1052 #elif SOL_IS_ON(SOL_COMPILER_GCC) || SOL_IS_ON(SOL_COMPILER_CLANG)
1053 #define SOL_HIDDEN_FUNC_DECL_I_ extern __attribute__((visibility("default")))
1054 #else
1055 #define SOL_HIDDEN_FUNC_DECL_I_ extern
1056 #endif
1057#endif
1058
1059#if defined(SOL_HIDDEN_FUNC_DEFN)
1060 #define SOL_HIDDEN_FUNC_DEFN_I_ SOL_HIDDEN_FUNC_DEFN
1061#elif SOL_IS_ON(SOL_HEADER_ONLY)
1062 #define SOL_HIDDEN_FUNC_DEFN_I_ inline
1063#elif SOL_IS_ON(SOL_DLL)
1064 #if SOL_IS_ON(SOL_COMPILER_VCXX)
1065 #if SOL_IS_ON(SOL_BUILD)
1066 #define SOL_HIDDEN_FUNC_DEFN_I_
1067 #else
1068 #define SOL_HIDDEN_FUNC_DEFN_I_
1069 #endif
1070 #elif SOL_IS_ON(SOL_COMPILER_GCC) || SOL_IS_ON(SOL_COMPILER_CLANG)
1071 #define SOL_HIDDEN_FUNC_DEFN_I_ __attribute__((visibility("hidden")))
1072 #else
1073 #define SOL_HIDDEN_FUNC_DEFN_I_
1074 #endif
1075#endif
1076
1077// end of sol/detail/build_version.hpp
1078
1079// end of sol/version.hpp
1080
1081#include <utility>
1082#include <type_traits>
1083#include <string_view>
1084
1085#if SOL_IS_ON(SOL_USE_CXX_LUA) || SOL_IS_ON(SOL_USE_CXX_LUAJIT)
1086struct lua_State;
1087#else
1088extern "C" {
1089struct lua_State;
1090}
1091#endif // C++ Mangling for Lua vs. Not
1092
1093namespace sol {
1094
1095 enum class type;
1096
1097 class stateless_reference;
1098 template <bool b>
1099 class basic_reference;
1100 using reference = basic_reference<false>;
1101 using main_reference = basic_reference<true>;
1102 class stateless_stack_reference;
1103 class stack_reference;
1104
1105 template <typename A>
1106 class basic_bytecode;
1107
1108 struct lua_value;
1109
1110 struct proxy_base_tag;
1111 template <typename>
1112 struct proxy_base;
1113 template <typename, typename>
1114 struct table_proxy;
1115
1116 template <bool, typename>
1117 class basic_table_core;
1118 template <bool b>
1119 using table_core = basic_table_core<b, reference>;
1120 template <bool b>
1121 using main_table_core = basic_table_core<b, main_reference>;
1122 template <bool b>
1123 using stack_table_core = basic_table_core<b, stack_reference>;
1124 template <typename base_type>
1125 using basic_table = basic_table_core<false, base_type>;
1126 using table = table_core<false>;
1127 using global_table = table_core<true>;
1128 using main_table = main_table_core<false>;
1129 using main_global_table = main_table_core<true>;
1130 using stack_table = stack_table_core<false>;
1131 using stack_global_table = stack_table_core<true>;
1132
1133 template <typename>
1134 struct basic_lua_table;
1135 using lua_table = basic_lua_table<reference>;
1136 using stack_lua_table = basic_lua_table<stack_reference>;
1137
1138 template <typename T, typename base_type>
1139 class basic_usertype;
1140 template <typename T>
1141 using usertype = basic_usertype<T, reference>;
1142 template <typename T>
1143 using stack_usertype = basic_usertype<T, stack_reference>;
1144
1145 template <typename base_type>
1146 class basic_metatable;
1147 using metatable = basic_metatable<reference>;
1148 using stack_metatable = basic_metatable<stack_reference>;
1149
1150 template <typename base_t>
1151 struct basic_environment;
1152 using environment = basic_environment<reference>;
1153 using main_environment = basic_environment<main_reference>;
1154 using stack_environment = basic_environment<stack_reference>;
1155
1156 template <typename T, bool>
1157 class basic_function;
1158 template <typename T, bool, typename H>
1159 class basic_protected_function;
1160 using unsafe_function = basic_function<reference, false>;
1161 using safe_function = basic_protected_function<reference, false, reference>;
1162 using main_unsafe_function = basic_function<main_reference, false>;
1163 using main_safe_function = basic_protected_function<main_reference, false, reference>;
1164 using stack_unsafe_function = basic_function<stack_reference, false>;
1165 using stack_safe_function = basic_protected_function<stack_reference, false, reference>;
1166 using stack_aligned_unsafe_function = basic_function<stack_reference, true>;
1167 using stack_aligned_safe_function = basic_protected_function<stack_reference, true, reference>;
1168 using protected_function = safe_function;
1169 using main_protected_function = main_safe_function;
1170 using stack_protected_function = stack_safe_function;
1171 using stack_aligned_protected_function = stack_aligned_safe_function;
1172#if SOL_IS_ON(SOL_SAFE_FUNCTION_OBJECTS)
1173 using function = protected_function;
1174 using main_function = main_protected_function;
1175 using stack_function = stack_protected_function;
1176 using stack_aligned_function = stack_aligned_safe_function;
1177#else
1178 using function = unsafe_function;
1179 using main_function = main_unsafe_function;
1180 using stack_function = stack_unsafe_function;
1181 using stack_aligned_function = stack_aligned_unsafe_function;
1182#endif
1183 using stack_aligned_stack_handler_function = basic_protected_function<stack_reference, true, stack_reference>;
1184
1185 struct unsafe_function_result;
1186 struct protected_function_result;
1187 using safe_function_result = protected_function_result;
1188#if SOL_IS_ON(SOL_SAFE_FUNCTION_OBJECTS)
1189 using function_result = safe_function_result;
1190#else
1191 using function_result = unsafe_function_result;
1192#endif
1193
1194 template <typename base_t>
1195 class basic_object_base;
1196 template <typename base_t>
1197 class basic_object;
1198 template <typename base_t>
1199 class basic_userdata;
1200 template <typename base_t>
1201 class basic_lightuserdata;
1202 template <typename base_t>
1203 class basic_coroutine;
1204 template <typename base_t>
1205 class basic_packaged_coroutine;
1206 template <typename base_t>
1207 class basic_thread;
1208
1209 using object = basic_object<reference>;
1210 using userdata = basic_userdata<reference>;
1211 using lightuserdata = basic_lightuserdata<reference>;
1212 using thread = basic_thread<reference>;
1213 using coroutine = basic_coroutine<reference>;
1214 using packaged_coroutine = basic_packaged_coroutine<reference>;
1215 using main_object = basic_object<main_reference>;
1216 using main_userdata = basic_userdata<main_reference>;
1217 using main_lightuserdata = basic_lightuserdata<main_reference>;
1218 using main_coroutine = basic_coroutine<main_reference>;
1219 using stack_object = basic_object<stack_reference>;
1220 using stack_userdata = basic_userdata<stack_reference>;
1221 using stack_lightuserdata = basic_lightuserdata<stack_reference>;
1222 using stack_thread = basic_thread<stack_reference>;
1223 using stack_coroutine = basic_coroutine<stack_reference>;
1224
1225 struct stack_proxy_base;
1226 struct stack_proxy;
1227 struct variadic_args;
1228 struct variadic_results;
1229 struct stack_count;
1230 struct this_state;
1231 struct this_main_state;
1232 struct this_environment;
1233
1234 class state_view;
1235 class state;
1236
1237 template <typename T>
1238 struct as_table_t;
1239 template <typename T>
1240 struct as_container_t;
1241 template <typename T>
1242 struct nested;
1243 template <typename T>
1244 struct light;
1245 template <typename T>
1246 struct user;
1247 template <typename T>
1248 struct as_args_t;
1249 template <typename T>
1250 struct protect_t;
1251 template <typename F, typename... Policies>
1252 struct policy_wrapper;
1253
1254 template <typename T>
1255 struct usertype_traits;
1256 template <typename T>
1257 struct unique_usertype_traits;
1258
1259 template <typename... Args>
1260 struct types {
1261 typedef std::make_index_sequence<sizeof...(Args)> indices;
1262 static constexpr std::size_t size() {
1263 return sizeof...(Args);
1264 }
1265 };
1266
1267 template <typename T>
1268 struct derive : std::false_type {
1269 typedef types<> type;
1270 };
1271
1272 template <typename T>
1273 struct base : std::false_type {
1274 typedef types<> type;
1275 };
1276
1277 template <typename T>
1278 struct weak_derive {
1279 static bool value;
1280 };
1281
1282 template <typename T>
1283 bool weak_derive<T>::value = false;
1284
1285 namespace stack {
1286 struct record;
1287 }
1288
1289#if SOL_IS_OFF(SOL_USE_BOOST)
1290 template <class T>
1291 class optional;
1292
1293 template <class T>
1294 class optional<T&>;
1295#endif
1296
1297 using check_handler_type = int(lua_State*, int, type, type, const char*);
1298
1299} // namespace sol
1300
1301#define SOL_BASE_CLASSES(T, ...) \
1302 namespace sol { \
1303 template <> \
1304 struct base<T> : std::true_type { \
1305 typedef ::sol::types<__VA_ARGS__> type; \
1306 }; \
1307 } \
1308 void a_sol3_detail_function_decl_please_no_collide()
1309#define SOL_DERIVED_CLASSES(T, ...) \
1310 namespace sol { \
1311 template <> \
1312 struct derive<T> : std::true_type { \
1313 typedef ::sol::types<__VA_ARGS__> type; \
1314 }; \
1315 } \
1316 void a_sol3_detail_function_decl_please_no_collide()
1317
1318#endif // SOL_FORWARD_HPP
1319// end of sol/forward.hpp
1320
1321#endif // SOL_SINGLE_INCLUDE_FORWARD_HPP