-
-
Notifications
You must be signed in to change notification settings - Fork 334
sqlite_orm as a C++ named module #1336
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Added missing includes of dependent internal headers * Cleaned up amalgamation files to only include the public facing high-level headers
Same as in all other locations
We need to take into consideration that exporting a namespace (as a named module) is kind of greedy in the sense that also nested namespaces are exported.
When importing sqlite_orm as a named module, sqlite3 symbols are not exported.
The `cxx_universal.h` exists to provide symbols that sqlite_orm depends on everywhere. It is easy to forget to include it. And more importantly there are decision macros used that need to be defined before certain files anyway, which is the reason that `cxx_universal.h` gets included by the files used for amalgamation. Hence I decided to not include it anymore.
b3c4796
to
d9a6810
Compare
e7d7783
to
8ba8730
Compare
fnc12
approved these changes
Jul 25, 2024
Nice! Please create a PR when this is done at https://arewemodulesyet.org/ :D |
Using named modules the namespace scope will be much stricter, so adhere to it.
e272cb5
to
db32c5d
Compare
A leading underscore is reserved by the C++ Standard.
8e9bd4d
to
1fd53b9
Compare
fnc12
approved these changes
Feb 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
sqlite_orm can be imported as a C++ named module now.
import std.compat;
. This means that the C++23 standard named modulesstd
andstd.compat
must be available.-> Therefore, the test target “modules_test” is only defined when testing with Visual C++.
-> Therefore, the named module still has to be consumed manually in a CMake script.
To discuss: