add string vector support#56
Closed
jianbingfang wants to merge 2 commits intoArashPartow:masterfrom
Closed
Conversation
Enable registration, access, assignment, and string operations on
string vector data. All changes guarded by exprtk_disable_string_capabilities.
New features:
- add_string_vector() / add_string_vector("name", vec, is_constant)
- names[] for size, names[i] for element access (const & dynamic index)
- names[0] := 'hello' element assignment with const protection
- names[0] + names[1] concatenation, 'foo' in names[0], names[0] like '*x*'
- names[2][1:5] substring range on elements
- igeneric_function 'L' parameter type for string vector arguments
- RTC (runtime check) variants for bounds checking
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ction Extends ExprTk generic function return type system with two new types: - e_rtrn_vector (3): function returns std::vector<T>, retrieved via expression::vec() - e_rtrn_str_vector (4): function returns std::vector<std::string>, retrieved via expression::strvec() Key changes: - igeneric_function: add e_rtrn_vector/e_rtrn_str_vector enum values and 4 new operator() overloads - New node classes: vector_function_node, multimode_vecfunction_node, str_vector_function_node, multimode_strvecfunction_node - New string_vector_interface<T> for dynamic_cast-based result retrieval - symbol_table: vector_function_store, str_vector_function_store, add_function routing, getters - Parser: parse_vector_function_call, parse_str_vector_function_call, symbol resolution routing - expression_generator: vector_function_call, str_vector_function_call synthesis methods - expression: vec() and strvec() retrieval APIs - All 23 exprtk_test cases pass; 47 string-vector tests pass; 28 new vec-return tests pass Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.
This PR adds two major features to ExprTk: