DRTVWR-558: Extend LL::apply() to LLSD array arguments.
Make apply(function, std::array) and apply(function, std::vector) available even when we borrow the C++17 implementation of apply(function, std::tuple). Add apply(function, LLSD) with interpretations: * isUndefined() is treated as an empty array, for calling a nullary function * scalar LLSD is treated as a single-entry array, for calling a unary function * isArray() converts function parameters using LLSDParam * isMap() is an error. Add unit tests for all flavors of LL::apply(). (cherry picked from commit 3006c24251c6259d00df9e0f4f66b8a617e6026d)
parent
324f0d9b
No related branches found
No related tags found
Showing
- indra/llcommon/CMakeLists.txt 2 additions, 0 deletionsindra/llcommon/CMakeLists.txt
- indra/llcommon/apply.h 16 additions, 7 deletionsindra/llcommon/apply.h
- indra/llcommon/llsdutil.h 80 additions, 1 deletionindra/llcommon/llsdutil.h
- indra/llcommon/tests/apply_test.cpp 171 additions, 0 deletionsindra/llcommon/tests/apply_test.cpp
indra/llcommon/tests/apply_test.cpp
0 → 100644
Please register or sign in to comment