PCRE2 C++ Wrapper
1.2.4
pcre2cpp
Loading...
Searching...
No Matches
assert.hpp
Go to the documentation of this file.
1
/*
2
* pcre2cpp - PCRE2 cpp wrapper
3
*
4
* Licensed under the BSD 3-Clause License with Attribution Requirement.
5
* See the LICENSE file for details: https://github.com/MAIPA01/pcre2cpp/blob/main/LICENSE
6
*
7
* Copyright (c) 2025, Patryk Antosik (MAIPA01)
8
*
9
* PCRE2 library included in this project:
10
* Copyright (c) 2016-2024, University of Cambridge.
11
*
12
* See the LICENSE_PCRE2 file for details: https://github.com/MAIPA01/pcre2cpp/blob/main/LICENSE_PCRE2
13
*/
14
15
16
#pragma once
17
#ifndef _PCRE2CPP_ASSERT_HPP_
18
#define _PCRE2CPP_ASSERT_HPP_
19
20
#include <
pcre2cpp/config.hpp
>
21
22
#if !_PCRE2CPP_HAS_ASSERTS
23
_PCRE2CPP_ERROR
(
"This is only available for c++17 and greater and when asserts are enabled!"
);
24
#else
25
26
#include <mstd/mstd.hpp>
27
33
34
#if _DEBUG
35
#define pcre2cpp_assert(expression, ...) \
36
MSTD_STOP_ASSERT_BASE(expression, [](const std::string_view) -> void {} __VA_OPT__(, ) __VA_ARGS__)
37
#elif !defined(PCRE2CPP_DISABLE_ASSERT_ON_RELEASE)
38
#define pcre2cpp_assert(expression, ...) \
39
MSTD_LOG_ASSERT_BASE(expression, [](const std::string_view) -> void {} __VA_OPT__(, ) __VA_ARGS__)
40
#else
41
#define pcre2cpp_assert(expression, ...) \
42
MSTD_EMPTY_ASSERT_BASE(expression, [](const std::string_view) -> void {} __VA_OPT__(, ) __VA_ARGS__)
43
#endif
44
45
#endif
46
#endif
config.hpp
_PCRE2CPP_ERROR
#define _PCRE2CPP_ERROR(MESSAGE)
compiler error
Definition
config.hpp:278
pcre2cpp
include
pcre2cpp
utils
assert.hpp
Generated by
1.15.0