proxsuite 0.7.1
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
tags.hpp
Go to the documentation of this file.
1#ifndef VEG_TAGS_HPP_FYDE7Q6ZS
2#define VEG_TAGS_HPP_FYDE7Q6ZS
3
6
7namespace proxsuite {
8namespace linalg {
9namespace veg {
10inline namespace tags {
11VEG_TAG_TEMPLATE(typename T, tag, Tag, T);
12VEG_TAG(as_ref, AsRef);
13VEG_TAG(as_mut, AsMut);
14VEG_TAG(from, From);
15VEG_TAG(from_i, FromI);
16VEG_TAG(as_ref_once, AsRefOnce);
17
18VEG_TAG(from_alloc, FromAlloc);
19VEG_TAG(from_alloc_and_value, FromAllocAndValue);
20
21VEG_TAG(from_slice, FromSlice);
22VEG_TAG(from_slice_mut, FromSliceMut);
23template<typename Tag>
24struct InPlace
25{
26 InPlace() = default;
27};
28
29template<>
30struct InPlace<void>
31{
32 InPlace() = default;
33 template<typename Tag>
34 VEG_INLINE constexpr auto operator[](Tag /*tag*/) const noexcept
36 {
37 return InPlace<Tag>{};
38 }
39};
41} // namespace tags
42} // namespace veg
43} // namespace linalg
44} // namespace proxsuite
45
47#endif /* end of include guard VEG_TAGS_HPP_FYDE7Q6ZS */
#define VEG_TAG(Name, Type)
Definition macros.hpp:550
#define VEG_INLINE_VAR(Name, Obj)
Definition macros.hpp:523
#define VEG_INLINE
Definition macros.hpp:118
#define VEG_TAG_TEMPLATE(Tpl, Name, Type,...)
Definition macros.hpp:561
VEG_INLINE constexpr auto operator[](Tag) const noexcept -> InPlace< Tag >
Definition tags.hpp:34