aboutsummaryrefslogtreecommitdiffstats
path: root/include/utility/pointer.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-05-12 13:51:41 +0100
committerGravatar Sadie Powell2026-05-13 17:19:50 +0100
commit03fb11eab92fa2d36edac7a5cc600953cfed3b4a (patch)
tree00c86068f0f19db25652e4e64c54d504f216d0e6 /include/utility/pointer.h
parentRemove sys/stat.h from the global socket header. (diff)
Move FilePtr to the pointer utility header.
Diffstat (limited to 'include/utility/pointer.h')
-rw-r--r--include/utility/pointer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/utility/pointer.h b/include/utility/pointer.h
index 319a0c109..3f599d22c 100644
--- a/include/utility/pointer.h
+++ b/include/utility/pointer.h
@@ -21,6 +21,9 @@
namespace insp
{
+ /** A pointer to a FILE that closes when it goes out of scope. */
+ using file_ptr = std::unique_ptr<FILE, int(*)(FILE*)>;
+
/** Deletes all elements in a container using operator delete
* @param cont The container containing the elements to delete
*/