Title: Replace reference members with pointers by glankk · Pull Request #493 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Replace reference members with pointers by glankk · Pull Request #493 · cppcheck-opensource/simplecpp
X Title: Replace reference members with pointers by glankk · Pull Request #493 · cppcheck-opensource/simplecpp
Description: Having references as class members complicates copy/move constructors and assignment operators and in some cases prevents them from being defaulted. They are also a source of bugs, as there are currently several instances of copy/move operators assigning to their referred object where the intended behavior most likely is to rebind them. This PR replaces most reference members with pointers, and makes explicit some of the semantics of affected classes with an explicitly deleted/defaulted copy/move assignment constructor/operator. Fixes clang-tidy issues in #421.
Open Graph Description: Having references as class members complicates copy/move constructors and assignment operators and in some cases prevents them from being defaulted. They are also a source of bugs, as there are cur...
X Description: Having references as class members complicates copy/move constructors and assignment operators and in some cases prevents them from being defaulted. They are also a source of bugs, as there are cur...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/pull/493
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e8166877-4e13-eeb1-b4ce-749e28c48798 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A290:3FF0AC:E0E1E7:133F7CC:6A4DCFAE |
| html-safe-nonce | b31eb7dce5b85a4ea694c556e0e86cfd6c7b8ebfb694f60ad69287530e0e0ac5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjkwOjNGRjBBQzpFMEUxRTc6MTMzRjdDQzo2QTREQ0ZBRSIsInZpc2l0b3JfaWQiOiIxMTA4NTU1Mjc1OTA2Njk5MTgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 21a75cb9074b8a2f91fd6c6ac3e603b9ddd079c10021d3fe8f8f22900d9616ce |
| hovercard-subject-tag | pull_request:2746485042 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/cppcheck-opensource/simplecpp/pull/493/files |
| twitter:image | https://avatars.githubusercontent.com/u/10298420?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10298420?s=400&v=4 |
| og:image:alt | Having references as class members complicates copy/move constructors and assignment operators and in some cases prevents them from being defaulted. They are also a source of bugs, as there are cur... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 33434464 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/simplecpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33434464 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/simplecpp |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width