repr
0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
custom.h
Go to the documentation of this file.
1
#pragma once
2
#include <
string
>
3
4
#include <
librepr/customization/members.h
>
5
#include <
librepr/customization/reflection.h
>
6
7
8
namespace
librepr
{
9
template
<
typename
T>
10
struct
Reflect
;
11
12
//TODO this shouldn't be a specialization of Reflect
15
/*template <typename T>
16
requires has_custom_members<T>
17
struct Reflect<T> {
18
using type = T;
19
using members = typename Settings<T>::members;
20
21
static_assert(members::template is_valid_for<T>, "Members visit the wrong class type.");
22
23
template <typename V>
24
static void visit(V&& visitor, T const& obj) {
25
Visit::type<T>(visitor);
26
ScopeGuard guard{visitor};
27
28
members::for_each([&visitor, &obj]<Member member> {
29
constexpr static auto name = detail::custom_member_name<member>();
30
if constexpr (!name.empty()){
31
Visit::member_name(visitor, std::string_view{name});
32
}
33
Reflect<typename decltype(member)::type>::visit(visitor, member(obj));
34
});
35
}
36
};*/
37
}
// namespace librepr
members.h
librepr
Definition
ctvi/ctvi.h:9
librepr::Reflect
Reflect(T &) -> Reflect< T >
reflection.h
string
include
librepr
reflection
custom.h
Generated by
1.9.8, using the excellent
Doxygen Awesome
Theme