.gitignore: add some more IDE / tools related file
[babeltrace.git] / src / cpp-common / bt2c / libc-up.hpp
CommitLineData
23ed167e
SM
1/*
2 * Copyright (c) 2022 EfficiOS, inc.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
094bf3f2
SM
7#ifndef BABELTRACE_CPP_COMMON_BT2C_LIBC_UP_HPP
8#define BABELTRACE_CPP_COMMON_BT2C_LIBC_UP_HPP
23ed167e
SM
9
10#include <cstdio>
11#include <memory>
12
094bf3f2 13namespace bt2c {
23ed167e
SM
14namespace internal {
15
16struct FileCloserDeleter
17{
18 void operator()(std::FILE * const f) noexcept
19 {
20 std::fclose(f);
21 }
22};
23
24} /* namespace internal */
25
26using FileUP = std::unique_ptr<std::FILE, internal::FileCloserDeleter>;
27
094bf3f2 28} /* namespace bt2c */
23ed167e 29
094bf3f2 30#endif /* BABELTRACE_CPP_COMMON_BT2C_LIBC_UP_HPP */
This page took 0.036408 seconds and 4 git commands to generate.