Monado OpenXR Runtime
Loading...
Searching...
No Matches
u_weak_ptr.hpp
Go to the documentation of this file.
1
// Copyright 2026, Beyley Cardellio
2
// SPDX-License-Identifier: BSL-1.0
3
/*!
4
* @file
5
* @brief C++ helpers for weak pointers.
6
* @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7
*
8
* @ingroup aux_util
9
*/
10
11
#pragma once
12
13
#include <memory>
14
15
16
#define U_ASSERT_WEAK_PTR_RET(ptr, msg, ...) \
17
do { \
18
if (!ptr) { \
19
U_LOG_E("Handle " #ptr " has expired unexpectedly! [%s:%d]: " msg, __func__, __LINE__); \
20
assert(false); \
21
return __VA_ARGS__; \
22
} \
23
} while (0)
auxiliary
util
u_weak_ptr.hpp
Generated by
1.9.8