libcw
d
version 2.0.0
The C++ Debugging Support Library
Loading...
Searching...
No Matches
LIBCWD_ASSERT.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2000-2005, 2018, 2020, 2023, 2026 Carlo Wood
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
9
10
#ifndef LIBCWD_PRIVATE_ASSERT_H
11
#define LIBCWD_PRIVATE_ASSERT_H
12
13
#include "
libcwd/config.h
"
14
15
#include <cassert>
16
17
namespace
libcwd
{
18
namespace
_private_ {
19
20
void
assert_fail(
char
const
* expr,
char
const
* file,
int
line,
char
const
* function);
21
22
}
// namespace _private_
23
}
// namespace libcwd
24
25
// Solaris8 doesn't define __STRING().
26
#define LIBCWD_STRING(x) #x
27
28
#define LIBCWD_ASSERT(expr) \
29
(static_cast<void>( \
30
(expr) ? 0 \
31
: (::libcwd::_private_::assert_fail(LIBCWD_STRING(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))
32
33
#endif
// LIBCWD_PRIVATE_ASSERT_H
config.h
libcwd
namespace for libcwd.
libcwd
LIBCWD_ASSERT.h
Copyright © 2001-2004, 2026 Carlo Wood. All rights reserved. Generated by
1.16.1.