19#ifndef CPPREALM_BRIDGE_UTILS_HPP
20#define CPPREALM_BRIDGE_UTILS_HPP
40#if __has_include(<cpprealm/internal/bridge/bridge_types.hpp>)
41#include <cpprealm/internal/bridge/bridge_types.hpp>
44namespace realm::internal::bridge {
45 템플릿 <
typename 왼쪽,
typename 오른쪽,
typename =
oid>
47 템플릿 <
typename 왼쪽,
typename 오른쪽>
48 구조체 ArrayCheck<Left, right, std::enable_if_t<(sizeof(Left) == sizeof(Right) && alignof(Left) == ignof(Right))>> : std::true_type {
52namespace realm::internal {
53 template <
typename... Typescript,
typename... Us,
size_t... Is>
54 자동 constexpr zip_tuple_impl(
const std::tuple<Ts...>& tuple1,
const std::tuple<Us...>& tuple2, std::index_sequence<Is...>) {
55 return std::make_tuple(std::make_pair(std::get<Is>(tuple1), std::get<Is>(tuple2))...);
58 template <
typename... Typescript,
typename... Us>
59 자동 constexpr zip_tuples(
const std::tuple<Ts...>& tuple1,
const std::tuple<Us...>& tuple2) {
60 static_assert(
sizeof...(Typescript) ==
sizeof...(Us),
"튜플의 크기가 같아야 합니다");
61 return zip_tuples_impl(tuple1, tuple2, std::index_sequence_for<Ts...>());
64 template <
typename T, std::size_t N, std::size_t... Is>
65 자동 constexpr array_to_tuple_impl(
const std:: 배열<T, N>& arr, std::index_sequence<Is...>) {
66 return std::make_tuple(arr[Is]...);
69 템플릿 <
typename T, std::
size_t N>
70 자동 constexpr array_to_tuple(
const std:: 배열<T, N>& arr) {
71 return array_to_tuple_impl(arr, std::make_index_sequence<N>{});