repr 0.1
Reconstructable string representations and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
init_list.h
Go to the documentation of this file.
#pragma once
#include <string>
#include <initializer_list>
#include <ranges>
#include <type_traits>
#include "category.h"
namespace librepr {
template <typename T>
struct Reflect;
template <std::ranges::range T>
requires std::constructible_from<std::initializer_list<typename T::value_type>>
struct Reflect<T> : category::Type<T> {
using type = T;
using element_type = typename T::value_type;
constexpr static bool can_descend = true;
constexpr static bool iterable = true;
constexpr static bool associative = requires {
typename type::key_type;
typename type::mapped_type;
};
template <typename V>
static void visit(V&& visitor, T& obj) {
for (auto&& value : obj) {
}
}
template <typename V>
static void visit(V&& visitor) {
}
};
} // namespace librepr