| 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 "../exc.hpp" |
| 11 | |
| 12 | namespace bt2 { |
| 13 | namespace internal { |
| 14 | |
| 15 | template <typename LibObjPtrT> |
| 16 | void validateCreatedObjPtr(const LibObjPtrT libOjbPtr) |
| 17 | { |
| 18 | if (!libOjbPtr) { |
| 19 | throw MemoryError {}; |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | template <typename ObjT> |
| 24 | struct TypeDescr; |
| 25 | |
| 26 | } /* namespace internal */ |
| 27 | } /* namespace bt2 */ |
| 28 | |
| 29 | #endif /* BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP */ |