{"id":13730569,"url":"https://github.com/TartanLlama/function_ref","last_synced_at":"2025-05-08T03:30:51.162Z","repository":{"id":46861600,"uuid":"111828760","full_name":"TartanLlama/function_ref","owner":"TartanLlama","description":"A lightweight, non-owning reference to a callable.","archived":false,"fork":false,"pushed_at":"2021-09-22T11:53:39.000Z","size":121,"stargazers_count":173,"open_issues_count":10,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-03T03:02:18.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TartanLlama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-23T16:07:32.000Z","updated_at":"2025-03-09T23:37:25.000Z","dependencies_parsed_at":"2022-08-26T16:52:27.476Z","dependency_job_id":null,"html_url":"https://github.com/TartanLlama/function_ref","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Ffunction_ref","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Ffunction_ref/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Ffunction_ref/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Ffunction_ref/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TartanLlama","download_url":"https://codeload.github.com/TartanLlama/function_ref/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252992897,"owners_count":21837188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:16.677Z","updated_at":"2025-05-08T03:30:50.824Z","avatar_url":"https://github.com/TartanLlama.png","language":"C++","readme":"# function_ref\n\nA lightweight non-owning reference to a callable.\n\nClang + GCC: [![Linux Build Status](https://travis-ci.org/TartanLlama/function_ref.png?branch=master)](https://travis-ci.org/TartanLlama/function_ref)\nMSVC: [![Windows Build Status](https://ci.appveyor.com/api/projects/status/k5x00xa11y3s5wsg?svg=true)](https://ci.appveyor.com/project/TartanLlama/function_ref)\n\nUse `tl::function_ref` instead of `std::function` whenever you don't need to own the callable. The most common case for this is function parameters which aren't stored anywhere:\n\n```cpp\nvoid foo (function_ref\u003cint(int)\u003e func) {\n    std::cout \u003c\u003c \"Result is \" \u003c\u003c func(21); //42\n}\n\nfoo([](int i) { return i*2; });\n```\n\nFull documentation available [here](https://tl.tartanllama.xyz/).\n\n----------\n\n[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](\"http://creativecommons.org/publicdomain/zero/1.0/\")\n\nTo the extent possible under law, [Simon Brand](https://twitter.com/TartanLlama) has waived all copyright and related or neighboring rights to the `function_ref` library. This work is published from: United Kingdom.\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTartanLlama%2Ffunction_ref","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTartanLlama%2Ffunction_ref","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTartanLlama%2Ffunction_ref/lists"}