-
-
Notifications
You must be signed in to change notification settings - Fork 622
Add module interface file #395
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: release
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a C++20 module interface file for tinyobjloader and a simple example showing how to import and use it.
- Introduces
tiny_obj_loader.cppm
to re-export symbols fromtiny_obj_loader.h
as a module - Supplies
examples/cxxmodule/main.cc
demonstratingimport tinyobj;
- Updates
examples/cxxmodule/CMakeLists.txt
to build the module-based example
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
tiny_obj_loader.cppm | New C++20 module interface re-exporting the header’s API |
examples/cxxmodule/main.cc | Example showing how to import and use the tinyobj module |
examples/cxxmodule/CMakeLists.txt | CMake setup for compiling the module interface and example |
Comments suppressed due to low confidence (2)
tiny_obj_loader.cppm:6
- [nitpick] The module name
tinyobj
does not match the file nametiny_obj_loader.cppm
; consider renaming the module totiny_obj_loader
for consistency.
export module tinyobj;
tiny_obj_loader.cppm:1
- [nitpick] Consider adding a small build or unit test that imports this module and exercises key functions to validate that the module interface compiles, links, and exports definitions correctly.
module;
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
C++20 is not widely used as of 2025. |
Add a module interface file
tiny_obj_loader.cppm
that re-exports the contents oftiny_obj_loader.h
.Also provide a simple example demonstrating its usage.