proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
defer.hpp
Go to the documentation of this file.
1#ifndef VEG_DEFER_HPP_SQPONLRGS
2#define VEG_DEFER_HPP_SQPONLRGS
3
7
8namespace proxsuite {
9namespace linalg {
10namespace veg {
11template<typename Fn>
31
33
34)
35
36namespace nb {
37struct defer
38{
39 VEG_TEMPLATE(typename Fn,
41 VEG_INLINE VEG_CPP20(constexpr) auto
42 operator(),
43 (fn, Fn&&))
45 ->proxsuite::linalg::veg::Defer<Fn>
46 {
47 return { VEG_FWD(fn) };
48 }
49};
50} // namespace nb
52} // namespace veg
53} // namespace linalg
54} // namespace proxsuite
55
57#endif /* end of include guard VEG_DEFER_HPP_SQPONLRGS */
#define VEG_CONCEPT(...)
Definition macros.hpp:1243
#define VEG_TEMPLATE(TParams, Constraint, Attr_Name,...)
Definition macros.hpp:385
#define VEG_NIEBLOID(Name)
Definition macros.hpp:545
#define VEG_INLINE
Definition macros.hpp:118
#define VEG_FWD(X)
Definition macros.hpp:569
#define VEG_CPP20(...)
Definition prologue.hpp:83
#define VEG_NODISCARD
Definition prologue.hpp:97
#define VEG_NOEXCEPT
Definition prologue.hpp:30
#define VEG_CPP17(...)
Definition prologue.hpp:77
#define VEG_NOEXCEPT_IF(...)
Definition prologue.hpp:31
Defer(Defer const &)=delete
constexpr Defer(Fn _fn) VEG_NOEXCEPT_IF(VEG_CONCEPT(nothrow_movable< Fn >))
Definition defer.hpp:15
Defer(Defer &&) VEG_NOEXCEPT=delete