Add module interface file#395
Closed
Mysvac wants to merge 2 commits intotinyobjloader:releasefrom
Mysvac:release
Closed
Add module interface file#395Mysvac wants to merge 2 commits intotinyobjloader:releasefrom Mysvac:release
Mysvac wants to merge 2 commits intotinyobjloader:releasefrom
Mysvac:release
Conversation
Author
|
There was a problem hiding this comment.
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.cppmto re-export symbols fromtiny_obj_loader.has a module - Supplies
examples/cxxmodule/main.ccdemonstratingimport tinyobj; - Updates
examples/cxxmodule/CMakeLists.txtto 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
tinyobjdoes not match the file nametiny_obj_loader.cppm; consider renaming the module totiny_obj_loaderfor 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 <[email protected]>
Collaborator
|
C++20 is not widely used as of 2025. |
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
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.
Add a module interface file
tiny_obj_loader.cppmthat re-exports the contents oftiny_obj_loader.h.Also provide a simple example demonstrating its usage.