Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bzbarsky-apple
Copy link
Contributor

This allows writing List(someArray) instead of having to specify the type of the thing stored in the array, and same for Span.

Testing

Unit tests added.

This allows writing List(someArray) instead of having to specify the type of
the thing stored in the array, and same for Span.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request improves template deduction rules for Span and List, allowing for more concise code when constructing these objects. The changes include adding template deduction guides and corresponding unit tests. The feedback suggests adding comments to explain the purpose of the template deduction guides and the added dependency in the build file to improve code readability and maintainability.

@github-actions
Copy link

github-actions bot commented Jun 24, 2025

PR #39691: Size comparison from 31c8966 to 6ad781b

Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 31c8966 6ad781b change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1103290 1103290 0 0.0
RAM 179026 179026 0 0.0
bl702 lighting-app bl702+eth FLASH 656456 656456 0 0.0
RAM 134969 134969 0 0.0
bl702+wifi FLASH 833882 833882 0 0.0
RAM 124541 124541 0 0.0
bl706+mfd+rpc+littlefs FLASH 1066302 1066302 0 0.0
RAM 117373 117373 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 895866 895866 0 0.0
RAM 105660 105660 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 979584 979584 0 0.0
RAM 109860 109860 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 764096 764096 0 0.0
RAM 103352 103352 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 775764 775764 0 0.0
RAM 108520 108520 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 721872 721872 0 0.0
RAM 96924 96924 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 706172 706172 0 0.0
RAM 97124 97124 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 549446 549446 0 0.0
RAM 205144 205144 0 0.0
lock CC3235SF_LAUNCHXL FLASH 582566 582566 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 663533 663533 0 0.0
RAM 77456 77456 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 683385 683385 0 0.0
RAM 80096 80096 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 683385 683385 0 0.0
RAM 80096 80096 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 640317 640317 0 0.0
RAM 72524 72524 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624909 624909 0 0.0
RAM 73776 73776 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644545 644545 0 0.0
RAM 76328 76328 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644545 644545 0 0.0
RAM 76328 76328 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 645853 645853 0 0.0
RAM 76776 76776 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 665561 665561 0 0.0
RAM 79328 79328 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 665561 665561 0 0.0
RAM 79328 79328 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 620521 620521 0 0.0
RAM 70880 70880 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 640373 640373 0 0.0
RAM 73512 73512 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 640373 640373 0 0.0
RAM 73512 73512 0 0.0
efr32 lock-app BRD4187C FLASH 948380 948380 0 0.0
RAM 132004 132004 0 0.0
BRD4338a FLASH 745388 745380 -8 -0.0
RAM 206892 206892 0 0.0
window-app BRD4187C FLASH 1041584 1041576 -8 -0.0
RAM 128132 128132 0 0.0
esp32 all-clusters-app c3devkit DRAM 103496 103496 0 0.0
FLASH 1811090 1811090 0 0.0
IRAM 83862 83862 0 0.0
m5stack DRAM 122356 122356 0 0.0
FLASH 1776182 1776182 0 0.0
IRAM 117071 117071 0 0.0
linux air-purifier-app debug unknown 4848 4848 0 0.0
FLASH 2797416 2797416 0 0.0
RAM 117320 117320 0 0.0
all-clusters-app debug unknown 5664 5664 0 0.0
FLASH 6384730 6384730 0 0.0
RAM 538336 538336 0 0.0
all-clusters-minimal-app debug unknown 5528 5528 0 0.0
FLASH 5475734 5475734 0 0.0
RAM 228024 228024 0 0.0
bridge-app debug unknown 5560 5560 0 0.0
FLASH 4808066 4808066 0 0.0
RAM 207712 207712 0 0.0
camera-app debug unknown 8968 8968 0 0.0
FLASH 6933355 6933355 0 0.0
RAM 229832 229832 0 0.0
camera-controller debug unknown 9184 9184 0 0.0
FLASH 14331947 14331947 0 0.0
RAM 659544 659544 0 0.0
chip-tool debug unknown 6240 6240 0 0.0
FLASH 14674197 14674197 0 0.0
RAM 653064 653064 0 0.0
chip-tool-ipv6only arm64 unknown 40544 40544 0 0.0
FLASH 12655423 12655423 0 0.0
RAM 699352 699352 0 0.0
fabric-admin debug unknown 5920 5920 0 0.0
FLASH 12742101 12742101 0 0.0
RAM 652088 652088 0 0.0
fabric-bridge-app debug unknown 4808 4808 0 0.0
FLASH 4594296 4594296 0 0.0
RAM 193472 193472 0 0.0
fabric-sync debug unknown 5056 5056 0 0.0
FLASH 5742685 5742685 0 0.0
RAM 490896 490896 0 0.0
lighting-app debug+rpc+ui unknown 6272 6272 0 0.0
FLASH 5656945 5656945 0 0.0
RAM 209864 209864 0 0.0
lock-app debug unknown 5488 5488 0 0.0
FLASH 4838230 4838230 0 0.0
RAM 197096 197096 0 0.0
ota-provider-app debug unknown 4848 4848 0 0.0
FLASH 4446964 4446964 0 0.0
RAM 186160 186160 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4519122 4519122 0 0.0
RAM 188968 188968 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3085900 3085900 0 0.0
RAM 151624 151624 0 0.0
thermostat-no-ble arm64 unknown 9800 9800 0 0.0
FLASH 4235799 4235799 0 0.0
RAM 233336 233336 0 0.0
tv-app debug unknown 5824 5824 0 0.0
FLASH 6106909 6106909 0 0.0
RAM 615128 615128 0 0.0
tv-casting-app debug unknown 5336 5336 0 0.0
FLASH 12824189 12824189 0 0.0
RAM 769232 769232 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916220 916220 0 0.0
RAM 167438 167438 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 914168 914168 0 0.0
RAM 145660 145660 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 859716 859716 0 0.0
RAM 141045 141045 0 0.0
nxp contact mcxw71+release FLASH 625792 625792 0 0.0
RAM 63140 63140 0 0.0
lock mcxw71+release FLASH 777040 777040 0 0.0
RAM 67804 67804 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1673788 1673788 0 0.0
RAM 212416 212416 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1576996 1576996 0 0.0
RAM 208464 208464 0 0.0
light cy8ckit_062s2_43012 FLASH 1449612 1449612 0 0.0
RAM 197184 197184 0 0.0
lock cy8ckit_062s2_43012 FLASH 1481980 1481980 0 0.0
RAM 224904 224904 0 0.0
qpg lighting-app qpg6200+debug FLASH 741080 741080 0 0.0
RAM 94088 94088 0 0.0
lock-app qpg6200+debug FLASH 751268 751268 0 0.0
RAM 94116 94116 0 0.0
stm32 light STM32WB5MM-DK FLASH 466236 466236 0 0.0
RAM 141376 141376 0 0.0
telink bridge-app tl7218x FLASH 705222 705222 0 0.0
RAM 93636 93636 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796850 796850 0 0.0
RAM 44052 44052 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 785252 785252 0 0.0
RAM 100948 100948 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 712560 712560 0 0.0
RAM 54276 54276 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 749136 749136 0 0.0
RAM 77440 77440 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725880 725880 0 0.0
RAM 37032 37032 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 605422 605422 0 0.0
RAM 112428 112428 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820832 820836 4 0.0
RAM 99200 99200 0 0.0
tizen all-clusters-app arm unknown 5312 5312 0 0.0
FLASH 1821104 1821104 0 0.0
RAM 97516 97516 0 0.0
chip-tool-ubsan arm unknown 20700 20700 0 0.0
FLASH 20969082 20969082 0 0.0
RAM 9122928 9122928 0 0.0

@mergify mergify bot merged commit d2faf76 into project-chip:master Jun 25, 2025
70 checks passed
@bzbarsky-apple bzbarsky-apple deleted the more-deductions branch June 25, 2025 14:58
lpbeliveau-silabs pushed a commit to lpbeliveau-silabs/connectedhomeip that referenced this pull request Aug 8, 2025
* Improve template deduction rules for Span and List.

This allows writing List(someArray) instead of having to specify the type of
the thing stored in the array, and same for Span.

* Address review comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants