Title: const may not be correct afterall. · Issue #13 · codereport/An-Algorithm-Library · GitHub
Open Graph Title: const may not be correct afterall. · Issue #13 · codereport/An-Algorithm-Library
X Title: const may not be correct afterall. · Issue #13 · codereport/An-Algorithm-Library
Description: An-Algorithm-Library/src/aal/algorithm.hpp Line 9 in 1a94a02 find(P const pred, I f, I const l, Is... fs) { If the user is using a mutable lambda. Then they can't use the algorithm. So might need to remove const from these. We might want...
Open Graph Description: An-Algorithm-Library/src/aal/algorithm.hpp Line 9 in 1a94a02 find(P const pred, I f, I const l, Is... fs) { If the user is using a mutable lambda. Then they can't use the algorithm. So might need t...
X Description: An-Algorithm-Library/src/aal/algorithm.hpp Line 9 in 1a94a02 find(P const pred, I f, I const l, Is... fs) { If the user is using a mutable lambda. Then they can't use the algorithm. So might ne...
Opengraph URL: https://github.com/codereport/An-Algorithm-Library/issues/13
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"const may not be correct afterall.","articleBody":"https://github.com/codereport/An-Algorithm-Library/blob/1a94a025ad0a187cc0fd39bb6bcbc9a5791338b2/src/aal/algorithm.hpp#L9\r\n\r\nIf the user is using a `mutable` lambda. Then they can't use the algorithm. So might need to remove const from these.\r\n\r\nWe might want to test a mutable lambda to see if it's working as expected. like `[x=0]` and `++x` to make sure all the functions are correctly incrementing the value.\r\n\r\nThough it should be fine I did some testing with [compiler explorer](https://www.godbolt.org/z/8hrb3aaTb). So I understand. The last function in the call will get the one that will increment because they are all pass by value.\r\n\r\nhttps://github.com/codereport/An-Algorithm-Library/blob/1a94a025ad0a187cc0fd39bb6bcbc9a5791338b2/src/aal/algorithm.hpp#L19 Here we could forward the value to find. It might be better since any_of isn't actually calling the lambda. ","author":{"url":"https://github.com/Sebanisu","@type":"Person","name":"Sebanisu"},"datePublished":"2021-06-21T16:12:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/13/An-Algorithm-Library/issues/13"}
| 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:f8805147-e042-9105-7fd7-ba6110f46a70 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A5E:220694:14151EA:1B71C1A:6A4C7CB0 |
| html-safe-nonce | c5b03309df3edd437f431fb843493ab86796df41fc89b6530fda523f7d465b15 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTVFOjIyMDY5NDoxNDE1MUVBOjFCNzFDMUE6NkE0QzdDQjAiLCJ2aXNpdG9yX2lkIjoiNjE3NjQ0MTYyMjMxOTYyNzQ0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | be72bb43545da7e8abf8ee5b70a2b3907d226dfc6964b83557b3369e3887712b |
| hovercard-subject-tag | issue:926382440 |
| 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/codereport/An-Algorithm-Library/13/issue_layout |
| twitter:image | https://opengraph.githubassets.com/86491c0b7ee659e98277802ec7a93dd1103abc9d6450995bf1589a1dc67564a8/codereport/An-Algorithm-Library/issues/13 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/86491c0b7ee659e98277802ec7a93dd1103abc9d6450995bf1589a1dc67564a8/codereport/An-Algorithm-Library/issues/13 |
| og:image:alt | An-Algorithm-Library/src/aal/algorithm.hpp Line 9 in 1a94a02 find(P const pred, I f, I const l, Is... fs) { If the user is using a mutable lambda. Then they can't use the algorithm. So might need t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Sebanisu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/codereport/An-Algorithm-Library git https://github.com/codereport/An-Algorithm-Library.git |
| octolytics-dimension-user_id | 36027403 |
| octolytics-dimension-user_login | codereport |
| octolytics-dimension-repository_id | 342963212 |
| octolytics-dimension-repository_nwo | codereport/An-Algorithm-Library |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 342963212 |
| octolytics-dimension-repository_network_root_nwo | codereport/An-Algorithm-Library |
| 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 | cd470457e909b9d062f8002cf438ba870e6acff6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width