mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-17 12:11:47 -07:00
made optionals for c11 actually work...
This commit is contained in:
@ -314,4 +314,12 @@
|
||||
# define GEN_OPITMIZE_MAPPINGS_END
|
||||
#endif
|
||||
|
||||
#ifndef get_optional
|
||||
# if GEN_COMPILER_C
|
||||
# define get_optional(opt) opt ? *opt : (typeof(*opt)){0}
|
||||
# else
|
||||
# define get_optional(opt) opt
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#pragma endregion Macros
|
||||
|
Reference in New Issue
Block a user