repr 0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
to_reftuple.h
Go to the documentation of this file.
1#pragma once
2#include <memory>
3#include <type_traits>
4#include <utility>
5
7#include "visit_aggregate.h"
8
9namespace librepr::detail {
10template <typename T>
11 requires(std::is_aggregate_v<std::remove_cvref_t<T>> && !std::is_array_v<std::remove_cvref_t<T>>)
12auto to_reftuple(T&& object){
13 return visit_aggregate(make_reftuple, std::forward<T>(object));
14}
15}
Definition assert.h:89
constexpr auto visit_aggregate(V &&visitor, T &&object)
Definition visit_aggregate.h:10
auto to_reftuple(T &&object)
Definition to_reftuple.h:12
constexpr auto make_reftuple
Definition reftuple.h:56