-
-
Notifications
You must be signed in to change notification settings - Fork 21
Configuration changes to support no-std no-rtti no-EH when not using Unreal #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
value as present. Replace unchecked access to _value with checked access for the various operators.
And define ptrdiff_t using decltype so it works for 32b and 64b arch.
|
Missing 'typename' and I didn't use the right branch, oops. |
|
Thank you for your input. I never considered building without EH, but fair point. The solution with defining If you do not mind, please share your whitespace & glue issue. We tried our best to behave like ink. |
|
I'll create tickets, I think there were two issues - handling of whitespace in optional choice text (square brackets), and handling of whitespace with a complex multi-line conditional text using glue. Been down an optimisation/correctness rabbit hole this week which might produce more PRs. |
This might be better with a high-level flag as well?
(Template wasn't being instantiated in my build environment, d'oh)
|
Was there a reason for the
Else I introduced cmake options to enable the defines, so it is easier to find them. |
|
Probably just me setting things up badly - I was building a library to use the Inkcpp runtime API so I assumed I needed I'll try without it, if that works then Sorry about the delay - been busy with (many) other things this week. |
|
Ok, that makes sense. Hope I did not break anything. ^^ No need to stress yourself. I think it is going forward at a good pace. |
As discussed - it seemed easiest to share like this as it touches several files.
Added INKCPP_NO_UNREAL, INKCPP_NO_EH, INKCPP_NO_RTTI to further configure INKCPP_API (so I define all of those when building an inkcpp API static library to link to my runtime).
Use new defines to define internal INK_ENABLE_EH, INK_ENABLE_RTTI and change client code to use these rather than INK_ENABLE_UNREAL
Suppress the non-char* getline methods when INK_ENABLE_CSTD is defined.
Replace std:::remove_cv_t+remove_reference_t with new remove_refererence+existing remove_cv
Define sized types when we don't have <ctype>
Verify sized type sizes.
Maybe it would be better with a single define to turn all that on, although I can see gamedev people might want to separate EH and rtti support.
Tested for x64 and x32, all builds and runs happily (although I did have to suppress warnings 4244, 4018 and 4267. But my test isn't exhaustive - I compile and run a complex story, but it's not using any function bindings yet, which might touch more std code.
(This is a cool project by the way. It's a little bit C++ feature heavy for my preference but I can't argue with the results :) Love the flat binary data format. Trying to figure out some whitespace & glue issues next but not getting very far.)