Title: Support C++20 span types · Issue #1747 · nodejs/node-addon-api · GitHub
Open Graph Title: Support C++20 span types · Issue #1747 · nodejs/node-addon-api
X Title: Support C++20 span types · Issue #1747 · nodejs/node-addon-api
Description: node-addon-api's buffer-like types pass their backing memory as a raw pointer plus a separate length, both on the way out (Data() + a length accessor) and on the way in (the New/Copy factories). Callers must keep the two values in sync m...
Open Graph Description: node-addon-api's buffer-like types pass their backing memory as a raw pointer plus a separate length, both on the way out (Data() + a length accessor) and on the way in (the New/Copy factories). Ca...
X Description: node-addon-api's buffer-like types pass their backing memory as a raw pointer plus a separate length, both on the way out (Data() + a length accessor) and on the way in (the New/Copy factories)...
Opengraph URL: https://github.com/nodejs/node-addon-api/issues/1747
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support C++20 span types","articleBody":"node-addon-api's buffer-like types pass their backing memory as a raw pointer plus a separate length, both on the way out (`Data()` + a length accessor) and on the way in (the `New`/`Copy` factories). Callers must keep the two values in sync manually, with no bounds information attached to the pointer.\n\nOnce C++20 is the minimum supported standard, we should adopt `std::span` in both directions. These additions are ABI-compatible (existing pointer/length overloads stay), and give callers a single bounds-carrying handle that works with range-based `for`, `\u003calgorithm>`, and `\u003cranges>`.\n\nThis can be an additive change with a C++ version guard.","author":{"url":"https://github.com/legendecas","@type":"Person","name":"legendecas"},"datePublished":"2026-08-10T21:20:48Z","url":"https://github.com/nodejs/node-addon-api/issues/1747"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:44aacce3-00c6-d5aa-a090-a26b6666f2fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0CE:1E80BA:A04137:D78474:6B0641BD |
| html-safe-nonce | d78e4361b9a1792c9ceec055d0fca56cff735eb049d0c480e9d9695ae60709f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMENFOjFFODBCQTpBMDQxMzc6RDc4NDc0OjZCMDY0MUJEIiwidmlzaXRvcl9pZCI6Ijc2MDIzMDU0MDgwODY0NTg4MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 716735ed1e50a9344b501726eece2b6bd472f3725c72e9f7409caa9afc33f86c |
| hovercard-subject-tag | issue:5114462519 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node-addon-api/1747/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4285bf79f733c3e72fa7fac24d2488f7da132314089dd6de0cf27ce70b57e057/nodejs/node-addon-api/issues/1747 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4285bf79f733c3e72fa7fac24d2488f7da132314089dd6de0cf27ce70b57e057/nodejs/node-addon-api/issues/1747 |
| og:image:alt | node-addon-api's buffer-like types pass their backing memory as a raw pointer plus a separate length, both on the way out (Data() + a length accessor) and on the way in (the New/Copy factories). Ca... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | legendecas |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node-addon-api git https://github.com/nodejs/node-addon-api.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 81384578 |
| octolytics-dimension-repository_nwo | nodejs/node-addon-api |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81384578 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node-addon-api |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac613d3698d3d8565651455086e1f74da07bf277 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width