Skip to content

Add support for C++ modules - #513

Open
mikomikotaishi wants to merge 7 commits into
SRombauts:masterfrom
mikomikotaishi:master
Open

mikomikotaishi wants to merge 7 commits into
SRombauts:masterfrom
mikomikotaishi:master

Conversation

@mikomikotaishi

@mikomikotaishi mikomikotaishi commented May 29, 2025

Copy link
Copy Markdown

This pull request adds support for C++20 modules to SQLiteCpp, by creating modules sqlite.*. It is built using the macro SQLITECPP_BUILD_MODULES. The README.md file has also been updated to contain information.

I also added a namespace sqlite = SQLite; alias so that the namespace and module names align.

@SRombauts
SRombauts self-requested a review May 31, 2025 14:36
@SRombauts SRombauts self-assigned this May 31, 2025
@mikomikotaishi

Copy link
Copy Markdown
Author

I am wondering, could we also add a preprocessor macro to export the symbol Exception as SQLException (similar to its name in Java), so that it is not confused with the usual std::exception from the standard library?

@SRombauts

Copy link
Copy Markdown
Owner

This would be something for C++20, right now I am only considering making C++17 the baseline...
I'll have a second though at that in the following days

@SRombauts SRombauts mentioned this pull request Sep 21, 2026
@mikomikotaishi

Copy link
Copy Markdown
Author

It is an opt-in feature, and doesn't prevent C++17; it just makes the option available if the user compiles as C++20 and above, because the configuration is guarded in CMake.

@SRombauts

Copy link
Copy Markdown
Owner

Noted!
I am going to release a final version supporting C++11 to help overhaul the entire project, so this is something to keep in mind for right after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants