repr 0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
reflection/reflect.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3
4#include "category.h"
5#include "aggregate.h"
6#include "array.h"
7#include "enum.h"
8#include "init_list.h"
9#include "pair.h"
10#include "variant.h"
11#include "custom.h"
12
13namespace librepr {
14
15template <typename T>
17 using type = T;
18
19 template <typename V>
20 static void visit(V&& visitor, T& obj) {
22 }
23};
24
25template <>
27 using type = char const*;
28
29 template <typename V>
30 static void visit(V&& visitor, char const* obj) {
32 }
33};
34
35template <typename T>
36// TODO check Settings -> ADL -> member function -> builtin
38
39
40template <typename T>
42
43} // namespace librepr
Definition ctvi/ctvi.h:9
std::string code_for()
Definition repr:39
Definition aggregate.h:48
char const * type
Definition reflection/reflect.h:27
static void visit(V &&visitor, char const *obj)
Definition reflection/reflect.h:30
Definition reflection/reflect.h:16
T type
Definition reflection/reflect.h:17
static void visit(V &&visitor, T &obj)
Definition reflection/reflect.h:20
Definition category.h:82
Definition category.h:49