7b162d12c28a268eb6a88df43008b9a3528518e1
[babeltrace.git] / src / cpp-common / bt2 / internal / utils.hpp
1 /*
2 * Copyright 2019-2020 (c) Philippe Proulx <pproulx@efficios.com>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7 #ifndef BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP
8 #define BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP
9
10 #include <type_traits>
11
12 #include "../exc.hpp"
13
14 namespace bt2 {
15 namespace internal {
16
17 template <typename LibObjPtrT>
18 void validateCreatedObjPtr(const LibObjPtrT libOjbPtr)
19 {
20 if (!libOjbPtr) {
21 throw MemoryError {};
22 }
23 }
24
25 template <typename ObjT>
26 struct TypeDescr;
27
28 } /* namespace internal */
29 } /* namespace bt2 */
30
31 #endif /* BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP */
This page took 0.042068 seconds and 3 git commands to generate.