Skip to content

Add default parameters to library I/O functions#324

Open
mark-magdy wants to merge 1 commit intoheitzmann:mainfrom
mark-magdy:feature/add-default-parameters-to-read-functions
Open

Add default parameters to library I/O functions#324
mark-magdy wants to merge 1 commit intoheitzmann:mainfrom
mark-magdy:feature/add-default-parameters-to-read-functions

Conversation

@mark-magdy
Copy link
Copy Markdown

Fixes #298

Changes

Added default parameters to 4 functions in include/gdstk/library.hpp:

  • read_gds(): tolerance, shape_tags, error_code now optional
  • read_oas(): tolerance, error_code now optional
  • gds_timestamp(): new_timestamp, error_code now optional
  • oas_validate(): signature, error_code now optional

Why

Documented C++ examples failed to compile because function signatures required all parameters explicitly. These changes allow the documented simplified calling patterns to work.

Details

  • All defaults match documented behavior and implementation expectations
  • 100% backward compatible—existing code with explicit parameters still works

- read_gds: tolerance, shape_tags, error_code now optional
- read_oas: tolerance, error_code now optional
- gds_timestamp: new_timestamp, error_code now optional
- oas_validate: signature, error_code now optional

Fixes compilation errors with documented examples.
All changes backward compatible.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++ documentation does not match header definitions (optional parameters not optional)

1 participant