Title: Adopt C++20 defaulted comparisons (operator== / <=>) · Issue #1748 · nodejs/node-addon-api · GitHub
Open Graph Title: Adopt C++20 defaulted comparisons (operator== / <=>) · Issue #1748 · nodejs/node-addon-api
X Title: Adopt C++20 defaulted comparisons (operator== / <=>) · Issue #1748 · nodejs/node-addon-api
Description: Several node-addon-api types define operator== and operator!= as an explicit pair, where the != is always return !operator==(other);. In C++20 the compiler synthesizes a != b from operator==, so the hand-written != overloads become redun...
Open Graph Description: Several node-addon-api types define operator== and operator!= as an explicit pair, where the != is always return !operator==(other);. In C++20 the compiler synthesizes a != b from operator==, so th...
X Description: Several node-addon-api types define operator== and operator!= as an explicit pair, where the != is always return !operator==(other);. In C++20 the compiler synthesizes a != b from operator==, so th...
Opengraph URL: https://github.com/nodejs/node-addon-api/issues/1748
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Adopt C++20 defaulted comparisons (operator== / \u003c=>)","articleBody":"Several node-addon-api types define `operator==` and `operator!=` as an explicit pair, where the `!=` is always `return !operator==(other);`. In C++20 the compiler synthesizes `a != b` from `operator==`, so the hand-written `!=` overloads become redundant and can be removed. Where the comparison is plain memberwise equality, `operator==` itself can be `= defaulted`.\n\nRegarding `\u003c=>`, the only plausible type is `Maybe\u003cT>` where `T` is ordered.","author":{"url":"https://github.com/legendecas","@type":"Person","name":"legendecas"},"datePublished":"2026-08-10T21:24:52Z","url":"https://github.com/nodejs/node-addon-api/issues/1748"}
| 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:2f599d24-aabf-c8fd-6f02-9e1435eb4169 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A194:3AC956:C8753A:104405E:6B064104 |
| html-safe-nonce | 735b48a591ba56b3a8016d2cfa138180b9d80553d0726ec7443e80a5778c70a4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTk0OjNBQzk1NjpDODc1M0E6MTA0NDA1RTo2QjA2NDEwNCIsInZpc2l0b3JfaWQiOiI0MTI1MjQ1NjczNjE0NzU0MDUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c97e0bcb6aea2249381c80608524ccedd32d5d70464e60f070e2c00746a66ebe |
| hovercard-subject-tag | issue:5114488836 |
| 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/1748/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4904dc69f2fc5c3d4c288cb715bf3c62602929a8437482ea0fdce5814e2dff7a/nodejs/node-addon-api/issues/1748 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4904dc69f2fc5c3d4c288cb715bf3c62602929a8437482ea0fdce5814e2dff7a/nodejs/node-addon-api/issues/1748 |
| og:image:alt | Several node-addon-api types define operator== and operator!= as an explicit pair, where the != is always return !operator==(other);. In C++20 the compiler synthesizes a != b from operator==, so th... |
| 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