proxsuite
0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
unreachable.hpp
Go to the documentation of this file.
1
#ifndef VEG_UNREACHABLE_HPP_JNCM31VSS
2
#define VEG_UNREACHABLE_HPP_JNCM31VSS
3
4
#include "
proxsuite/linalg/veg/internal/macros.hpp
"
5
#include "
proxsuite/linalg/veg/internal/terminate.hpp
"
6
#include "
proxsuite/linalg/veg/internal/prologue.hpp
"
7
8
namespace
proxsuite
{
9
namespace
linalg {
10
namespace
veg {
11
namespace
meta {
12
namespace
nb {
13
struct
unreachable
14
{
15
[[
noreturn
]]
VEG_INLINE
void
operator()
()
const
VEG_NOEXCEPT
16
{
17
#ifdef NDEBUG
18
HEDLEY_UNREACHABLE
();
19
#else
20
_detail::terminate
();
21
#endif
22
}
23
};
24
25
struct
unreachable_if
26
{
27
VEG_INLINE
constexpr
auto
operator()
(
bool
Cond
)
const
VEG_NOEXCEPT
->bool
28
{
29
return
(
Cond
?
unreachable
{}() : (void)0),
Cond
;
30
}
31
};
32
}
// namespace nb
33
VEG_NIEBLOID
(unreachable);
34
VEG_NIEBLOID
(unreachable_if);
35
}
// namespace meta
36
}
// namespace veg
37
}
// namespace linalg
38
}
// namespace proxsuite
39
40
#include "
proxsuite/linalg/veg/internal/epilogue.hpp
"
41
#endif
/* end of include guard VEG_UNREACHABLE_HPP_JNCM31VSS */
epilogue.hpp
HEDLEY_UNREACHABLE
#define HEDLEY_UNREACHABLE()
Definition
hedley.ext.hpp:1338
macros.hpp
VEG_NIEBLOID
#define VEG_NIEBLOID(Name)
Definition
macros.hpp:545
VEG_INLINE
#define VEG_INLINE
Definition
macros.hpp:118
proxsuite::linalg::veg::_detail::terminate
void terminate() noexcept
Definition
terminate.hpp:12
proxsuite
Definition
common.hpp:14
prologue.hpp
VEG_NOEXCEPT
#define VEG_NOEXCEPT
Definition
prologue.hpp:30
proxsuite::linalg::veg::Ref
Definition
ref.hpp:30
proxsuite::linalg::veg::meta::nb::unreachable_if
Definition
unreachable.hpp:26
proxsuite::linalg::veg::meta::nb::unreachable_if::operator()
VEG_INLINE constexpr auto operator()(bool Cond) const VEG_NOEXCEPT -> bool
Definition
unreachable.hpp:27
proxsuite::linalg::veg::meta::nb::unreachable
Definition
unreachable.hpp:14
proxsuite::linalg::veg::meta::nb::unreachable::operator()
VEG_INLINE void operator()() const VEG_NOEXCEPT
Definition
unreachable.hpp:15
terminate.hpp
include
proxsuite
linalg
veg
util
unreachable.hpp
Generated by
1.10.0