Maki
Loading...
Searching...
No Matches
null.hpp
1
//Copyright Florian Goujeon 2021 - 2025.
2
//Distributed under the Boost Software License, Version 1.0.
3
//(See accompanying file LICENSE or copy at
4
//https://www.boost.org/LICENSE_1_0.txt)
5
//Official repository: https://github.com/fgoujeon/maki
6
7
#ifndef MAKI_NULL_HPP
8
#define MAKI_NULL_HPP
9
10
#include <type_traits>
11
12
namespace
maki
13
{
14
15
namespace
detail
16
{
17
struct
null_t_impl
18
{
19
};
20
}
21
22
#ifdef MAKI_DETAIL_DOXYGEN
26
using
null_t
= IMPLEMENTATION_DETAIL;
27
#else
28
/*
29
We need an integral type so that we can directly pass `null` as a template
30
argument.
31
*/
32
using
null_t
=
const
detail::null_t_impl*;
33
#endif
34
45
#ifdef MAKI_DETAIL_DOXYGEN
46
constexpr
auto
null =
null_t
{};
47
#else
48
inline
constexpr
auto
null =
null_t
{
nullptr
};
49
#endif
50
51
namespace
detail
52
{
53
template
<
class
T>
54
constexpr
bool
is_null_v = std::is_same_v<T, null_t>;
55
}
56
57
}
//namespace
58
59
#endif
maki
The Maki library.
maki::null_t
IMPLEMENTATION_DETAIL null_t
The type of maki::null
Definition
null.hpp:26
maki
null.hpp
Generated by
1.13.2