File indexing completed on 2025-01-18 09:43:38
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_PFR_DETAIL_TIE_FROM_STRUCTURE_TUPLE_HPP
0008 #define BOOST_PFR_DETAIL_TIE_FROM_STRUCTURE_TUPLE_HPP
0009 #pragma once
0010
0011 #include <boost/pfr/detail/config.hpp>
0012
0013 #include <boost/pfr/detail/core.hpp>
0014
0015 #include <boost/pfr/detail/stdtuple.hpp>
0016 #include <boost/pfr/tuple_size.hpp>
0017 #include <boost/pfr/detail/make_integer_sequence.hpp>
0018
0019 #include <tuple>
0020
0021 namespace boost { namespace pfr { namespace detail {
0022
0023
0024
0025
0026
0027 template <typename... Elements>
0028 struct tie_from_structure_tuple : std::tuple<Elements&...> {
0029 using base = std::tuple<Elements&...>;
0030 using base::base;
0031
0032 template <typename T>
0033 constexpr tie_from_structure_tuple& operator= (T const& t) {
0034 base::operator=(
0035 detail::make_stdtiedtuple_from_tietuple(
0036 detail::tie_as_tuple(t),
0037 detail::make_index_sequence<tuple_size_v<T>>()));
0038 return *this;
0039 }
0040 };
0041
0042 }}}
0043
0044 #endif