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